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

Unified Diff: runtime/vm/parser.h

Issue 12225141: Minor cleanup (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 10 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/parser.cc » ('j') | runtime/vm/parser.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/parser.h
===================================================================
--- runtime/vm/parser.h (revision 18388)
+++ runtime/vm/parser.h (working copy)
@@ -73,6 +73,9 @@
ASSERT(saved_current_context_var != NULL);
saved_current_context_var_ = saved_current_context_var;
}
+ bool has_saved_current_context_var() const {
+ return saved_current_context_var_ != NULL;
+ }
LocalVariable* saved_entry_context_var() const {
return saved_entry_context_var_;
@@ -127,7 +130,7 @@
class Parser : public ValueObject {
public:
Parser(const Script& script, const Library& library);
- Parser(const Script& script, const Function& function, intptr_t token_pos);
+ Parser(const Script& script, ParsedFunction* function, intptr_t token_pos);
// Parse the top level of a whole script file and register declared classes
// in the given library.
@@ -199,6 +202,11 @@
const Class& current_class() const;
void set_current_class(const Class& value);
+ // ParsedFunction accessor.
+ ParsedFunction* parsed_function() const {
+ return parsed_function_;
+ }
+
// Parsing a library or a regular source script.
bool is_library_source() const {
return (script_.kind() == RawScript::kScriptTag) ||
@@ -624,7 +632,7 @@
bool allow_function_literals_;
// The function currently being compiled.
- const Function& current_function_;
+ ParsedFunction* parsed_function_;
// The function currently being parsed.
Function& innermost_function_;
@@ -641,12 +649,6 @@
// done using 'return', 'break' or 'continue' statements.
TryBlocks* try_blocks_list_;
- // Allocate temporary only once per function.
- LocalVariable* expression_temp_;
-
- // Allocate saved current context only if needed.
- LocalVariable* saved_current_context_;
-
DISALLOW_COPY_AND_ASSIGN(Parser);
};
« no previous file with comments | « no previous file | runtime/vm/parser.cc » ('j') | runtime/vm/parser.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698