1 Star 0 Fork 86

Wu526/pythonvm

forked from hinus/pythonvm 
Create your Gitee Account
Explore and code with more than 14 million developers,Free private repositories !:)
Sign up
文件
Clone or Download
main.cpp 554 Bytes
Copy Edit Raw Blame History
hinus authored 2018-10-03 00:06 +08:00 . add gc
#include "util/bufferedInputStream.hpp"
#include "code/binaryFileParser.hpp"
#include "runtime/interpreter.hpp"
#include "runtime/universe.hpp"
#include "memory/heap.hpp"
int main(int argc, char** argv) {
if (argc <= 1) {
printf("vm need a parameter : filename\n");
return 0;
}
Universe::genesis();
BufferedInputStream stream(argv[1]);
BinaryFileParser parser(&stream);
Universe::main_code = parser.parse();
Universe::heap->gc();
Interpreter::get_instance()->run(Universe::main_code);
return 0;
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/wu526/pythonvm.git
git@gitee.com:wu526/pythonvm.git
wu526
pythonvm
pythonvm
master

Search