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

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

Issue 1419173004: [turbofan] Fix super property calls to act as method calls. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_cleanup-ast-call-type
Patch Set: Addressed comment. Created 5 years, 2 months 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 | test/mjsunit/regress/regress-4525.js » ('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 1195034bef49f6be2a6cf348430347c2cf12b00e..c49b41b5f4357811f1058f2632313c2538016258 100644
--- a/src/compiler/ast-graph-builder.cc
+++ b/src/compiler/ast-graph-builder.cc
@@ -2353,7 +2353,7 @@ void AstGraphBuilder::VisitCall(Call* expr) {
callee_value = BuildNamedLoad(object, name, feedback);
states.AddToNode(callee_value, property->LoadId(),
OutputFrameStateCombine::Push());
- // Note that a PROPERTY_CALL requires the receiver to be wrapped into
+ // Note that a property call requires the receiver to be wrapped into
// an object for sloppy callees. However the receiver is guaranteed
// not to be null or undefined at this point.
receiver_hint = ConvertReceiverMode::kNotNullOrUndefined;
@@ -2373,7 +2373,7 @@ void AstGraphBuilder::VisitCall(Call* expr) {
callee_value = BuildKeyedLoad(object, key, feedback);
states.AddToNode(callee_value, property->LoadId(),
OutputFrameStateCombine::Push());
- // Note that a PROPERTY_CALL requires the receiver to be wrapped into
+ // Note that a property call requires the receiver to be wrapped into
// an object for sloppy callees. However the receiver is guaranteed
// not to be null or undefined at this point.
receiver_hint = ConvertReceiverMode::kNotNullOrUndefined;
@@ -2394,9 +2394,11 @@ void AstGraphBuilder::VisitCall(Call* expr) {
callee_value = BuildNamedSuperLoad(object, home, name, VectorSlotPair());
states.AddToNode(callee_value, property->LoadId(),
OutputFrameStateCombine::Push());
- // Note that the receiver is not the target of the property load, so
- // it could very well be null or undefined at this point.
+ // Note that a property call requires the receiver to be wrapped into
+ // an object for sloppy callees. Since the receiver is not the target of
+ // the load, it could very well be null or undefined at this point.
receiver_value = environment()->Pop();
+ flags = CALL_AS_METHOD;
environment()->Drop(1);
break;
}
@@ -2416,9 +2418,11 @@ void AstGraphBuilder::VisitCall(Call* expr) {
callee_value = BuildKeyedSuperLoad(object, home, key, VectorSlotPair());
states.AddToNode(callee_value, property->LoadId(),
OutputFrameStateCombine::Push());
- // Note that the receiver is not the target of the property load, so
- // it could very well be null or undefined at this point.
+ // Note that a property call requires the receiver to be wrapped into
+ // an object for sloppy callees. Since the receiver is not the target of
+ // the load, it could very well be null or undefined at this point.
receiver_value = environment()->Pop();
+ flags = CALL_AS_METHOD;
environment()->Drop(1);
break;
}
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-4525.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698