mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-22 20:40:18 +00:00
some fix
This commit is contained in:
parent
6099e62314
commit
1b2fae94eb
@ -287,14 +287,16 @@ public:
|
||||
|
||||
template<typename... Args>
|
||||
PyVar call(PyVar callable, Args&&... args){
|
||||
PUSH(callable); PUSH(PY_NULL);
|
||||
s_data.push(callable);
|
||||
s_data.emplace(PY_NULL);
|
||||
__push_varargs(args...);
|
||||
return vectorcall(sizeof...(args));
|
||||
}
|
||||
|
||||
template<typename... Args>
|
||||
PyVar call_method(PyVar self, PyVar callable, Args&&... args){
|
||||
PUSH(callable); PUSH(self);
|
||||
s_data.push(callable);
|
||||
s_data.push(self);
|
||||
__push_varargs(args...);
|
||||
return vectorcall(sizeof...(args));
|
||||
}
|
||||
|
@ -173,7 +173,7 @@ __NEXT_STEP:
|
||||
}
|
||||
PUSH(obj);
|
||||
} DISPATCH()
|
||||
case OP_LOAD_NULL: PUSH(PY_NULL); DISPATCH()
|
||||
case OP_LOAD_NULL: s_data.emplace(PY_NULL); DISPATCH()
|
||||
/*****************************************/
|
||||
case OP_LOAD_FAST: {
|
||||
PyVar _0 = frame->_locals[byte.arg];
|
||||
|
@ -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);
|
||||
PUSH(PY_NULL);
|
||||
s_data.emplace(PY_NULL);
|
||||
PUSH(callable); // cls
|
||||
for(PyVar o: args) PUSH(o);
|
||||
for(PyVar o: kwargs) PUSH(o);
|
||||
|
Loading…
x
Reference in New Issue
Block a user