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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 | 129 |
130 // static | 130 // static |
131 int Interpreter::InterruptBudget() { | 131 int Interpreter::InterruptBudget() { |
132 return FLAG_interrupt_budget * kCodeSizeMultiplier; | 132 return FLAG_interrupt_budget * kCodeSizeMultiplier; |
133 } | 133 } |
134 | 134 |
135 bool Interpreter::MakeBytecode(CompilationInfo* info) { | 135 bool Interpreter::MakeBytecode(CompilationInfo* info) { |
136 RuntimeCallTimerScope runtimeTimer(info->isolate(), | 136 RuntimeCallTimerScope runtimeTimer(info->isolate(), |
137 &RuntimeCallStats::CompileIgnition); | 137 &RuntimeCallStats::CompileIgnition); |
138 TimerEventScope<TimerEventCompileIgnition> timer(info->isolate()); | 138 TimerEventScope<TimerEventCompileIgnition> timer(info->isolate()); |
139 TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("v8.compile"), "V8.CompileIgnition"); | 139 TRACE_EVENT_RUNTIME_CALL_STATS_TRACING_SCOPED( |
| 140 info->isolate(), &tracing::TraceEventStatsTable::CompileIgnition); |
140 | 141 |
141 if (FLAG_print_bytecode || FLAG_print_ast) { | 142 if (FLAG_print_bytecode || FLAG_print_ast) { |
142 OFStream os(stdout); | 143 OFStream os(stdout); |
143 std::unique_ptr<char[]> name = info->GetDebugName(); | 144 std::unique_ptr<char[]> name = info->GetDebugName(); |
144 os << "[generating bytecode for function: " << info->GetDebugName().get() | 145 os << "[generating bytecode for function: " << info->GetDebugName().get() |
145 << "]" << std::endl | 146 << "]" << std::endl |
146 << std::flush; | 147 << std::flush; |
147 } | 148 } |
148 | 149 |
149 #ifdef DEBUG | 150 #ifdef DEBUG |
(...skipping 2012 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2162 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset, | 2163 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset, |
2163 __ SmiTag(new_state)); | 2164 __ SmiTag(new_state)); |
2164 __ SetAccumulator(old_state); | 2165 __ SetAccumulator(old_state); |
2165 | 2166 |
2166 __ Dispatch(); | 2167 __ Dispatch(); |
2167 } | 2168 } |
2168 | 2169 |
2169 } // namespace interpreter | 2170 } // namespace interpreter |
2170 } // namespace internal | 2171 } // namespace internal |
2171 } // namespace v8 | 2172 } // namespace v8 |
OLD | NEW |