| 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 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "src/ast/prettyprinter.h" | 10 #include "src/ast/prettyprinter.h" |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 int Interpreter::InterruptBudget() { | 131 int Interpreter::InterruptBudget() { |
| 132 // TODO(ignition): Tune code size multiplier. | 132 // TODO(ignition): Tune code size multiplier. |
| 133 const int kCodeSizeMultiplier = 32; | 133 const int kCodeSizeMultiplier = 32; |
| 134 return FLAG_interrupt_budget * kCodeSizeMultiplier; | 134 return FLAG_interrupt_budget * kCodeSizeMultiplier; |
| 135 } | 135 } |
| 136 | 136 |
| 137 bool Interpreter::MakeBytecode(CompilationInfo* info) { | 137 bool Interpreter::MakeBytecode(CompilationInfo* info) { |
| 138 RuntimeCallTimerScope runtimeTimer(info->isolate(), | 138 RuntimeCallTimerScope runtimeTimer(info->isolate(), |
| 139 &RuntimeCallStats::CompileIgnition); | 139 &RuntimeCallStats::CompileIgnition); |
| 140 TimerEventScope<TimerEventCompileIgnition> timer(info->isolate()); | 140 TimerEventScope<TimerEventCompileIgnition> timer(info->isolate()); |
| 141 TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("v8.compile"), "V8.CompileIgnition"); | 141 TRACE_EVENT_RUNTIME_CALL_STATS_TRACING_SCOPED( |
| 142 info->isolate(), &tracing::TraceEventStatsTable::CompileIgnition); |
| 142 | 143 |
| 143 if (FLAG_print_bytecode || FLAG_print_ast) { | 144 if (FLAG_print_bytecode || FLAG_print_ast) { |
| 144 OFStream os(stdout); | 145 OFStream os(stdout); |
| 145 std::unique_ptr<char[]> name = info->GetDebugName(); | 146 std::unique_ptr<char[]> name = info->GetDebugName(); |
| 146 os << "[generating bytecode for function: " << info->GetDebugName().get() | 147 os << "[generating bytecode for function: " << info->GetDebugName().get() |
| 147 << "]" << std::endl | 148 << "]" << std::endl |
| 148 << std::flush; | 149 << std::flush; |
| 149 } | 150 } |
| 150 | 151 |
| 151 #ifdef DEBUG | 152 #ifdef DEBUG |
| (...skipping 2022 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2174 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset, | 2175 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset, |
| 2175 __ SmiTag(new_state)); | 2176 __ SmiTag(new_state)); |
| 2176 __ SetAccumulator(old_state); | 2177 __ SetAccumulator(old_state); |
| 2177 | 2178 |
| 2178 __ Dispatch(); | 2179 __ Dispatch(); |
| 2179 } | 2180 } |
| 2180 | 2181 |
| 2181 } // namespace interpreter | 2182 } // namespace interpreter |
| 2182 } // namespace internal | 2183 } // namespace internal |
| 2183 } // namespace v8 | 2184 } // namespace v8 |
| OLD | NEW |