Lines Matching refs:ip

129 STATIC byte *extract_prelude(const byte **ip, bytecode_prelude_t *prelude) {  in extract_prelude()  argument
130 MP_BC_PRELUDE_SIG_DECODE(*ip); in extract_prelude()
137 MP_BC_PRELUDE_SIZE_DECODE(*ip); in extract_prelude()
138 byte *ip_info = (byte *)*ip; in extract_prelude()
139 *ip += n_info; in extract_prelude()
140 *ip += n_cell; in extract_prelude()
305 STATIC void load_prelude_qstrs(mp_reader_t *reader, qstr_window_t *qw, byte *ip) { in load_prelude_qstrs() argument
307 ip[0] = simple_name; in load_prelude_qstrs()
308 ip[1] = simple_name >> 8; in load_prelude_qstrs()
310 ip[2] = source_file; in load_prelude_qstrs()
311 ip[3] = source_file >> 8; in load_prelude_qstrs()
314 STATIC void load_prelude(mp_reader_t *reader, qstr_window_t *qw, byte **ip, bytecode_prelude_t *pre… in load_prelude() argument
316 byte *ip_read = *ip; in load_prelude()
321 extract_prelude((const byte **)ip, prelude); in load_prelude()
328 read_bytes(reader, ip_read, *ip - ip_read); in load_prelude()
331 STATIC void load_bytecode(mp_reader_t *reader, qstr_window_t *qw, byte *ip, byte *ip_top) { in load_bytecode() argument
332 while (ip < ip_top) { in load_bytecode()
333 *ip = read_byte(reader); in load_bytecode()
335 uint f = mp_opcode_format(ip, &sz, false); in load_bytecode()
336 ++ip; in load_bytecode()
340 *ip++ = qst; in load_bytecode()
341 *ip++ = qst >> 8; in load_bytecode()
344 while ((*ip++ = read_byte(reader)) & 0x80) { in load_bytecode()
347 read_bytes(reader, ip, sz); in load_bytecode()
348 ip += sz; in load_bytecode()
377 byte *ip = fun_data; in load_raw_code() local
378 load_prelude(reader, qw, &ip, &prelude); in load_raw_code()
381 load_bytecode(reader, qw, ip, fun_data + fun_data_len); in load_raw_code()
414 const byte *ip = fun_data + prelude_offset; in load_raw_code() local
415 byte *ip_info = extract_prelude(&ip, &prelude); in load_raw_code()
670 STATIC void save_prelude_qstrs(mp_print_t *print, qstr_window_t *qw, const byte *ip) { in save_prelude_qstrs() argument
671 save_qstr(print, qw, ip[0] | (ip[1] << 8)); // simple_name in save_prelude_qstrs()
672 save_qstr(print, qw, ip[2] | (ip[3] << 8)); // source_file in save_prelude_qstrs()
675 STATIC void save_bytecode(mp_print_t *print, qstr_window_t *qw, const byte *ip, const byte *ip_top)… in save_bytecode() argument
676 while (ip < ip_top) { in save_bytecode()
678 uint f = mp_opcode_format(ip, &sz, true); in save_bytecode()
680 mp_print_bytes(print, ip, 1); in save_bytecode()
681 qstr qst = ip[1] | (ip[2] << 8); in save_bytecode()
683 ip += 3; in save_bytecode()
686 mp_print_bytes(print, ip, sz); in save_bytecode()
687 ip += sz; in save_bytecode()
699 const byte *ip = rc->fun_data; in save_raw_code() local
700 const byte *ip_info = extract_prelude(&ip, &prelude); in save_raw_code()
706 mp_print_bytes(print, ip_info, ip - ip_info); in save_raw_code()
710 save_bytecode(print, qstr_window, ip, ip_top); in save_raw_code()
730 const byte *ip = (const byte *)rc->fun_data + rc->prelude_offset; in save_raw_code() local
731 const byte *ip_info = extract_prelude(&ip, &prelude); in save_raw_code()
782 const byte *ip = rc->fun_data; in mp_raw_code_has_native() local
784 extract_prelude(&ip, &prelude); in mp_raw_code_has_native()