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 "src/ast/prettyprinter.h" | 7 #include "src/ast/prettyprinter.h" |
8 #include "src/code-factory.h" | 8 #include "src/code-factory.h" |
9 #include "src/compiler.h" | 9 #include "src/compiler.h" |
10 #include "src/factory.h" | 10 #include "src/factory.h" |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 bytecodes->Print(os); | 104 bytecodes->Print(os); |
105 os << std::flush; | 105 os << std::flush; |
106 } | 106 } |
107 | 107 |
108 info->SetBytecodeArray(bytecodes); | 108 info->SetBytecodeArray(bytecodes); |
109 info->SetCode(info->isolate()->builtins()->InterpreterEntryTrampoline()); | 109 info->SetCode(info->isolate()->builtins()->InterpreterEntryTrampoline()); |
110 return true; | 110 return true; |
111 } | 111 } |
112 | 112 |
113 bool Interpreter::IsDispatchTableInitialized() { | 113 bool Interpreter::IsDispatchTableInitialized() { |
114 if (FLAG_trace_ignition) { | 114 if (FLAG_trace_ignition || FLAG_trace_ignition_codegen) { |
115 // Regenerate table to add bytecode tracing operations. | 115 // Regenerate table to add bytecode tracing operations |
| 116 // or to print the assembly code generated by TurboFan. |
116 return false; | 117 return false; |
117 } | 118 } |
118 return dispatch_table_[0] != nullptr; | 119 return dispatch_table_[0] != nullptr; |
119 } | 120 } |
120 | 121 |
121 void Interpreter::TraceCodegen(Handle<Code> code) { | 122 void Interpreter::TraceCodegen(Handle<Code> code) { |
122 #ifdef ENABLE_DISASSEMBLER | 123 #ifdef ENABLE_DISASSEMBLER |
123 if (FLAG_trace_ignition_codegen) { | 124 if (FLAG_trace_ignition_codegen) { |
124 OFStream os(stdout); | 125 OFStream os(stdout); |
125 code->Disassemble(nullptr, os); | 126 code->Disassemble(nullptr, os); |
(...skipping 1796 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1922 Node* index = __ LoadRegister(index_reg); | 1923 Node* index = __ LoadRegister(index_reg); |
1923 Node* one = __ SmiConstant(Smi::FromInt(1)); | 1924 Node* one = __ SmiConstant(Smi::FromInt(1)); |
1924 Node* result = __ SmiAdd(index, one); | 1925 Node* result = __ SmiAdd(index, one); |
1925 __ SetAccumulator(result); | 1926 __ SetAccumulator(result); |
1926 __ Dispatch(); | 1927 __ Dispatch(); |
1927 } | 1928 } |
1928 | 1929 |
1929 } // namespace interpreter | 1930 } // namespace interpreter |
1930 } // namespace internal | 1931 } // namespace internal |
1931 } // namespace v8 | 1932 } // namespace v8 |
OLD | NEW |