Explorar o código

js: Exit the program after dumping and/or running bytecode

Otherwise we'd run the same program again in the AST interpreter.
Andreas Kling %!s(int64=4) %!d(string=hai) anos
pai
achega
b609fc6d51
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      Userland/Utilities/js.cpp

+ 2 - 0
Userland/Utilities/js.cpp

@@ -505,6 +505,8 @@ static bool parse_and_run(JS::Interpreter& interpreter, const StringView& source
             JS::Bytecode::Interpreter bytecode_interpreter(interpreter.global_object());
             JS::Bytecode::Interpreter bytecode_interpreter(interpreter.global_object());
             bytecode_interpreter.run(*block);
             bytecode_interpreter.run(*block);
         }
         }
+
+        return true;
     }
     }
 
 
     if (parser.has_errors()) {
     if (parser.has_errors()) {