| 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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 } | 124 } |
| 125 | 125 |
| 126 // static | 126 // static |
| 127 int Interpreter::InterruptBudget() { | 127 int Interpreter::InterruptBudget() { |
| 128 // TODO(ignition): Tune code size multiplier. | 128 // TODO(ignition): Tune code size multiplier. |
| 129 const int kCodeSizeMultiplier = 32; | 129 const int kCodeSizeMultiplier = 32; |
| 130 return FLAG_interrupt_budget * kCodeSizeMultiplier; | 130 return FLAG_interrupt_budget * kCodeSizeMultiplier; |
| 131 } | 131 } |
| 132 | 132 |
| 133 bool Interpreter::MakeBytecode(CompilationInfo* info) { | 133 bool Interpreter::MakeBytecode(CompilationInfo* info) { |
| 134 RuntimeCallTimerScope runtimeTimer(info->isolate(), |
| 135 &RuntimeCallStats::CompileIgnition); |
| 134 TimerEventScope<TimerEventCompileIgnition> timer(info->isolate()); | 136 TimerEventScope<TimerEventCompileIgnition> timer(info->isolate()); |
| 135 TRACE_EVENT0("v8", "V8.CompileIgnition"); | 137 TRACE_EVENT0("v8", "V8.CompileIgnition"); |
| 136 | 138 |
| 137 if (FLAG_print_bytecode || FLAG_print_source || FLAG_print_ast) { | 139 if (FLAG_print_bytecode || FLAG_print_source || FLAG_print_ast) { |
| 138 OFStream os(stdout); | 140 OFStream os(stdout); |
| 139 base::SmartArrayPointer<char> name = info->GetDebugName(); | 141 base::SmartArrayPointer<char> name = info->GetDebugName(); |
| 140 os << "[generating bytecode for function: " << info->GetDebugName().get() | 142 os << "[generating bytecode for function: " << info->GetDebugName().get() |
| 141 << "]" << std::endl | 143 << "]" << std::endl |
| 142 << std::flush; | 144 << std::flush; |
| 143 } | 145 } |
| (...skipping 1683 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1827 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset, | 1829 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset, |
| 1828 __ SmiTag(new_state)); | 1830 __ SmiTag(new_state)); |
| 1829 __ SetAccumulator(old_state); | 1831 __ SetAccumulator(old_state); |
| 1830 | 1832 |
| 1831 __ Dispatch(); | 1833 __ Dispatch(); |
| 1832 } | 1834 } |
| 1833 | 1835 |
| 1834 } // namespace interpreter | 1836 } // namespace interpreter |
| 1835 } // namespace internal | 1837 } // namespace internal |
| 1836 } // namespace v8 | 1838 } // namespace v8 |
| OLD | NEW |