Index: src/interpreter/bytecode-generator.cc |
diff --git a/src/interpreter/bytecode-generator.cc b/src/interpreter/bytecode-generator.cc |
index 600944bbbefeee9ea1e2fea60934c21688a016d1..48f0c3c354f0c59cbcf51d83005a14b2d7839943 100644 |
--- a/src/interpreter/bytecode-generator.cc |
+++ b/src/interpreter/bytecode-generator.cc |
@@ -688,16 +688,20 @@ |
InitializeAstVisitor(isolate()->stack_guard()->real_climit()); |
} |
-Handle<BytecodeArray> BytecodeGenerator::FinalizeBytecode() { |
+Handle<BytecodeArray> BytecodeGenerator::MakeBytecode() { |
// Create an inner HandleScope to avoid unnecessarily canonicalizing handles |
// created as part of bytecode finalization. |
HandleScope scope(isolate()); |
- AllocateDeferredConstants(); |
+ |
+ GenerateBytecode(); |
+ FinalizeBytecode(); |
+ |
if (HasStackOverflow()) return Handle<BytecodeArray>(); |
+ |
return scope.CloseAndEscape(builder()->ToBytecodeArray()); |
} |
-void BytecodeGenerator::AllocateDeferredConstants() { |
+void BytecodeGenerator::FinalizeBytecode() { |
// Build global declaration pair arrays. |
for (GlobalDeclarationsBuilder* globals_builder : global_declarations_) { |
Handle<FixedArray> declarations = |