| 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 | 43 |
| 44 | 44 |
| 45 Handle<Code> InterpreterAssembler::GenerateCode() { | 45 Handle<Code> InterpreterAssembler::GenerateCode() { |
| 46 DCHECK(!code_generated_); | 46 DCHECK(!code_generated_); |
| 47 | 47 |
| 48 // Disallow empty handlers that never return. | 48 // Disallow empty handlers that never return. |
| 49 DCHECK_NE(0, graph()->end()->InputCount()); | 49 DCHECK_NE(0, graph()->end()->InputCount()); |
| 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. | |
| 54 Handle<Code> code = Pipeline::GenerateCodeForCodeStub( | 53 Handle<Code> code = Pipeline::GenerateCodeForCodeStub( |
| 55 isolate(), raw_assembler_->call_descriptor(), graph(), schedule, | 54 isolate(), raw_assembler_->call_descriptor(), graph(), schedule, |
| 56 Code::STUB, bytecode_name); | 55 Code::STUB, bytecode_name); |
| 57 | 56 |
| 58 #ifdef ENABLE_DISASSEMBLER | 57 #ifdef ENABLE_DISASSEMBLER |
| 59 if (FLAG_trace_ignition_codegen) { | 58 if (FLAG_trace_ignition_codegen) { |
| 60 OFStream os(stdout); | 59 OFStream os(stdout); |
| 61 code->Disassemble(bytecode_name, os); | 60 code->Disassemble(bytecode_name, os); |
| 62 os << std::flush; | 61 os << std::flush; |
| 63 } | 62 } |
| (...skipping 568 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 632 return raw_assembler_->call_descriptor(); | 631 return raw_assembler_->call_descriptor(); |
| 633 } | 632 } |
| 634 | 633 |
| 635 | 634 |
| 636 Zone* InterpreterAssembler::zone() { return raw_assembler_->zone(); } | 635 Zone* InterpreterAssembler::zone() { return raw_assembler_->zone(); } |
| 637 | 636 |
| 638 | 637 |
| 639 } // namespace compiler | 638 } // namespace compiler |
| 640 } // namespace internal | 639 } // namespace internal |
| 641 } // namespace v8 | 640 } // namespace v8 |
| OLD | NEW |