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

Unified Diff: src/compiler/ast-graph-builder.cc

Issue 1529113002: [es6] Consistently use %_GetSuperConstructor to implement super calls. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address comment Created 5 years 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
« no previous file with comments | « no previous file | src/compiler/linkage.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/ast-graph-builder.cc
diff --git a/src/compiler/ast-graph-builder.cc b/src/compiler/ast-graph-builder.cc
index 2e594c21c7cc98f5040089af7319ffe30654fcd6..d19b54c4004735af574a18059ef63be01f6d814f 100644
--- a/src/compiler/ast-graph-builder.cc
+++ b/src/compiler/ast-graph-builder.cc
@@ -2501,14 +2501,12 @@ void AstGraphBuilder::VisitCallSuper(Call* expr) {
SuperCallReference* super = expr->expression()->AsSuperCallReference();
DCHECK_NOT_NULL(super);
- // Prepare the callee to the super call. The super constructor is stored as
- // the prototype of the constructor we are currently executing.
+ // Prepare the callee to the super call.
VisitForValue(super->this_function_var());
Node* this_function = environment()->Pop();
- const Operator* op = javascript()->CallRuntime(Runtime::kGetPrototype, 1);
+ const Operator* op =
+ javascript()->CallRuntime(Runtime::kInlineGetSuperConstructor, 1);
Node* super_function = NewNode(op, this_function);
- // TODO(mstarzinger): This probably needs a proper bailout id.
- PrepareFrameState(super_function, BailoutId::None());
environment()->Push(super_function);
// Evaluate all arguments to the super call.
« no previous file with comments | « no previous file | src/compiler/linkage.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698