| 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 1696 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1771   Node* index_reg = __ BytecodeOperandReg(0); | 1771   Node* index_reg = __ BytecodeOperandReg(0); | 
| 1772   Node* index = __ LoadRegister(index_reg); | 1772   Node* index = __ LoadRegister(index_reg); | 
| 1773   Node* result = __ CallRuntime(Runtime::kForInStep, index); | 1773   Node* result = __ CallRuntime(Runtime::kForInStep, index); | 
| 1774   __ SetAccumulator(result); | 1774   __ SetAccumulator(result); | 
| 1775   __ Dispatch(); | 1775   __ Dispatch(); | 
| 1776 } | 1776 } | 
| 1777 | 1777 | 
| 1778 }  // namespace interpreter | 1778 }  // namespace interpreter | 
| 1779 }  // namespace internal | 1779 }  // namespace internal | 
| 1780 }  // namespace v8 | 1780 }  // namespace v8 | 
| OLD | NEW | 
|---|