@@ -605,9 +605,9 @@ void ASTInterpreter::doStore(AST_expr* node, STOLEN(Value) value) {
605605Value ASTInterpreter::getNone () {
606606 RewriterVar* v = NULL ;
607607 if (jit) {
608- v = jit->imm (None )->setType (RefType::BORROWED);
608+ v = jit->imm (Py_None )->setType (RefType::BORROWED);
609609 }
610- return Value (incref (None ), v);
610+ return Value (incref (Py_None ), v);
611611}
612612
613613Value ASTInterpreter::visit_unaryop (AST_UnaryOp* node) {
@@ -783,7 +783,7 @@ Box* ASTInterpreter::doOSR(AST_Jump* node) {
783783 // TODO: maybe use a different placeholder (=NULL)?
784784 // - new issue with that -- we can no longer distinguish NULL from unset-in-sorted_symbol_table
785785 // Currently we pass None because the LLVM jit will decref this value even though it may not be set.
786- static Box* const VAL_UNDEFINED = (Box*)None ;
786+ static Box* const VAL_UNDEFINED = (Box*)Py_None ;
787787
788788 const VRegSet& defined = phis->definedness .getDefinedVregsAtEnd (current_block);
789789 for (int vreg : defined ) {
@@ -1915,8 +1915,8 @@ Box* ASTInterpreterJitInterface::landingpadHelper(void* _interpreter) {
19151915 ASTInterpreter* interpreter = (ASTInterpreter*)_interpreter;
19161916 ExcInfo& last_exception = interpreter->last_exception ;
19171917 Box* type = last_exception.type ;
1918- Box* value = last_exception.value ? last_exception.value : None ;
1919- Box* traceback = last_exception.traceback ? last_exception.traceback : None ;
1918+ Box* value = last_exception.value ? last_exception.value : Py_None ;
1919+ Box* traceback = last_exception.traceback ? last_exception.traceback : Py_None ;
19201920 Box* rtn = BoxedTuple::create ({ type, value, traceback });
19211921 Py_CLEAR (last_exception.type );
19221922 Py_CLEAR (last_exception.value );
@@ -2080,7 +2080,7 @@ Box* astInterpretFunction(FunctionMetadata* md, Box* closure, Box* generator, Bo
20802080
20812081 interpreter.initArguments ((BoxedClosure*)closure, (BoxedGenerator*)generator, arg1, arg2, arg3, args);
20822082 Box* v = ASTInterpreter::execute (interpreter);
2083- return v ? v : incref (None );
2083+ return v ? v : incref (Py_None );
20842084}
20852085
20862086Box* astInterpretFunctionEval (FunctionMetadata* md, Box* globals, Box* boxedLocals) {
@@ -2113,7 +2113,7 @@ Box* astInterpretFunctionEval(FunctionMetadata* md, Box* globals, Box* boxedLoca
21132113 interpreter.setGlobals (globals);
21142114
21152115 Box* v = ASTInterpreter::execute (interpreter);
2116- return v ? v : incref (None );
2116+ return v ? v : incref (Py_None );
21172117}
21182118
21192119// caution when changing the function arguments: this function gets called from an assembler wrapper!
@@ -2220,7 +2220,7 @@ extern "C" Box* astInterpretDeoptFromASM(FunctionMetadata* md, AST_expr* after_e
22202220 Py_CLEAR (frame_state.locals );
22212221
22222222 Box* v = ASTInterpreter::execute (interpreter, start_block, starting_statement);
2223- return v ? v : incref (None );
2223+ return v ? v : incref (Py_None );
22242224}
22252225
22262226extern " C" void printExprHelper (Box* obj) {
0 commit comments