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

Unified Diff: src/ast.cc

Issue 1414413004: Distinguish Call::CallType::PROPERTY_CALL further. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_issue-4521
Patch Set: Ports. 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 | « src/ast.h ('k') | src/compiler/ast-graph-builder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast.cc
diff --git a/src/ast.cc b/src/ast.cc
index f94e370f3c87aca452398881a3dd12c851eff8bf..ca0a7465b12e61d77d2a9b069da79100d4da18fa 100644
--- a/src/ast.cc
+++ b/src/ast.cc
@@ -761,7 +761,16 @@ Call::CallType Call::GetCallType(Isolate* isolate) const {
if (expression()->IsSuperCallReference()) return SUPER_CALL;
Property* property = expression()->AsProperty();
- return property != NULL ? PROPERTY_CALL : OTHER_CALL;
+ if (property != nullptr) {
+ bool is_super = property->IsSuperAccess();
+ if (property->key()->IsPropertyName()) {
+ return is_super ? NAMED_SUPER_PROPERTY_CALL : NAMED_PROPERTY_CALL;
+ } else {
+ return is_super ? KEYED_SUPER_PROPERTY_CALL : KEYED_PROPERTY_CALL;
+ }
+ }
+
+ return OTHER_CALL;
}
« no previous file with comments | « src/ast.h ('k') | src/compiler/ast-graph-builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698