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/code-factory.h" | 7 #include "src/code-factory.h" |
8 #include "src/compiler.h" | 8 #include "src/compiler.h" |
9 #include "src/compiler/interpreter-assembler.h" | 9 #include "src/compiler/interpreter-assembler.h" |
10 #include "src/factory.h" | 10 #include "src/factory.h" |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 handler_table->set(static_cast<int>(Bytecode::k##Name), *code); \ | 54 handler_table->set(static_cast<int>(Bytecode::k##Name), *code); \ |
55 } | 55 } |
56 BYTECODE_LIST(GENERATE_CODE) | 56 BYTECODE_LIST(GENERATE_CODE) |
57 #undef GENERATE_CODE | 57 #undef GENERATE_CODE |
58 } | 58 } |
59 } | 59 } |
60 | 60 |
61 | 61 |
62 bool Interpreter::MakeBytecode(CompilationInfo* info) { | 62 bool Interpreter::MakeBytecode(CompilationInfo* info) { |
63 BytecodeGenerator generator(info->isolate(), info->zone()); | 63 BytecodeGenerator generator(info->isolate(), info->zone()); |
64 info->EnsureFeedbackVector(); | 64 info->EnsureFeedbackMetadata(); |
65 Handle<BytecodeArray> bytecodes = generator.MakeBytecode(info); | 65 Handle<BytecodeArray> bytecodes = generator.MakeBytecode(info); |
66 if (FLAG_print_bytecode) { | 66 if (FLAG_print_bytecode) { |
67 OFStream os(stdout); | 67 OFStream os(stdout); |
68 os << "Function: " << info->GetDebugName().get() << std::endl; | 68 os << "Function: " << info->GetDebugName().get() << std::endl; |
69 bytecodes->Print(os); | 69 bytecodes->Print(os); |
70 os << std::flush; | 70 os << std::flush; |
71 } | 71 } |
72 | 72 |
73 info->SetBytecodeArray(bytecodes); | 73 info->SetBytecodeArray(bytecodes); |
74 info->SetCode(info->isolate()->builtins()->InterpreterEntryTrampoline()); | 74 info->SetCode(info->isolate()->builtins()->InterpreterEntryTrampoline()); |
(...skipping 1782 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1857 Node* index_reg = __ BytecodeOperandReg(0); | 1857 Node* index_reg = __ BytecodeOperandReg(0); |
1858 Node* index = __ LoadRegister(index_reg); | 1858 Node* index = __ LoadRegister(index_reg); |
1859 Node* result = __ CallRuntime(Runtime::kForInStep, index); | 1859 Node* result = __ CallRuntime(Runtime::kForInStep, index); |
1860 __ SetAccumulator(result); | 1860 __ SetAccumulator(result); |
1861 __ Dispatch(); | 1861 __ Dispatch(); |
1862 } | 1862 } |
1863 | 1863 |
1864 } // namespace interpreter | 1864 } // namespace interpreter |
1865 } // namespace internal | 1865 } // namespace internal |
1866 } // namespace v8 | 1866 } // namespace v8 |
OLD | NEW |