mirror of
https://gitee.com/Lyon1998/pikapython.git
synced 2025-02-05 17:28:23 +08:00
cache bytecode before run
This commit is contained in:
parent
d2f69c76ef
commit
b8c88066a7
@ -1071,12 +1071,12 @@ void obj_shellLineProcess(PikaObj* self, ShellConfig* cfg) {
|
|||||||
__platform_printf("\r\n=============== [Code] ===============\r\n");
|
__platform_printf("\r\n=============== [Code] ===============\r\n");
|
||||||
__platform_printf("[ Info] Bytecode size: %d\r\n", size);
|
__platform_printf("[ Info] Bytecode size: %d\r\n", size);
|
||||||
__platform_printf("=============== [ RUN] ===============\r\n");
|
__platform_printf("=============== [ RUN] ===============\r\n");
|
||||||
pikaVM_runByteCode(self, buff);
|
|
||||||
char bytecode_buff_name[] = "@bc1";
|
char bytecode_buff_name[] = "@bc1";
|
||||||
bytecode_buff_name[3] = '0' + bytecode_index;
|
bytecode_buff_name[3] = '0' + bytecode_index;
|
||||||
bytecode_index++;
|
bytecode_index++;
|
||||||
obj_setBytes(self, bytecode_buff_name, buff, size);
|
obj_setBytes(self, bytecode_buff_name, buff, size);
|
||||||
pikaFree(buff, size);
|
pikaFree(buff, size);
|
||||||
|
pikaVM_runByteCode(self, obj_getBytes(self, bytecode_buff_name));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user