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 <fstream> | 7 #include <fstream> |
8 | 8 |
9 #include "src/ast/prettyprinter.h" | 9 #include "src/ast/prettyprinter.h" |
10 #include "src/code-factory.h" | 10 #include "src/code-factory.h" |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 } | 116 } |
117 | 117 |
118 // static | 118 // static |
119 int Interpreter::InterruptBudget() { | 119 int Interpreter::InterruptBudget() { |
120 // TODO(ignition): Tune code size multiplier. | 120 // TODO(ignition): Tune code size multiplier. |
121 const int kCodeSizeMultiplier = 32; | 121 const int kCodeSizeMultiplier = 32; |
122 return FLAG_interrupt_budget * kCodeSizeMultiplier; | 122 return FLAG_interrupt_budget * kCodeSizeMultiplier; |
123 } | 123 } |
124 | 124 |
125 bool Interpreter::MakeBytecode(CompilationInfo* info) { | 125 bool Interpreter::MakeBytecode(CompilationInfo* info) { |
| 126 RuntimeCallTimerScope runtimeTimer(info->isolate(), |
| 127 &RuntimeCallStats::CompileIgnition); |
126 TimerEventScope<TimerEventCompileIgnition> timer(info->isolate()); | 128 TimerEventScope<TimerEventCompileIgnition> timer(info->isolate()); |
127 TRACE_EVENT0("v8", "V8.CompileIgnition"); | 129 TRACE_EVENT0("v8", "V8.CompileIgnition"); |
128 | 130 |
129 if (FLAG_print_bytecode || FLAG_print_source || FLAG_print_ast) { | 131 if (FLAG_print_bytecode || FLAG_print_source || FLAG_print_ast) { |
130 OFStream os(stdout); | 132 OFStream os(stdout); |
131 base::SmartArrayPointer<char> name = info->GetDebugName(); | 133 base::SmartArrayPointer<char> name = info->GetDebugName(); |
132 os << "[generating bytecode for function: " << info->GetDebugName().get() | 134 os << "[generating bytecode for function: " << info->GetDebugName().get() |
133 << "]" << std::endl | 135 << "]" << std::endl |
134 << std::flush; | 136 << std::flush; |
135 } | 137 } |
(...skipping 1669 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1805 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset, | 1807 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset, |
1806 __ SmiTag(new_state)); | 1808 __ SmiTag(new_state)); |
1807 __ SetAccumulator(old_state); | 1809 __ SetAccumulator(old_state); |
1808 | 1810 |
1809 __ Dispatch(); | 1811 __ Dispatch(); |
1810 } | 1812 } |
1811 | 1813 |
1812 } // namespace interpreter | 1814 } // namespace interpreter |
1813 } // namespace internal | 1815 } // namespace internal |
1814 } // namespace v8 | 1816 } // namespace v8 |
OLD | NEW |