pikaVM run is tested ok

This commit is contained in:
lyon1998 2021-10-14 23:45:36 +08:00
parent 966f445a33
commit 23094dc2e9
3 changed files with 9 additions and 2 deletions

View File

@ -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"

View File

@ -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);

View File

@ -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