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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 #undef GENERATE_CODE | 56 #undef GENERATE_CODE |
57 } | 57 } |
58 } | 58 } |
59 | 59 |
60 | 60 |
61 bool Interpreter::MakeBytecode(CompilationInfo* info) { | 61 bool Interpreter::MakeBytecode(CompilationInfo* info) { |
62 BytecodeGenerator generator(info->isolate(), info->zone()); | 62 BytecodeGenerator generator(info->isolate(), info->zone()); |
63 info->EnsureFeedbackVector(); | 63 info->EnsureFeedbackVector(); |
64 Handle<BytecodeArray> bytecodes = generator.MakeBytecode(info); | 64 Handle<BytecodeArray> bytecodes = generator.MakeBytecode(info); |
65 if (FLAG_print_bytecode) { | 65 if (FLAG_print_bytecode) { |
66 bytecodes->Print(); | 66 OFStream os(stdout); |
| 67 os << "Function: " << info->GetDebugName().get() << std::endl; |
| 68 bytecodes->Print(os); |
| 69 os << std::flush; |
67 } | 70 } |
68 | 71 |
69 info->SetBytecodeArray(bytecodes); | 72 info->SetBytecodeArray(bytecodes); |
70 info->SetCode(info->isolate()->builtins()->InterpreterEntryTrampoline()); | 73 info->SetCode(info->isolate()->builtins()->InterpreterEntryTrampoline()); |
71 return true; | 74 return true; |
72 } | 75 } |
73 | 76 |
74 | 77 |
75 bool Interpreter::IsInterpreterTableInitialized( | 78 bool Interpreter::IsInterpreterTableInitialized( |
76 Handle<FixedArray> handler_table) { | 79 Handle<FixedArray> handler_table) { |
(...skipping 990 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1067 // | 1070 // |
1068 // Return the value in the accumulator. | 1071 // Return the value in the accumulator. |
1069 void Interpreter::DoReturn(compiler::InterpreterAssembler* assembler) { | 1072 void Interpreter::DoReturn(compiler::InterpreterAssembler* assembler) { |
1070 __ Return(); | 1073 __ Return(); |
1071 } | 1074 } |
1072 | 1075 |
1073 | 1076 |
1074 } // namespace interpreter | 1077 } // namespace interpreter |
1075 } // namespace internal | 1078 } // namespace internal |
1076 } // namespace v8 | 1079 } // namespace v8 |
OLD | NEW |