Index: src/interpreter/interpreter.cc |
diff --git a/src/interpreter/interpreter.cc b/src/interpreter/interpreter.cc |
index 6d0f65ee29f95afc4930db09c1378a592ceedaed..d881b6fea35a9973dd1e15c2affac46bfe920d3e 100644 |
--- a/src/interpreter/interpreter.cc |
+++ b/src/interpreter/interpreter.cc |
@@ -49,6 +49,13 @@ void Interpreter::IterateDispatchTable(ObjectVisitor* v) { |
&dispatch_table_[0] + kDispatchTableSize); |
} |
+// static |
+int Interpreter::InterruptBudget() { |
+ // TODO(ignition): Tune code size multiplier. |
+ const int kCodeSizeMultiplier = 32; |
+ return FLAG_interrupt_budget / kCodeSizeMultiplier; |
+} |
+ |
bool Interpreter::MakeBytecode(CompilationInfo* info) { |
if (FLAG_print_bytecode || FLAG_print_source || FLAG_print_ast) { |
OFStream os(stdout); |