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

Unified Diff: runtime/vm/ast.h

Issue 10115053: Assign ids to incoming arguments (to be used in checked mode). (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 8 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 | runtime/vm/code_descriptors_test.cc » ('j') | runtime/vm/parser.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/ast.h
===================================================================
--- runtime/vm/ast.h (revision 6717)
+++ runtime/vm/ast.h (working copy)
@@ -173,6 +173,8 @@
virtual const Instance* EvalConstExpr() const { return NULL; }
protected:
+ friend class ParsedFunction;
+
const ICData& ic_data() const { return ic_data_; }
void set_ic_data(const ICData& value) {
ic_data_ = value.raw();
@@ -203,7 +205,9 @@
: AstNode(token_index),
scope_(scope),
nodes_(4),
- label_(NULL) {
+ label_(NULL),
+ first_parameter_id_(AstNode::kNoId),
+ last_parameter_id_(AstNode::kNoId) {
}
LocalScope* scope() const { return scope_; }
@@ -217,6 +221,15 @@
intptr_t length() const { return nodes_.length(); }
AstNode* NodeAt(intptr_t index) const { return nodes_[index]; }
+ void set_first_parameter_id(intptr_t value) { first_parameter_id_ = value; }
+ void set_last_parameter_id(intptr_t value) { last_parameter_id_ = value; }
+ intptr_t ParameterIdAt(intptr_t param_pos) const {
+ ASSERT(first_parameter_id_ != AstNode::kNoId);
+ ASSERT(last_parameter_id_ != AstNode::kNoId);
+ ASSERT(param_pos <= (last_parameter_id_ - first_parameter_id_));
+ return first_parameter_id_ + param_pos;
+ }
+
DECLARE_COMMON_NODE_FUNCTIONS(SequenceNode);
// Collects all nodes accessible from this sequence node into array 'nodes'.
@@ -226,6 +239,8 @@
LocalScope* scope_;
GrowableArray<AstNode*> nodes_;
SourceLabel* label_;
+ intptr_t first_parameter_id_;
+ intptr_t last_parameter_id_;
DISALLOW_COPY_AND_ASSIGN(SequenceNode);
};
« no previous file with comments | « no previous file | runtime/vm/code_descriptors_test.cc » ('j') | runtime/vm/parser.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698