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

Unified Diff: runtime/vm/intermediate_language.h

Issue 10536162: Add token kind into InstanceCallComp so that we do not need to extract it from name (addresses vego… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 6 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/flow_graph_optimizer.cc ('k') | runtime/vm/token.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language.h
===================================================================
--- runtime/vm/intermediate_language.h (revision 8672)
+++ runtime/vm/intermediate_language.h (working copy)
@@ -466,18 +466,23 @@
InstanceCallComp(intptr_t token_index,
intptr_t try_index,
const String& function_name,
+ Token::Kind token_kind,
ZoneGrowableArray<Value*>* arguments,
const Array& argument_names,
intptr_t checked_argument_count)
: token_index_(token_index),
try_index_(try_index),
function_name_(function_name),
+ token_kind_(token_kind),
arguments_(arguments),
argument_names_(argument_names),
checked_argument_count_(checked_argument_count) {
ASSERT(function_name.IsZoneHandle());
ASSERT(!arguments->is_empty());
ASSERT(argument_names.IsZoneHandle());
+ ASSERT(Token::IsBinaryToken(token_kind) ||
+ Token::IsUnaryToken(token_kind) ||
+ token_kind == Token::kGET);
}
DECLARE_COMPUTATION(InstanceCall)
@@ -485,6 +490,7 @@
intptr_t token_index() const { return token_index_; }
intptr_t try_index() const { return try_index_; }
const String& function_name() const { return function_name_; }
+ Token::Kind token_kind() const { return token_kind_; }
intptr_t ArgumentCount() const { return arguments_->length(); }
Value* ArgumentAt(intptr_t index) const { return (*arguments_)[index]; }
const Array& argument_names() const { return argument_names_; }
@@ -499,6 +505,7 @@
const intptr_t token_index_;
const intptr_t try_index_;
const String& function_name_;
+ const Token::Kind token_kind_; // Binary op, unary op or kGET.
ZoneGrowableArray<Value*>* const arguments_;
const Array& argument_names_;
const intptr_t checked_argument_count_;
« no previous file with comments | « runtime/vm/flow_graph_optimizer.cc ('k') | runtime/vm/token.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698