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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 Object* old_code = code; | 122 Object* old_code = code; |
123 v->VisitPointer(&code); | 123 v->VisitPointer(&code); |
124 if (code != old_code) { | 124 if (code != old_code) { |
125 dispatch_table_[i] = reinterpret_cast<Code*>(code)->entry(); | 125 dispatch_table_[i] = reinterpret_cast<Code*>(code)->entry(); |
126 } | 126 } |
127 } | 127 } |
128 } | 128 } |
129 | 129 |
130 // static | 130 // static |
131 int Interpreter::InterruptBudget() { | 131 int Interpreter::InterruptBudget() { |
132 // TODO(ignition): Tune code size multiplier. | |
133 const int kCodeSizeMultiplier = 32; | |
134 return FLAG_interrupt_budget * kCodeSizeMultiplier; | 132 return FLAG_interrupt_budget * kCodeSizeMultiplier; |
135 } | 133 } |
136 | 134 |
137 bool Interpreter::MakeBytecode(CompilationInfo* info) { | 135 bool Interpreter::MakeBytecode(CompilationInfo* info) { |
138 RuntimeCallTimerScope runtimeTimer(info->isolate(), | 136 RuntimeCallTimerScope runtimeTimer(info->isolate(), |
139 &RuntimeCallStats::CompileIgnition); | 137 &RuntimeCallStats::CompileIgnition); |
140 TimerEventScope<TimerEventCompileIgnition> timer(info->isolate()); | 138 TimerEventScope<TimerEventCompileIgnition> timer(info->isolate()); |
141 TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("v8.compile"), "V8.CompileIgnition"); | 139 TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("v8.compile"), "V8.CompileIgnition"); |
142 | 140 |
143 if (FLAG_print_bytecode || FLAG_print_ast) { | 141 if (FLAG_print_bytecode || FLAG_print_ast) { |
(...skipping 2030 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2174 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset, | 2172 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset, |
2175 __ SmiTag(new_state)); | 2173 __ SmiTag(new_state)); |
2176 __ SetAccumulator(old_state); | 2174 __ SetAccumulator(old_state); |
2177 | 2175 |
2178 __ Dispatch(); | 2176 __ Dispatch(); |
2179 } | 2177 } |
2180 | 2178 |
2181 } // namespace interpreter | 2179 } // namespace interpreter |
2182 } // namespace internal | 2180 } // namespace internal |
2183 } // namespace v8 | 2181 } // namespace v8 |
OLD | NEW |