Lines Matching refs:ip
47 #define TRACE(ip) TRACE_PREFIX; mp_bytecode_print2(&mp_plat_print, ip, 1, code_state->fun_bc->const… argument
49 #define TRACE(ip) argument
62 unum = (unum << 7) + (*ip & 0x7f); \
63 } while ((*ip++ & 0x80) != 0)
64 #define DECODE_ULABEL size_t ulab = (ip[0] | (ip[1] << 8)); ip += 2
65 #define DECODE_SLABEL size_t slab = (ip[0] | (ip[1] << 8)) - 0x8000; ip += 2
70 qstr qst = ip[0] | ip[1] << 8; \
71 ip += 2;
83 qst = (qst << 7) + (*ip & 0x7f); \
84 } while ((*ip++ & 0x80) != 0)
86 ip = (byte*)MP_ALIGN(ip, sizeof(void*)); \
87 void *ptr = *(void**)ip; \
88 ip += sizeof(void*)
90 ip = (byte*)MP_ALIGN(ip, sizeof(mp_obj_t)); \
91 mp_obj_t obj = *(mp_obj_t*)ip; \
92 ip += sizeof(mp_obj_t)
110 exc_sp->handler = ip + ulab; \
168 MP_PROF_INSTR_DEBUG_PRINT(code_state->ip); \
209 #define MARK_EXC_IP_SELECTIVE() { code_state->ip = ip; } /* stores ip 1 byte past last opcode */ in mp_execute_bytecode()
213 #define MARK_EXC_IP_GLOBAL() { code_state->ip = ip; } /* stores ip pointing to last opcode */ in mp_execute_bytecode()
218 TRACE(ip); \ in mp_execute_bytecode()
220 TRACE_TICK(ip, sp, false); \ in mp_execute_bytecode()
221 goto *entry_table[*ip++]; \ in mp_execute_bytecode()
273 const byte *ip = code_state->ip; in mp_execute_bytecode() local
283 if (inject_exc != MP_OBJ_NULL && *ip != MP_BC_YIELD_FROM) { in mp_execute_bytecode()
296 TRACE(ip); in mp_execute_bytecode()
298 TRACE_TICK(ip, sp, false); in mp_execute_bytecode()
299 switch (*ip++) { in mp_execute_bytecode()
316 if ((ip[0] & 0x40) != 0) { in mp_execute_bytecode()
321 num = (num << 7) | (*ip & 0x7f); in mp_execute_bytecode()
322 } while ((*ip++ & 0x80) != 0); in mp_execute_bytecode()
375 … mp_map_elem_t *elem = mp_map_cached_lookup(&mp_locals_get()->map, qst, (uint8_t*)ip); in mp_execute_bytecode()
383 ip++; in mp_execute_bytecode()
399 … mp_map_elem_t *elem = mp_map_cached_lookup(&mp_globals_get()->map, qst, (uint8_t*)ip); in mp_execute_bytecode()
407 ip++; in mp_execute_bytecode()
429 elem = mp_map_cached_lookup(&self->members, qst, (uint8_t*)ip); in mp_execute_bytecode()
438 ip++; in mp_execute_bytecode()
520 elem = mp_map_cached_lookup(&self->members, qst, (uint8_t*)ip); in mp_execute_bytecode()
528 ip++; in mp_execute_bytecode()
606 ip += slab; in mp_execute_bytecode()
613 ip += slab; in mp_execute_bytecode()
621 ip += slab; in mp_execute_bytecode()
629 ip += slab; in mp_execute_bytecode()
641 ip += slab; in mp_execute_bytecode()
716 … PUSH((mp_obj_t)(mp_uint_t)(uintptr_t)(ip + slab)); // push destination ip for jump in mp_execute_bytecode()
717 …PUSH((mp_obj_t)(mp_uint_t)(*ip)); // push number of exception handlers to unwind (0x80 bit set if … in mp_execute_bytecode()
725 if (exc_sp->handler > ip) { in mp_execute_bytecode()
739 ip = exc_sp->handler; in mp_execute_bytecode()
748 ip = (const byte*)MP_OBJ_TO_PTR(POP()); // pop destination ip for jump in mp_execute_bytecode()
760 PUSH_EXC_BLOCK((code_state->ip[-1] == MP_BC_SETUP_FINALLY) ? 1 : 0); in mp_execute_bytecode()
762 PUSH_EXC_BLOCK((code_state->ip[0] == MP_BC_SETUP_FINALLY) ? 1 : 0); in mp_execute_bytecode()
832 ip += ulab; // jump to after for-block in mp_execute_bytecode()
849 ip += ulab; in mp_execute_bytecode()
896 if (*ip++ == 3) { in mp_execute_bytecode()
958 size_t n_closed_over = *ip++; in mp_execute_bytecode()
967 size_t n_closed_over = *ip++; in mp_execute_bytecode()
983 code_state->ip = ip; in mp_execute_bytecode()
1020 code_state->ip = ip; in mp_execute_bytecode()
1064 code_state->ip = ip; in mp_execute_bytecode()
1105 code_state->ip = ip; in mp_execute_bytecode()
1146 if (exc_sp->handler > ip) { in mp_execute_bytecode()
1165 ip = exc_sp->handler; in mp_execute_bytecode()
1231 code_state->ip = ip; in mp_execute_bytecode()
1256 ip--; in mp_execute_bytecode()
1301 …PUSH(MP_OBJ_NEW_SMALL_INT((mp_int_t)ip[-1] - MP_BC_LOAD_CONST_SMALL_INT_MULTI - MP_BC_LOAD_CONST_S… in mp_execute_bytecode()
1305 obj_shared = fastn[MP_BC_LOAD_FAST_MULTI - (mp_int_t)ip[-1]]; in mp_execute_bytecode()
1309 fastn[MP_BC_STORE_FAST_MULTI - (mp_int_t)ip[-1]] = POP(); in mp_execute_bytecode()
1314 SET_TOP(mp_unary_op(ip[-1] - MP_BC_UNARY_OP_MULTI, TOP())); in mp_execute_bytecode()
1321 SET_TOP(mp_binary_op(ip[-1] - MP_BC_BINARY_OP_MULTI, lhs, rhs)); in mp_execute_bytecode()
1329 … if (ip[-1] < MP_BC_LOAD_CONST_SMALL_INT_MULTI + MP_BC_LOAD_CONST_SMALL_INT_MULTI_NUM) { in mp_execute_bytecode()
1330 …PUSH(MP_OBJ_NEW_SMALL_INT((mp_int_t)ip[-1] - MP_BC_LOAD_CONST_SMALL_INT_MULTI - MP_BC_LOAD_CONST_S… in mp_execute_bytecode()
1332 } else if (ip[-1] < MP_BC_LOAD_FAST_MULTI + MP_BC_LOAD_FAST_MULTI_NUM) { in mp_execute_bytecode()
1333 obj_shared = fastn[MP_BC_LOAD_FAST_MULTI - (mp_int_t)ip[-1]]; in mp_execute_bytecode()
1335 } else if (ip[-1] < MP_BC_STORE_FAST_MULTI + MP_BC_STORE_FAST_MULTI_NUM) { in mp_execute_bytecode()
1336 fastn[MP_BC_STORE_FAST_MULTI - (mp_int_t)ip[-1]] = POP(); in mp_execute_bytecode()
1338 } else if (ip[-1] < MP_BC_UNARY_OP_MULTI + MP_BC_UNARY_OP_MULTI_NUM) { in mp_execute_bytecode()
1339 SET_TOP(mp_unary_op(ip[-1] - MP_BC_UNARY_OP_MULTI, TOP())); in mp_execute_bytecode()
1341 } else if (ip[-1] < MP_BC_BINARY_OP_MULTI + MP_BC_BINARY_OP_MULTI_NUM) { in mp_execute_bytecode()
1344 SET_TOP(mp_binary_op(ip[-1] - MP_BC_BINARY_OP_MULTI, lhs, rhs)); in mp_execute_bytecode()
1426 code_state->ip -= 1; in mp_execute_bytecode()
1430 if (code_state->ip) { in mp_execute_bytecode()
1432 if (*code_state->ip == MP_BC_FOR_ITER) { in mp_execute_bytecode()
1433 const byte *ip = code_state->ip + 1; in mp_execute_bytecode() local
1435 code_state->ip = ip + ulab; // jump to after for-block in mp_execute_bytecode()
1438 } else if (*code_state->ip == MP_BC_YIELD_FROM) { in mp_execute_bytecode()
1443 code_state->ip++; // yield from is over, move to next instruction in mp_execute_bytecode()
1452 TRACE_TICK(code_state->ip, code_state->sp, true /* yes, it's an exception */); in mp_execute_bytecode()
1464 && *code_state->ip != MP_BC_END_FINALLY in mp_execute_bytecode()
1465 && *code_state->ip != MP_BC_RAISE_LAST) { in mp_execute_bytecode()
1466 const byte *ip = code_state->fun_bc->bytecode; in mp_execute_bytecode() local
1467 MP_BC_PRELUDE_SIG_DECODE(ip); in mp_execute_bytecode()
1468 MP_BC_PRELUDE_SIZE_DECODE(ip); in mp_execute_bytecode()
1469 const byte *bytecode_start = ip + n_info + n_cell; in mp_execute_bytecode()
1474 size_t bc = code_state->ip - bytecode_start; in mp_execute_bytecode()
1476 qstr block_name = ip[0] | (ip[1] << 8); in mp_execute_bytecode()
1477 qstr source_file = ip[2] | (ip[3] << 8); in mp_execute_bytecode()
1478 ip += 4; in mp_execute_bytecode()
1480 qstr block_name = mp_decode_uint_value(ip); in mp_execute_bytecode()
1481 ip = mp_decode_uint_skip(ip); in mp_execute_bytecode()
1482 qstr source_file = mp_decode_uint_value(ip); in mp_execute_bytecode()
1483 ip = mp_decode_uint_skip(ip); in mp_execute_bytecode()
1485 size_t source_line = mp_bytecode_get_source_line(ip, bc); in mp_execute_bytecode()
1489 while (exc_sp >= exc_stack && exc_sp->handler <= code_state->ip) { in mp_execute_bytecode()
1504 code_state->ip = exc_sp->handler; in mp_execute_bytecode()