diff --git a/src/compiler.h b/src/compiler.h index 77d33c3f..1bc1daf8 100644 --- a/src/compiler.h +++ b/src/compiler.h @@ -934,7 +934,6 @@ public: this->lexer = std::make_unique( make_sp(source, filename, mode) ); - // TODO: check if already initialized init_pratt_rules(); } diff --git a/src/str.h b/src/str.h index 41371d20..2232c86d 100644 --- a/src/str.h +++ b/src/str.h @@ -6,7 +6,6 @@ namespace pkpy { -// TODO: check error if return 0 inline int utf8len(unsigned char c, bool suppress=false){ if((c & 0b10000000) == 0) return 1; if((c & 0b11100000) == 0b11000000) return 2; @@ -244,7 +243,6 @@ struct Str{ /*************unicode*************/ - // TODO: check error int _unicode_index_to_byte(int i) const{ if(is_ascii) return i; int j = 0; diff --git a/src/vm.h b/src/vm.h index e00aa69a..39054278 100644 --- a/src/vm.h +++ b/src/vm.h @@ -736,6 +736,7 @@ inline PyObject* VM::call(PyObject* callable, Args args, const Args& kwargs, boo } if(is_type(callable, tp_type)){ + // TODO: use get_unbound_method here PyObject* new_f = callable->attr().try_get(__new__); PyObject* obj; if(new_f != nullptr){ @@ -776,7 +777,6 @@ inline void VM::unpack_args(Args& args){ // https://docs.python.org/3/howto/descriptor.html#invocation-from-an-instance inline PyObject* VM::getattr(PyObject* obj, StrName name, bool throw_err){ - // TODO: class_only impl may not be correct PyObject* objtype = _t(obj); // handle super() proxy if(is_type(obj, tp_super)){ @@ -810,7 +810,6 @@ inline PyObject* VM::getattr(PyObject* obj, StrName name, bool throw_err){ // try to load a unbound method (fallback to `getattr` if not found) inline PyObject* VM::get_unbound_method(PyObject* obj, StrName name, PyObject** self, bool throw_err, bool fallback){ *self = _py_null; - // TODO: class_only impl may not be correct PyObject* objtype = _t(obj); // handle super() proxy if(is_type(obj, tp_super)){