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

Unified Diff: src/preparser.h

Issue 663373003: Assign bailout and type feedback IDs in a post-pass (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 2 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.cc ('k') | src/preparser.cc » ('j') | 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 20bf9e998f7d2fda800e3c9c109deadd44057d80..fd82651a7e012a88c7e09c58c53732522853d121 100644
--- a/src/preparser.h
+++ b/src/preparser.h
@@ -70,7 +70,6 @@ class ParserBase : public Traits {
ParserBase(Scanner* scanner, uintptr_t stack_limit, v8::Extension* extension,
ParserRecorder* log, typename Traits::Type::Zone* zone,
- AstNode::IdGen* ast_node_id_gen,
typename Traits::Type::Parser this_object)
: Traits(this_object),
parenthesized_function_(false),
@@ -87,8 +86,7 @@ class ParserBase : public Traits {
allow_natives_syntax_(false),
allow_arrow_functions_(false),
allow_harmony_object_literals_(false),
- zone_(zone),
- ast_node_id_gen_(ast_node_id_gen) {}
+ zone_(zone) {}
// Getters that indicate whether certain syntactical constructs are
// allowed to be parsed by this instance of the parser.
@@ -277,7 +275,6 @@ class ParserBase : public Traits {
void set_stack_overflow() { stack_overflow_ = true; }
Mode mode() const { return mode_; }
typename Traits::Type::Zone* zone() const { return zone_; }
- AstNode::IdGen* ast_node_id_gen() const { return ast_node_id_gen_; }
INLINE(Token::Value peek()) {
if (stack_overflow_) return Token::ILLEGAL;
@@ -580,7 +577,6 @@ class ParserBase : public Traits {
bool allow_harmony_object_literals_;
typename Traits::Type::Zone* zone_; // Only used by Parser.
- AstNode::IdGen* ast_node_id_gen_;
};
@@ -972,7 +968,7 @@ class PreParserScope {
class PreParserFactory {
public:
- PreParserFactory(void*, void*, void*) {}
+ explicit PreParserFactory(void* unused_value_factory) {}
PreParserExpression NewStringLiteral(PreParserIdentifier identifier,
int pos) {
return PreParserExpression::Default();
@@ -1417,7 +1413,7 @@ class PreParser : public ParserBase<PreParserTraits> {
};
PreParser(Scanner* scanner, ParserRecorder* log, uintptr_t stack_limit)
- : ParserBase<PreParserTraits>(scanner, stack_limit, NULL, log, NULL, NULL,
+ : ParserBase<PreParserTraits>(scanner, stack_limit, NULL, log, NULL,
this) {}
// Pre-parse the program from the character stream; returns true on
@@ -1426,7 +1422,7 @@ class PreParser : public ParserBase<PreParserTraits> {
// during parsing.
PreParseResult PreParseProgram() {
PreParserScope scope(scope_, GLOBAL_SCOPE);
- PreParserFactory factory(NULL, NULL, NULL);
+ PreParserFactory factory(NULL);
FunctionState top_scope(&function_state_, &scope_, &scope, &factory);
bool ok = true;
int start_position = scanner()->peek_location().beg_pos;
@@ -2616,8 +2612,7 @@ typename ParserBase<Traits>::ExpressionT ParserBase<
int handler_count = 0;
{
- typename Traits::Type::Factory function_factory(
- zone(), this->ast_value_factory(), ast_node_id_gen_);
+ typename Traits::Type::Factory function_factory(this->ast_value_factory());
FunctionState function_state(&function_state_, &scope_,
Traits::Type::ptr_to_scope(scope),
&function_factory);
« no previous file with comments | « src/parser.cc ('k') | src/preparser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698