aboutsummaryrefslogtreecommitdiff
path: root/py/emitbc.c
diff options
context:
space:
mode:
authorPavol Rusnak <stick@gk2.sk>2016-10-25 11:05:33 +0200
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2016-10-31 23:21:22 +0300
commit7ffc959c00707c8328d3e8235e9c4741f227c25c (patch)
tree057288f0e60c141e7653aecce0697c648de5c2be /py/emitbc.c
parent3679ee9b520db96772ef0917d0a108180aa70114 (diff)
py: remove asserts that are always true in emitbc.c
Diffstat (limited to 'py/emitbc.c')
-rw-r--r--py/emitbc.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/py/emitbc.c b/py/emitbc.c
index d6f2bf333..e11c9ae94 100644
--- a/py/emitbc.c
+++ b/py/emitbc.c
@@ -183,7 +183,6 @@ STATIC void emit_write_bytecode_byte(emit_t *emit, byte b1) {
}
STATIC void emit_write_bytecode_byte_byte(emit_t* emit, byte b1, byte b2) {
- assert((b2 & (~0xff)) == 0);
byte *c = emit_get_cur_to_write_bytecode(emit, 2);
c[0] = b1;
c[1] = b2;
@@ -550,7 +549,6 @@ void mp_emit_bc_load_null(emit_t *emit) {
void mp_emit_bc_load_fast(emit_t *emit, qstr qst, mp_uint_t local_num) {
(void)qst;
- assert(local_num >= 0);
emit_bc_pre(emit, 1);
if (local_num <= 15) {
emit_write_bytecode_byte(emit, MP_BC_LOAD_FAST_MULTI + local_num);
@@ -608,7 +606,6 @@ void mp_emit_bc_load_subscr(emit_t *emit) {
void mp_emit_bc_store_fast(emit_t *emit, qstr qst, mp_uint_t local_num) {
(void)qst;
- assert(local_num >= 0);
emit_bc_pre(emit, -1);
if (local_num <= 15) {
emit_write_bytecode_byte(emit, MP_BC_STORE_FAST_MULTI + local_num);
@@ -927,7 +924,7 @@ void mp_emit_bc_return_value(emit_t *emit) {
}
void mp_emit_bc_raise_varargs(emit_t *emit, mp_uint_t n_args) {
- assert(0 <= n_args && n_args <= 2);
+ assert(n_args <= 2);
emit_bc_pre(emit, -n_args);
emit_write_bytecode_byte_byte(emit, MP_BC_RAISE_VARARGS, n_args);
}