Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(157)

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

Issue 2504553003: [es6] Perform the IsConstructor test in GetSuperConstructor. (Closed)
Patch Set: Convert GetSuperConstructor to a new interpreter bytecode Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/interpreter/bytecode-generator.cc
diff --git a/src/interpreter/bytecode-generator.cc b/src/interpreter/bytecode-generator.cc
index c67e5d43f706b797a63f5fe9b77257d0fefefe69..802745a85287e0fc17d1c6a55aa3a7409203a20a 100644
--- a/src/interpreter/bytecode-generator.cc
+++ b/src/interpreter/bytecode-generator.cc
@@ -2485,10 +2485,10 @@ void BytecodeGenerator::VisitCallSuper(Call* expr) {
SuperCallReference* super = expr->expression()->AsSuperCallReference();
// Prepare the constructor to the super call.
- Register this_function = VisitForRegisterValue(super->this_function_var());
- builder()->CallRuntime(Runtime::kInlineGetSuperConstructor, this_function);
+ VisitForAccumulatorValue(super->this_function_var());
+ builder()->GetSuperConstructor();
Benedikt Meurer 2016/11/23 04:51:00 We should probably pass an output register to this
rmcilroy 2016/11/23 21:55:37 Yup sounds good, just add a kRegOut operand and pa
- Register constructor = this_function; // Re-use dead this_function register.
+ Register constructor = register_allocator()->NewRegister();
builder()->StoreAccumulatorInRegister(constructor);
RegisterList args =

Powered by Google App Engine
This is Rietveld 408576698