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/compiler/interpreter-assembler.h" | 5 #include "src/compiler/interpreter-assembler.h" |
6 | 6 |
7 #include <ostream> | 7 #include <ostream> |
8 | 8 |
9 #include "src/compiler/graph.h" | 9 #include "src/compiler/graph.h" |
10 #include "src/compiler/instruction-selector.h" | 10 #include "src/compiler/instruction-selector.h" |
(...skipping 26 matching lines...) Expand all Loading... |
37 | 37 |
38 | 38 |
39 InterpreterAssembler::~InterpreterAssembler() {} | 39 InterpreterAssembler::~InterpreterAssembler() {} |
40 | 40 |
41 | 41 |
42 Handle<Code> InterpreterAssembler::GenerateCode() { | 42 Handle<Code> InterpreterAssembler::GenerateCode() { |
43 DCHECK(!code_generated_); | 43 DCHECK(!code_generated_); |
44 | 44 |
45 End(); | 45 End(); |
46 | 46 |
| 47 const char* bytecode_name = interpreter::Bytecodes::ToString(bytecode_); |
47 Schedule* schedule = raw_assembler_->Export(); | 48 Schedule* schedule = raw_assembler_->Export(); |
48 // TODO(rmcilroy): use a non-testing code generator. | 49 // TODO(rmcilroy): use a non-testing code generator. |
49 Handle<Code> code = Pipeline::GenerateCodeForTesting( | 50 Handle<Code> code = Pipeline::GenerateCodeForInterpreter( |
50 isolate(), raw_assembler_->call_descriptor(), graph(), schedule); | 51 isolate(), raw_assembler_->call_descriptor(), graph(), schedule, |
| 52 bytecode_name); |
51 | 53 |
52 #ifdef ENABLE_DISASSEMBLER | 54 #ifdef ENABLE_DISASSEMBLER |
53 if (FLAG_trace_ignition_codegen) { | 55 if (FLAG_trace_ignition_codegen) { |
54 OFStream os(stdout); | 56 OFStream os(stdout); |
55 code->Disassemble(interpreter::Bytecodes::ToString(bytecode_), os); | 57 code->Disassemble(bytecode_name, os); |
56 os << std::flush; | 58 os << std::flush; |
57 } | 59 } |
58 #endif | 60 #endif |
59 | 61 |
60 code_generated_ = true; | 62 code_generated_ = true; |
61 return code; | 63 return code; |
62 } | 64 } |
63 | 65 |
64 | 66 |
65 Node* InterpreterAssembler::GetAccumulator() { | 67 Node* InterpreterAssembler::GetAccumulator() { |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
256 | 258 |
257 Schedule* InterpreterAssembler::schedule() { | 259 Schedule* InterpreterAssembler::schedule() { |
258 return raw_assembler_->schedule(); | 260 return raw_assembler_->schedule(); |
259 } | 261 } |
260 | 262 |
261 | 263 |
262 | 264 |
263 } // namespace interpreter | 265 } // namespace interpreter |
264 } // namespace internal | 266 } // namespace internal |
265 } // namespace v8 | 267 } // namespace v8 |
OLD | NEW |