mirror of
https://gitee.com/Lyon1998/pikapython.git
synced 2025-01-29 17:22:56 +08:00
not GC in 'for' loop
This commit is contained in:
parent
d49d6c809a
commit
10662a9a90
0
port/linux/api-make-linux.sh
Normal file → Executable file
0
port/linux/api-make-linux.sh
Normal file → Executable file
0
port/linux/api-make-win10.sh
Normal file → Executable file
0
port/linux/api-make-win10.sh
Normal file → Executable file
0
port/linux/api-make.sh
Normal file → Executable file
0
port/linux/api-make.sh
Normal file → Executable file
0
port/linux/gtest.sh
Normal file → Executable file
0
port/linux/gtest.sh
Normal file → Executable file
0
port/linux/init.sh
Normal file → Executable file
0
port/linux/init.sh
Normal file → Executable file
0
port/linux/make.sh
Normal file → Executable file
0
port/linux/make.sh
Normal file → Executable file
0
port/linux/package/pikascript/rust-msc-latest-linux
Normal file → Executable file
0
port/linux/package/pikascript/rust-msc-latest-linux
Normal file → Executable file
0
port/linux/pkg-push.sh
Normal file → Executable file
0
port/linux/pkg-push.sh
Normal file → Executable file
0
port/linux/pull-core.sh
Normal file → Executable file
0
port/linux/pull-core.sh
Normal file → Executable file
0
port/linux/push-core.sh
Normal file → Executable file
0
port/linux/push-core.sh
Normal file → Executable file
0
port/linux/test-banchmark.sh
Normal file → Executable file
0
port/linux/test-banchmark.sh
Normal file → Executable file
@ -1400,8 +1400,6 @@ TEST(parser, for_list) {
|
||||
"B0\n"
|
||||
"0 JMP -1\n"
|
||||
"B0\n"
|
||||
"0 PGC __list0\n"
|
||||
"B0\n"
|
||||
);
|
||||
stack_deinit(bs);
|
||||
args_deinit(bf);
|
||||
|
0
port/linux/update-compiler.sh
Normal file → Executable file
0
port/linux/update-compiler.sh
Normal file → Executable file
@ -1007,14 +1007,15 @@ char* AST_toPikaAsm(AST* ast, Args* buffs) {
|
||||
if (strEqu(blockType, "for")) {
|
||||
pikaAsm = ASM_addBlockDeepth(ast, buffs, pikaAsm, blockTypeNum);
|
||||
pikaAsm = strsAppend(buffs, pikaAsm, (char*)"0 JMP -1\n");
|
||||
pikaAsm = ASM_addBlockDeepth(ast, buffs, pikaAsm, blockTypeNum);
|
||||
char* __list_x = strsCopy(buffs, "__list");
|
||||
char block_deepth_str[] = "0";
|
||||
block_deepth_str[0] += obj_getInt(ast, "blockDeepth");
|
||||
__list_x = strsAppend(runBuffs, __list_x, block_deepth_str);
|
||||
pikaAsm = strsAppend(buffs, pikaAsm, (char*)"0 PGC ");
|
||||
pikaAsm = strsAppend(buffs, pikaAsm, (char*)__list_x);
|
||||
pikaAsm = strsAppend(buffs, pikaAsm, (char*)"\n");
|
||||
/* garbage collect for the list */
|
||||
// pikaAsm = ASM_addBlockDeepth(ast, buffs, pikaAsm, blockTypeNum);
|
||||
// char* __list_x = strsCopy(buffs, "__list");
|
||||
// char block_deepth_str[] = "0";
|
||||
// block_deepth_str[0] += obj_getInt(ast, "blockDeepth");
|
||||
// __list_x = strsAppend(runBuffs, __list_x, block_deepth_str);
|
||||
// pikaAsm = strsAppend(buffs, pikaAsm, (char*)"0 PGC ");
|
||||
// pikaAsm = strsAppend(buffs, pikaAsm, (char*)__list_x);
|
||||
// pikaAsm = strsAppend(buffs, pikaAsm, (char*)"\n");
|
||||
}
|
||||
/* return when exit method */
|
||||
if (strEqu(blockType, "def")) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user