mirror of
https://gitee.com/Lyon1998/pikapython.git
synced 2025-01-29 17:22:56 +08:00
add Bx for default RET ins
This commit is contained in:
parent
1c1692e759
commit
6d0a43aa80
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/ci_benchmark.sh
Normal file → Executable file
0
port/linux/ci_benchmark.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/install_dependency.sh
Normal file → Executable file
0
port/linux/install_dependency.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/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/run.sh
Normal file → Executable file
0
port/linux/run.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
@ -723,6 +723,7 @@ TEST(parser, def_add) {
|
||||
"1 REF a\n"
|
||||
"1 REF b\n"
|
||||
"0 OPT +\n"
|
||||
"B1\n"
|
||||
"0 RET\n"
|
||||
"B0\n"
|
||||
);
|
||||
@ -750,6 +751,7 @@ TEST(parser, def_add_return) {
|
||||
"1 REF b\n"
|
||||
"0 OPT +\n"
|
||||
"0 RET\n"
|
||||
"B1\n"
|
||||
"0 RET\n"
|
||||
"B0\n"
|
||||
);
|
||||
@ -783,6 +785,7 @@ TEST(parser, def_while_return) {
|
||||
"0 RET\n"
|
||||
"B1\n"
|
||||
"0 JMP -1\n"
|
||||
"B1\n"
|
||||
"0 RET\n"
|
||||
"B0\n"
|
||||
);
|
||||
@ -813,6 +816,7 @@ TEST(parser, def_while_return_void) {
|
||||
"0 RET\n"
|
||||
"B1\n"
|
||||
"0 JMP -1\n"
|
||||
"B1\n"
|
||||
"0 RET\n"
|
||||
"B0\n"
|
||||
);
|
||||
|
0
port/linux/update-compiler.sh
Normal file → Executable file
0
port/linux/update-compiler.sh
Normal file → Executable file
@ -1159,6 +1159,7 @@ char* AST_toPikaAsm(AST* ast, Args* buffs) {
|
||||
}
|
||||
/* return when exit method */
|
||||
if (strEqu(blockType, "def")) {
|
||||
pikaAsm = ASM_addBlockDeepth(ast, buffs, pikaAsm, 1);
|
||||
pikaAsm = strsAppend(buffs, pikaAsm, (char*)"0 RET\n");
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user