OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/interpreter/interpreter.h" | 5 #include "src/interpreter/interpreter.h" |
6 | 6 |
7 #include <fstream> | 7 #include <fstream> |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "src/ast/prettyprinter.h" | 10 #include "src/ast/prettyprinter.h" |
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 CompilationJob* Interpreter::NewCompilationJob(CompilationInfo* info) { | 216 CompilationJob* Interpreter::NewCompilationJob(CompilationInfo* info) { |
217 return new InterpreterCompilationJob(info); | 217 return new InterpreterCompilationJob(info); |
218 } | 218 } |
219 | 219 |
220 bool Interpreter::IsDispatchTableInitialized() { | 220 bool Interpreter::IsDispatchTableInitialized() { |
221 return dispatch_table_[0] != nullptr; | 221 return dispatch_table_[0] != nullptr; |
222 } | 222 } |
223 | 223 |
224 bool Interpreter::ShouldInitializeDispatchTable() { | 224 bool Interpreter::ShouldInitializeDispatchTable() { |
225 if (FLAG_trace_ignition || FLAG_trace_ignition_codegen || | 225 if (FLAG_trace_ignition || FLAG_trace_ignition_codegen || |
226 FLAG_trace_ignition_dispatches || FLAG_debug_code) { | 226 FLAG_trace_ignition_dispatches) { |
227 // Regenerate table to add bytecode tracing operations, print the assembly | 227 // Regenerate table to add bytecode tracing operations, print the assembly |
228 // code generated by TurboFan, instrument handlers with dispatch counters, | 228 // code generated by TurboFan or instrument handlers with dispatch counters. |
229 // or insert debugging code into the bytecode handlers. | |
230 return true; | 229 return true; |
231 } | 230 } |
232 return !IsDispatchTableInitialized(); | 231 return !IsDispatchTableInitialized(); |
233 } | 232 } |
234 | 233 |
235 void Interpreter::TraceCodegen(Handle<Code> code) { | 234 void Interpreter::TraceCodegen(Handle<Code> code) { |
236 #ifdef ENABLE_DISASSEMBLER | 235 #ifdef ENABLE_DISASSEMBLER |
237 if (FLAG_trace_ignition_codegen) { | 236 if (FLAG_trace_ignition_codegen) { |
238 OFStream os(stdout); | 237 OFStream os(stdout); |
239 code->Disassemble(nullptr, os); | 238 code->Disassemble(nullptr, os); |
(...skipping 2407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2647 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset, | 2646 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset, |
2648 __ SmiTag(new_state)); | 2647 __ SmiTag(new_state)); |
2649 __ SetAccumulator(old_state); | 2648 __ SetAccumulator(old_state); |
2650 | 2649 |
2651 __ Dispatch(); | 2650 __ Dispatch(); |
2652 } | 2651 } |
2653 | 2652 |
2654 } // namespace interpreter | 2653 } // namespace interpreter |
2655 } // namespace internal | 2654 } // namespace internal |
2656 } // namespace v8 | 2655 } // namespace v8 |
OLD | NEW |