mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-20 11:30:18 +00:00
remove some TODOs
This commit is contained in:
parent
e936f349a0
commit
5dcd7febe7
@ -934,7 +934,6 @@ public:
|
||||
this->lexer = std::make_unique<Lexer>(
|
||||
make_sp<SourceData>(source, filename, mode)
|
||||
);
|
||||
// TODO: check if already initialized
|
||||
init_pratt_rules();
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
3
src/vm.h
3
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)){
|
||||
|
Loading…
x
Reference in New Issue
Block a user