fix a bug

This commit is contained in:
blueloveTH 2023-02-27 17:33:01 +08:00
parent 4eff4ea076
commit f67861b24e
3 changed files with 4 additions and 2 deletions

View File

@ -55,7 +55,7 @@ PyVar VM::run_frame(Frame* frame){
if(byte.op == OP_FAST_INDEX) frame->push(ref.get(this, frame));
else frame->push(PyRef(ref));
} continue;
case OP_ROT_TWO: std::swap(frame->top(), frame->top_1()); continue;
case OP_ROT_TWO: ::std::swap(frame->top(), frame->top_1()); continue;
case OP_STORE_REF: {
// PyVar obj = frame->pop_value(this);
// PyVarRef r = frame->pop();

View File

@ -26,6 +26,7 @@
#include <map>
#include <set>
#include <algorithm>
#include <fstream>
#define PK_VERSION "0.9.1"
@ -43,6 +44,8 @@ typedef double f64;
namespace pkpy{
namespace std = ::std;
struct Dummy { };
struct DummyInstance { };
struct DummyModule { };

View File

@ -615,7 +615,6 @@ void add_module_dis(VM* vm){
});
}
#include <fstream>
struct FileIO {
PY_CLASS(io, FileIO)