Revert "some fix"

This reverts commit 1b2fae94ebff1aac5bc300eb512f620d0105fc94.
This commit is contained in:
blueloveTH 2024-05-24 23:21:06 +08:00
parent 1b2fae94eb
commit 098dab4707
3 changed files with 4 additions and 6 deletions

View File

@ -287,16 +287,14 @@ public:
template<typename... Args>
PyVar call(PyVar callable, Args&&... args){
s_data.push(callable);
s_data.emplace(PY_NULL);
PUSH(callable); PUSH(PY_NULL);
__push_varargs(args...);
return vectorcall(sizeof...(args));
}
template<typename... Args>
PyVar call_method(PyVar self, PyVar callable, Args&&... args){
s_data.push(callable);
s_data.push(self);
PUSH(callable); PUSH(self);
__push_varargs(args...);
return vectorcall(sizeof...(args));
}

View File

@ -173,7 +173,7 @@ __NEXT_STEP:
}
PUSH(obj);
} DISPATCH()
case OP_LOAD_NULL: s_data.emplace(PY_NULL); DISPATCH()
case OP_LOAD_NULL: PUSH(PY_NULL); DISPATCH()
/*****************************************/
case OP_LOAD_FAST: {
PyVar _0 = frame->_locals[byte.arg];

View File

@ -1107,7 +1107,7 @@ PyVar VM::vectorcall(int ARGC, int KWARGC, bool op_call){
obj = vm->new_object<DummyInstance>(PK_OBJ_GET(Type, callable));
}else{
PUSH(new_f);
s_data.emplace(PY_NULL);
PUSH(PY_NULL);
PUSH(callable); // cls
for(PyVar o: args) PUSH(o);
for(PyVar o: kwargs) PUSH(o);