Chromium Code Reviews

Unified Diff: src/interpreter/bytecode-generator.cc

Issue 2255793002: [interpreter] Add CreateWithContext bytecode (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: add to AllBytecodesGenerated Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « src/interpreter/bytecode-array-builder.cc ('k') | src/interpreter/bytecodes.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/interpreter/bytecode-generator.cc
diff --git a/src/interpreter/bytecode-generator.cc b/src/interpreter/bytecode-generator.cc
index cb133c365eb053b713b31638e1c7d23ec6716668..167d787143469c64cae831b4e50d469caf474409 100644
--- a/src/interpreter/bytecode-generator.cc
+++ b/src/interpreter/bytecode-generator.cc
@@ -3220,14 +3220,11 @@ void BytecodeGenerator::VisitNewLocalBlockContext(Scope* scope) {
void BytecodeGenerator::VisitNewLocalWithContext() {
AccumulatorResultScope accumulator_execution_result(this);
- register_allocator()->PrepareForConsecutiveAllocations(2);
- Register extension_object = register_allocator()->NextConsecutiveRegister();
- Register closure = register_allocator()->NextConsecutiveRegister();
+ Register extension_object = register_allocator()->NewRegister();
builder()->CastAccumulatorToJSObject(extension_object);
VisitFunctionClosureForContext();
- builder()->StoreAccumulatorInRegister(closure).CallRuntime(
- Runtime::kPushWithContext, extension_object, 2);
+ builder()->CreateWithContext(extension_object);
execution_result()->SetResultInAccumulator();
}
« no previous file with comments | « src/interpreter/bytecode-array-builder.cc ('k') | src/interpreter/bytecodes.h » ('j') | no next file with comments »

Powered by Google App Engine