| Index: src/interpreter/interpreter.cc
|
| diff --git a/src/interpreter/interpreter.cc b/src/interpreter/interpreter.cc
|
| index f513f0045ea5cee81d7e9fce807eaa30ea8cf4d5..25d678f118c4784f27d04c260c99dff6263c23a5 100644
|
| --- a/src/interpreter/interpreter.cc
|
| +++ b/src/interpreter/interpreter.cc
|
| @@ -33,7 +33,8 @@ typedef InterpreterAssembler::Arg Arg;
|
|
|
| class InterpreterCompilationJob final : public CompilationJob {
|
| public:
|
| - explicit InterpreterCompilationJob(CompilationInfo* info);
|
| + InterpreterCompilationJob(CompilationInfo* info,
|
| + ShouldCompile should_compile);
|
|
|
| protected:
|
| Status PrepareJobImpl() final;
|
| @@ -45,6 +46,8 @@ class InterpreterCompilationJob final : public CompilationJob {
|
|
|
| BytecodeGenerator generator_;
|
|
|
| + ShouldCompile should_compile_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(InterpreterCompilationJob);
|
| };
|
|
|
| @@ -150,8 +153,11 @@ int Interpreter::InterruptBudget() {
|
| return FLAG_interrupt_budget * kCodeSizeMultiplier;
|
| }
|
|
|
| -InterpreterCompilationJob::InterpreterCompilationJob(CompilationInfo* info)
|
| - : CompilationJob(info->isolate(), info, "Ignition"), generator_(info) {}
|
| +InterpreterCompilationJob::InterpreterCompilationJob(
|
| + CompilationInfo* info, ShouldCompile should_compile)
|
| + : CompilationJob(info->isolate(), info, "Ignition"),
|
| + generator_(info),
|
| + should_compile_(should_compile) {}
|
|
|
| InterpreterCompilationJob::Status InterpreterCompilationJob::PrepareJobImpl() {
|
| if (FLAG_print_bytecode || FLAG_print_ast) {
|
| @@ -192,7 +198,8 @@ InterpreterCompilationJob::Status InterpreterCompilationJob::ExecuteJobImpl() {
|
| }
|
|
|
| InterpreterCompilationJob::Status InterpreterCompilationJob::FinalizeJobImpl() {
|
| - Handle<BytecodeArray> bytecodes = generator()->FinalizeBytecode(isolate());
|
| + Handle<BytecodeArray> bytecodes =
|
| + generator()->FinalizeBytecode(isolate(), should_compile_);
|
| if (generator()->HasStackOverflow()) {
|
| return FAILED;
|
| }
|
| @@ -208,8 +215,9 @@ InterpreterCompilationJob::Status InterpreterCompilationJob::FinalizeJobImpl() {
|
| return SUCCEEDED;
|
| }
|
|
|
| -CompilationJob* Interpreter::NewCompilationJob(CompilationInfo* info) {
|
| - return new InterpreterCompilationJob(info);
|
| +CompilationJob* Interpreter::NewCompilationJob(CompilationInfo* info,
|
| + ShouldCompile should_compile) {
|
| + return new InterpreterCompilationJob(info, should_compile);
|
| }
|
|
|
| bool Interpreter::IsDispatchTableInitialized() {
|
|
|