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/code-factory.h" | 9 #include "src/code-factory.h" |
10 #include "src/compiler/graph.h" | 10 #include "src/compiler/graph.h" |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 | 44 |
45 | 45 |
46 Handle<Code> InterpreterAssembler::GenerateCode() { | 46 Handle<Code> InterpreterAssembler::GenerateCode() { |
47 DCHECK(!code_generated_); | 47 DCHECK(!code_generated_); |
48 | 48 |
49 End(); | 49 End(); |
50 | 50 |
51 const char* bytecode_name = interpreter::Bytecodes::ToString(bytecode_); | 51 const char* bytecode_name = interpreter::Bytecodes::ToString(bytecode_); |
52 Schedule* schedule = raw_assembler_->Export(); | 52 Schedule* schedule = raw_assembler_->Export(); |
53 // TODO(rmcilroy): use a non-testing code generator. | 53 // TODO(rmcilroy): use a non-testing code generator. |
54 Handle<Code> code = Pipeline::GenerateCodeForInterpreter( | 54 Handle<Code> code = Pipeline::GenerateCodeForCodeStub( |
55 isolate(), raw_assembler_->call_descriptor(), graph(), schedule, | 55 isolate(), raw_assembler_->call_descriptor(), graph(), schedule, |
56 bytecode_name); | 56 Code::STUB, bytecode_name); |
57 | 57 |
58 #ifdef ENABLE_DISASSEMBLER | 58 #ifdef ENABLE_DISASSEMBLER |
59 if (FLAG_trace_ignition_codegen) { | 59 if (FLAG_trace_ignition_codegen) { |
60 OFStream os(stdout); | 60 OFStream os(stdout); |
61 code->Disassemble(bytecode_name, os); | 61 code->Disassemble(bytecode_name, os); |
62 os << std::flush; | 62 os << std::flush; |
63 } | 63 } |
64 #endif | 64 #endif |
65 | 65 |
66 code_generated_ = true; | 66 code_generated_ = true; |
(...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
652 return raw_assembler_->call_descriptor(); | 652 return raw_assembler_->call_descriptor(); |
653 } | 653 } |
654 | 654 |
655 | 655 |
656 Zone* InterpreterAssembler::zone() { return raw_assembler_->zone(); } | 656 Zone* InterpreterAssembler::zone() { return raw_assembler_->zone(); } |
657 | 657 |
658 | 658 |
659 } // namespace compiler | 659 } // namespace compiler |
660 } // namespace internal | 660 } // namespace internal |
661 } // namespace v8 | 661 } // namespace v8 |
OLD | NEW |