mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-20 03:20:18 +00:00
...
This commit is contained in:
parent
866abe2c63
commit
42a7d02286
@ -49,7 +49,7 @@ static cJSON* convert_python_object_to_cjson(PyObject* obj, VM* vm){
|
||||
return cJSON_CreateNull();
|
||||
}
|
||||
vm->TypeError(fmt("unrecognized type ", obj_type_name(vm, obj_t).escape()));
|
||||
PK_UNREACHABLE();
|
||||
PK_UNREACHABLE()
|
||||
}
|
||||
|
||||
|
||||
|
@ -66,10 +66,10 @@
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#define PK_ENABLE_COMPUTED_GOTO 0
|
||||
#define PK_UNREACHABLE() __assume(0)
|
||||
#define PK_UNREACHABLE() __assume(0);
|
||||
#else
|
||||
#define PK_ENABLE_COMPUTED_GOTO 1
|
||||
#define PK_UNREACHABLE() __builtin_unreachable()
|
||||
#define PK_UNREACHABLE() __builtin_unreachable();
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -49,7 +49,7 @@ struct SmallNameDict{
|
||||
return true;
|
||||
}
|
||||
)
|
||||
PK_UNREACHABLE();
|
||||
PK_UNREACHABLE()
|
||||
}
|
||||
|
||||
V try_get(K key) const {
|
||||
|
@ -854,7 +854,7 @@ __NEXT_STEP:;
|
||||
#undef DISPATCH_OP_CALL
|
||||
#undef CEVAL_STEP
|
||||
/**********************************************************************/
|
||||
PK_UNREACHABLE();
|
||||
PK_UNREACHABLE()
|
||||
}catch(HandledException){
|
||||
continue;
|
||||
}catch(UnhandledException){
|
||||
|
@ -111,7 +111,7 @@ namespace pkpy{
|
||||
return index;
|
||||
}
|
||||
}
|
||||
PK_UNREACHABLE();
|
||||
PK_UNREACHABLE()
|
||||
}
|
||||
|
||||
int CodeEmitContext::add_func_decl(FuncDecl_ decl){
|
||||
@ -626,7 +626,7 @@ namespace pkpy{
|
||||
case TK("!="): ctx->emit_(OP_COMPARE_NE, BC_NOARG, line); break;
|
||||
case TK(">"): ctx->emit_(OP_COMPARE_GT, BC_NOARG, line); break;
|
||||
case TK(">="): ctx->emit_(OP_COMPARE_GE, BC_NOARG, line); break;
|
||||
default: PK_UNREACHABLE();
|
||||
default: PK_UNREACHABLE()
|
||||
}
|
||||
// [b, RES]
|
||||
int index = ctx->emit_(OP_SHORTCUT_IF_FALSE_OR_POP, BC_NOARG, line);
|
||||
|
@ -466,7 +466,7 @@ i64 VM::py_hash(PyObject* obj){
|
||||
}
|
||||
if(has_custom_eq){
|
||||
TypeError(fmt("unhashable type: ", ti->name.escape()));
|
||||
PK_UNREACHABLE();
|
||||
PK_UNREACHABLE()
|
||||
}else{
|
||||
return PK_BITS(obj);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user