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

Unified Diff: src/preparser.h

Issue 216883003: Make it clearer that PreParser doesn't depend on Isolate. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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 | « src/parser.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/preparser.h
diff --git a/src/preparser.h b/src/preparser.h
index 080b7728730b576a18adcb6b5699f8dd20d5e4fb..38d12e11afa752c2eea349b76519d1d59ef1d885 100644
--- a/src/preparser.h
+++ b/src/preparser.h
@@ -228,8 +228,8 @@ class ParserBase : public Traits {
FunctionState* outer_function_state_;
typename Traits::Type::Scope** scope_stack_;
typename Traits::Type::Scope* outer_scope_;
- Isolate* isolate_; // Only used by ParserTraits.
int saved_ast_node_id_; // Only used by ParserTraits.
+ typename Traits::Type::Zone* extra_param_;
typename Traits::Type::Factory factory_;
friend class ParserTraits;
@@ -829,7 +829,7 @@ class PreParserTraits {
template<typename FunctionState>
static void SetUpFunctionState(FunctionState* function_state, void*) {}
template<typename FunctionState>
- static void TearDownFunctionState(FunctionState* function_state) {}
+ static void TearDownFunctionState(FunctionState* function_state, void*) {}
// Helper functions for recursive descent.
static bool IsEvalOrArguments(PreParserIdentifier identifier) {
@@ -1181,8 +1181,8 @@ ParserBase<Traits>::FunctionState::FunctionState(
outer_function_state_(*function_state_stack),
scope_stack_(scope_stack),
outer_scope_(*scope_stack),
- isolate_(NULL),
saved_ast_node_id_(0),
+ extra_param_(extra_param),
factory_(extra_param) {
*scope_stack_ = scope;
*function_state_stack = this;
@@ -1194,7 +1194,7 @@ template<class Traits>
ParserBase<Traits>::FunctionState::~FunctionState() {
*scope_stack_ = outer_scope_;
*function_state_stack_ = outer_function_state_;
- Traits::TearDownFunctionState(this);
+ Traits::TearDownFunctionState(this, extra_param_);
}
« no previous file with comments | « src/parser.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698