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

Unified Diff: runtime/vm/parser.h

Issue 10389041: Adapt compile time constants and integrate with Kevin's CL 10302007 (Remove temporaries using expli… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 7 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
Index: runtime/vm/parser.h
===================================================================
--- runtime/vm/parser.h (revision 7463)
+++ runtime/vm/parser.h (working copy)
@@ -36,6 +36,7 @@
instantiator_(NULL),
default_parameter_values_(Array::Handle()),
saved_context_var_(NULL),
+ expression_temp_var_(NULL),
first_parameter_index_(0),
first_stack_local_index_(0),
copied_parameter_count_(0),
@@ -65,6 +66,19 @@
saved_context_var_ = saved_context_var;
}
+ LocalVariable* expression_temp_var() const {
+ ASSERT(has_expression_temp_var());
+ return expression_temp_var_;
+ }
+ void set_expression_temp_var(LocalVariable* value) {
+ ASSERT(!has_expression_temp_var());
+ expression_temp_var_ = value;
+ }
+ bool has_expression_temp_var() const {
+ return expression_temp_var_ != NULL;
+ }
+ static LocalVariable* CreateExpressionTempVar(intptr_t token_index);
+
int first_parameter_index() const { return first_parameter_index_; }
int first_stack_local_index() const { return first_stack_local_index_; }
int copied_parameter_count() const { return copied_parameter_count_; }
@@ -78,6 +92,7 @@
AstNode* instantiator_;
Array& default_parameter_values_;
LocalVariable* saved_context_var_;
+ LocalVariable* expression_temp_var_;
int first_parameter_index_;
int first_stack_local_index_;
@@ -468,6 +483,7 @@
void CheckOperatorArity(const MemberDesc& member, Token::Kind operator_token);
const LocalVariable& GetIncrementTempLocal();
+ void EnsureExpressionTemp();
const Script& script_;
const TokenStream& tokens_;
@@ -503,7 +519,7 @@
TryBlocks* try_blocks_list_;
// Allocate temporary only once per function.
- LocalVariable* increment_temp_;
+ LocalVariable* expression_temp_;
DISALLOW_COPY_AND_ASSIGN(Parser);
};
« no previous file with comments | « runtime/vm/intermediate_language.h ('k') | runtime/vm/parser.cc » ('j') | runtime/vm/parser.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698