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

Unified Diff: runtime/vm/parser.cc

Issue 977283002: Display call site data for functions. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 9 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 | « runtime/vm/parser.h ('k') | runtime/vm/service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/parser.cc
diff --git a/runtime/vm/parser.cc b/runtime/vm/parser.cc
index 38ceacdd1a3bba7eb13bbfa107ec53d8e2653c35..b10f0807da4f0d15a93484e77b6bfcd70d763087 100644
--- a/runtime/vm/parser.cc
+++ b/runtime/vm/parser.cc
@@ -10543,16 +10543,17 @@ AstNode* Parser::ParseStaticCall(const Class& cls,
arguments->NodeAt(1));
}
}
- return new(Z) StaticCallNode(call_pos, func, arguments);
+ return new(Z) StaticCallNode(ident_pos, func, arguments);
}
-AstNode* Parser::ParseInstanceCall(AstNode* receiver, const String& func_name) {
+AstNode* Parser::ParseInstanceCall(AstNode* receiver,
+ const String& func_name,
+ intptr_t ident_pos) {
TRACE_PARSER("ParseInstanceCall");
- const intptr_t call_pos = TokenPos();
CheckToken(Token::kLPAREN);
ArgumentListNode* arguments = ParseActualParameters(NULL, kAllowConst);
- return new(Z) InstanceCallNode(call_pos, receiver, func_name, arguments);
+ return new(Z) InstanceCallNode(ident_pos, receiver, func_name, arguments);
}
@@ -10752,7 +10753,7 @@ AstNode* Parser::ParseSelectors(AstNode* primary, bool is_cascade) {
const Class& cls = Class::Cast(left->AsPrimaryNode()->primary());
selector = ParseStaticCall(cls, *ident, ident_pos);
} else {
- selector = ParseInstanceCall(left, *ident);
+ selector = ParseInstanceCall(left, *ident, ident_pos);
}
} else {
// Field access.
@@ -10846,7 +10847,9 @@ AstNode* Parser::ParseSelectors(AstNode* primary, bool is_cascade) {
"from static function",
func_name.ToCString());
}
- selector = ParseInstanceCall(LoadReceiver(primary_pos), func_name);
+ selector = ParseInstanceCall(LoadReceiver(primary_pos),
+ func_name,
+ primary_pos);
}
} else if (primary_node->primary().IsString()) {
// Primary is an unresolved name.
@@ -10865,7 +10868,9 @@ AstNode* Parser::ParseSelectors(AstNode* primary, bool is_cascade) {
NULL); // No existing function.
} else {
// Treat as call to unresolved (instance) method.
- selector = ParseInstanceCall(LoadReceiver(primary_pos), name);
+ selector = ParseInstanceCall(LoadReceiver(primary_pos),
+ name,
+ primary_pos);
}
} else if (primary_node->primary().IsTypeParameter()) {
const String& name = String::ZoneHandle(Z,
@@ -10878,7 +10883,9 @@ AstNode* Parser::ParseSelectors(AstNode* primary, bool is_cascade) {
name.ToCString());
} else {
// Treat as call to unresolved (instance) method.
- selector = ParseInstanceCall(LoadReceiver(primary_pos), name);
+ selector = ParseInstanceCall(LoadReceiver(primary_pos),
+ name,
+ primary_pos);
}
} else if (primary_node->primary().IsClass()) {
const Class& type_class = Class::Cast(primary_node->primary());
« no previous file with comments | « runtime/vm/parser.h ('k') | runtime/vm/service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698