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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 int Interpreter::InterruptBudget() { | 128 int Interpreter::InterruptBudget() { |
129 // TODO(ignition): Tune code size multiplier. | 129 // TODO(ignition): Tune code size multiplier. |
130 const int kCodeSizeMultiplier = 32; | 130 const int kCodeSizeMultiplier = 32; |
131 return FLAG_interrupt_budget * kCodeSizeMultiplier; | 131 return FLAG_interrupt_budget * kCodeSizeMultiplier; |
132 } | 132 } |
133 | 133 |
134 bool Interpreter::MakeBytecode(CompilationInfo* info) { | 134 bool Interpreter::MakeBytecode(CompilationInfo* info) { |
135 RuntimeCallTimerScope runtimeTimer(info->isolate(), | 135 RuntimeCallTimerScope runtimeTimer(info->isolate(), |
136 &RuntimeCallStats::CompileIgnition); | 136 &RuntimeCallStats::CompileIgnition); |
137 TimerEventScope<TimerEventCompileIgnition> timer(info->isolate()); | 137 TimerEventScope<TimerEventCompileIgnition> timer(info->isolate()); |
138 TRACE_EVENT0("v8", "V8.CompileIgnition"); | 138 TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("v8.compile"), "V8.CompileIgnition"); |
139 | 139 |
140 if (FLAG_print_bytecode || FLAG_print_source || FLAG_print_ast) { | 140 if (FLAG_print_bytecode || FLAG_print_source || FLAG_print_ast) { |
141 OFStream os(stdout); | 141 OFStream os(stdout); |
142 base::SmartArrayPointer<char> name = info->GetDebugName(); | 142 base::SmartArrayPointer<char> name = info->GetDebugName(); |
143 os << "[generating bytecode for function: " << info->GetDebugName().get() | 143 os << "[generating bytecode for function: " << info->GetDebugName().get() |
144 << "]" << std::endl | 144 << "]" << std::endl |
145 << std::flush; | 145 << std::flush; |
146 } | 146 } |
147 | 147 |
148 #ifdef DEBUG | 148 #ifdef DEBUG |
(...skipping 1875 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2024 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset, | 2024 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset, |
2025 __ SmiTag(new_state)); | 2025 __ SmiTag(new_state)); |
2026 __ SetAccumulator(old_state); | 2026 __ SetAccumulator(old_state); |
2027 | 2027 |
2028 __ Dispatch(); | 2028 __ Dispatch(); |
2029 } | 2029 } |
2030 | 2030 |
2031 } // namespace interpreter | 2031 } // namespace interpreter |
2032 } // namespace internal | 2032 } // namespace internal |
2033 } // namespace v8 | 2033 } // namespace v8 |
OLD | NEW |