summaryrefslogtreecommitdiffstatshomepage
path: root/py/emitnative.c
diff options
context:
space:
mode:
Diffstat (limited to 'py/emitnative.c')
-rw-r--r--py/emitnative.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/py/emitnative.c b/py/emitnative.c
index af8b35f45d..e96b12271a 100644
--- a/py/emitnative.c
+++ b/py/emitnative.c
@@ -308,8 +308,8 @@ STATIC void emit_native_set_source_line(emit_t *emit, int source_line) {
STATIC void adjust_stack(emit_t *emit, int stack_size_delta) {
DEBUG_printf("adjust stack: stack:%d + delta:%d\n", emit->stack_size, stack_size_delta);
+ assert((int)emit->stack_size + stack_size_delta >= 0);
emit->stack_size += stack_size_delta;
- assert(emit->stack_size >= 0);
if (emit->pass > PASS_1 && emit->stack_size > emit->scope->stack_size) {
emit->scope->stack_size = emit->stack_size;
}
@@ -704,7 +704,7 @@ STATIC void emit_native_load_const_verbatim_str(emit_t *emit, const char *str) {
assert(0);
}
-STATIC void emit_native_load_fast(emit_t *emit, qstr qstr, int local_num) {
+STATIC void emit_native_load_fast(emit_t *emit, qstr qstr, uint id_flags, int local_num) {
vtype_kind_t vtype = emit->local_vtype[local_num];
if (vtype == VTYPE_UNBOUND) {
printf("ViperTypeError: local %s used before type known\n", qstr_str(qstr));
@@ -1200,9 +1200,9 @@ STATIC void emit_native_make_closure(emit_t *emit, scope_t *scope, uint n_pos_de
assert(0);
}
-STATIC void emit_native_call_function(emit_t *emit, int n_positional, int n_keyword, bool have_star_arg, bool have_dbl_star_arg) {
+STATIC void emit_native_call_function(emit_t *emit, int n_positional, int n_keyword, uint star_flags) {
// call special viper runtime routine with type info for args, and wanted type info for return
- assert(!have_star_arg && !have_dbl_star_arg);
+ assert(!star_flags);
/* we no longer have these _n specific call_function's
* they anyway push args into an array
@@ -1239,8 +1239,8 @@ STATIC void emit_native_call_function(emit_t *emit, int n_positional, int n_keyw
emit_post_push_reg(emit, VTYPE_PYOBJ, REG_RET);
}
-STATIC void emit_native_call_method(emit_t *emit, int n_positional, int n_keyword, bool have_star_arg, bool have_dbl_star_arg) {
- assert(!have_star_arg && !have_dbl_star_arg);
+STATIC void emit_native_call_method(emit_t *emit, int n_positional, int n_keyword, uint star_flags) {
+ assert(!star_flags);
/*
if (n_positional == 0) {