mirror of
https://gitee.com/Lyon1998/pikapython.git
synced 2025-01-15 17:02:53 +08:00
pikaVM run is tested ok
This commit is contained in:
parent
966f445a33
commit
23094dc2e9
2
port/linux/.vscode/launch.json
vendored
2
port/linux/.vscode/launch.json
vendored
@ -13,7 +13,7 @@
|
||||
"args": [
|
||||
// "--gtest_filter=object_test.test2"
|
||||
// "--gtest_filter=parser*"
|
||||
// "--gtest_filter=VM.a_1d1"
|
||||
"--gtest_filter=VM.Run_add_1_2_3"
|
||||
// "--gtest_filter=block.ifrun2"
|
||||
// "--gtest_filter=sysObj.print"
|
||||
// "--gtest_filter=object_test.a_b"
|
||||
|
@ -164,6 +164,13 @@ nextLine:
|
||||
return nextAddr;
|
||||
}
|
||||
|
||||
int32_t pikaVM_run(PikaObj* self, char* pyLine) {
|
||||
Args* buffs = New_strBuff();
|
||||
pikaVM_runAsm(self, pikaParseToAsm(buffs, pyLine));
|
||||
args_deinit(buffs);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t pikaVM_runAsm(PikaObj* self, char* pikaAsm) {
|
||||
int lineAddr = 0;
|
||||
int size = strGetSize(pikaAsm);
|
||||
|
@ -2,7 +2,7 @@
|
||||
#define __PIKA__VM__H
|
||||
#include "PikaObj.h"
|
||||
|
||||
int32_t pikaVM_run(PikaObj* self, char* pikaAsm, int32_t lineAddr);
|
||||
int32_t pikaVM_run(PikaObj* self, char* pyLine);
|
||||
int32_t pikaVM_runAsm(PikaObj* self, char* pikaAsm);
|
||||
|
||||
#endif
|
Loading…
x
Reference in New Issue
Block a user