Revert "Assign bailout and type feedback IDs in a post-pass"

This reverts r24757, which breaks the ARM64 simulator build.
Simple repro:

   out/arm64.debug/d8 -e 'eval("(function(){ const x; var x; })")'

TBR=bmeurer@chromium.org

Review URL: https://codereview.chromium.org/652543006

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24762 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent ce9f799d
...@@ -433,8 +433,6 @@ source_set("v8_base") { ...@@ -433,8 +433,6 @@ source_set("v8_base") {
"src/assembler.h", "src/assembler.h",
"src/assert-scope.h", "src/assert-scope.h",
"src/assert-scope.cc", "src/assert-scope.cc",
"src/ast-numbering.cc",
"src/ast-numbering.h",
"src/ast-value-factory.cc", "src/ast-value-factory.cc",
"src/ast-value-factory.h", "src/ast-value-factory.h",
"src/ast.cc", "src/ast.cc",
......
This diff is collapsed.
// Copyright 2014 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef V8_AST_NUMBERING_H_
#define V8_AST_NUMBERING_H_
namespace v8 {
namespace internal {
namespace AstNumbering {
// Assign type feedback IDs and bailout IDs to an AST node tree.
//
bool Renumber(FunctionLiteral* function, Zone* zone);
}
}
} // namespace v8::internal
#endif // V8_AST_NUMBERING_H_
...@@ -282,8 +282,6 @@ class AstValueFactory { ...@@ -282,8 +282,6 @@ class AstValueFactory {
#undef F #undef F
} }
Zone* zone() const { return zone_; }
const AstRawString* GetOneByteString(Vector<const uint8_t> literal); const AstRawString* GetOneByteString(Vector<const uint8_t> literal);
const AstRawString* GetOneByteString(const char* string) { const AstRawString* GetOneByteString(const char* string) {
return GetOneByteString(Vector<const uint8_t>( return GetOneByteString(Vector<const uint8_t>(
......
...@@ -59,8 +59,9 @@ bool Expression::IsUndefinedLiteral(Isolate* isolate) const { ...@@ -59,8 +59,9 @@ bool Expression::IsUndefinedLiteral(Isolate* isolate) const {
} }
VariableProxy::VariableProxy(Zone* zone, Variable* var, int position) VariableProxy::VariableProxy(Zone* zone, Variable* var, int position,
: Expression(zone, position), IdGen* id_gen)
: Expression(zone, position, 0, id_gen),
is_this_(var->is_this()), is_this_(var->is_this()),
is_assigned_(false), is_assigned_(false),
is_resolved_(false), is_resolved_(false),
...@@ -72,8 +73,8 @@ VariableProxy::VariableProxy(Zone* zone, Variable* var, int position) ...@@ -72,8 +73,8 @@ VariableProxy::VariableProxy(Zone* zone, Variable* var, int position)
VariableProxy::VariableProxy(Zone* zone, const AstRawString* name, bool is_this, VariableProxy::VariableProxy(Zone* zone, const AstRawString* name, bool is_this,
Interface* interface, int position) Interface* interface, int position, IdGen* id_gen)
: Expression(zone, position), : Expression(zone, position, 0, id_gen),
is_this_(is_this), is_this_(is_this),
is_assigned_(false), is_assigned_(false),
is_resolved_(false), is_resolved_(false),
...@@ -97,8 +98,8 @@ void VariableProxy::BindTo(Variable* var) { ...@@ -97,8 +98,8 @@ void VariableProxy::BindTo(Variable* var) {
Assignment::Assignment(Zone* zone, Token::Value op, Expression* target, Assignment::Assignment(Zone* zone, Token::Value op, Expression* target,
Expression* value, int pos) Expression* value, int pos, IdGen* id_gen)
: Expression(zone, pos), : Expression(zone, pos, num_ids(), id_gen),
is_uninitialized_(false), is_uninitialized_(false),
key_type_(ELEMENT), key_type_(ELEMENT),
store_mode_(STANDARD_STORE), store_mode_(STANDARD_STORE),
...@@ -989,8 +990,8 @@ RegExpAlternative::RegExpAlternative(ZoneList<RegExpTree*>* nodes) ...@@ -989,8 +990,8 @@ RegExpAlternative::RegExpAlternative(ZoneList<RegExpTree*>* nodes)
CaseClause::CaseClause(Zone* zone, Expression* label, CaseClause::CaseClause(Zone* zone, Expression* label,
ZoneList<Statement*>* statements, int pos) ZoneList<Statement*>* statements, int pos, IdGen* id_gen)
: Expression(zone, pos), : Expression(zone, pos, num_ids(), id_gen),
label_(label), label_(label),
statements_(statements), statements_(statements),
compare_type_(Type::None(zone)) {} compare_type_(Type::None(zone)) {}
......
This diff is collapsed.
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
#include "src/compiler.h" #include "src/compiler.h"
#include "src/ast-numbering.h"
#include "src/bootstrapper.h" #include "src/bootstrapper.h"
#include "src/codegen.h" #include "src/codegen.h"
#include "src/compilation-cache.h" #include "src/compilation-cache.h"
...@@ -747,7 +746,6 @@ static bool CompileOptimizedPrologue(CompilationInfo* info) { ...@@ -747,7 +746,6 @@ static bool CompileOptimizedPrologue(CompilationInfo* info) {
if (!Parser::Parse(info)) return false; if (!Parser::Parse(info)) return false;
if (!Rewriter::Rewrite(info)) return false; if (!Rewriter::Rewrite(info)) return false;
if (!Scope::Analyze(info)) return false; if (!Scope::Analyze(info)) return false;
if (!AstNumbering::Renumber(info->function(), info->zone())) return false;
DCHECK(info->scope() != NULL); DCHECK(info->scope() != NULL);
return true; return true;
} }
......
...@@ -391,6 +391,8 @@ class CompilationInfo { ...@@ -391,6 +391,8 @@ class CompilationInfo {
ast_value_factory_owned_ = owned; ast_value_factory_owned_ = owned;
} }
AstNode::IdGen* ast_node_id_gen() { return &ast_node_id_gen_; }
protected: protected:
CompilationInfo(Handle<Script> script, CompilationInfo(Handle<Script> script,
Zone* zone); Zone* zone);
...@@ -510,6 +512,7 @@ class CompilationInfo { ...@@ -510,6 +512,7 @@ class CompilationInfo {
AstValueFactory* ast_value_factory_; AstValueFactory* ast_value_factory_;
bool ast_value_factory_owned_; bool ast_value_factory_owned_;
AstNode::IdGen ast_node_id_gen_;
// This flag is used by the main thread to track whether this compilation // This flag is used by the main thread to track whether this compilation
// should be abandoned due to dependency change. // should be abandoned due to dependency change.
......
...@@ -2,8 +2,6 @@ ...@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "src/ast.h"
#include "src/ast-numbering.h"
#include "src/compiler/access-builder.h" #include "src/compiler/access-builder.h"
#include "src/compiler/ast-graph-builder.h" #include "src/compiler/ast-graph-builder.h"
#include "src/compiler/common-operator.h" #include "src/compiler/common-operator.h"
...@@ -65,7 +63,6 @@ static void Parse(Handle<JSFunction> function, CompilationInfoWithZone* info) { ...@@ -65,7 +63,6 @@ static void Parse(Handle<JSFunction> function, CompilationInfoWithZone* info) {
CHECK(Parser::Parse(info)); CHECK(Parser::Parse(info));
CHECK(Rewriter::Rewrite(info)); CHECK(Rewriter::Rewrite(info));
CHECK(Scope::Analyze(info)); CHECK(Scope::Analyze(info));
CHECK(AstNumbering::Renumber(info->function(), info->zone()));
CHECK(Compiler::EnsureDeoptimizationSupport(info)); CHECK(Compiler::EnsureDeoptimizationSupport(info));
} }
......
...@@ -4,8 +4,6 @@ ...@@ -4,8 +4,6 @@
#include "src/v8.h" #include "src/v8.h"
#include "src/ast.h"
#include "src/ast-numbering.h"
#include "src/code-factory.h" #include "src/code-factory.h"
#include "src/codegen.h" #include "src/codegen.h"
#include "src/compiler.h" #include "src/compiler.h"
...@@ -308,11 +306,6 @@ bool FullCodeGenerator::MakeCode(CompilationInfo* info) { ...@@ -308,11 +306,6 @@ bool FullCodeGenerator::MakeCode(CompilationInfo* info) {
TimerEventScope<TimerEventCompileFullCode> timer(info->isolate()); TimerEventScope<TimerEventCompileFullCode> timer(info->isolate());
if (!AstNumbering::Renumber(info->function(), info->zone())) {
DCHECK(!isolate->has_pending_exception());
return false;
}
Handle<Script> script = info->script(); Handle<Script> script = info->script();
if (!script->IsUndefined() && !script->source()->IsUndefined()) { if (!script->IsUndefined() && !script->source()->IsUndefined()) {
int len = String::cast(script->source())->length(); int len = String::cast(script->source())->length();
......
...@@ -9,7 +9,6 @@ ...@@ -9,7 +9,6 @@
#include "src/v8.h" #include "src/v8.h"
#include "src/allocation-site-scopes.h" #include "src/allocation-site-scopes.h"
#include "src/ast-numbering.h"
#include "src/full-codegen.h" #include "src/full-codegen.h"
#include "src/hydrogen-bce.h" #include "src/hydrogen-bce.h"
#include "src/hydrogen-bch.h" #include "src/hydrogen-bch.h"
...@@ -7831,8 +7830,7 @@ bool HOptimizedGraphBuilder::TryInline(Handle<JSFunction> target, ...@@ -7831,8 +7830,7 @@ bool HOptimizedGraphBuilder::TryInline(Handle<JSFunction> target,
// step, but don't transfer ownership to target_info. // step, but don't transfer ownership to target_info.
target_info.SetAstValueFactory(top_info()->ast_value_factory(), false); target_info.SetAstValueFactory(top_info()->ast_value_factory(), false);
Handle<SharedFunctionInfo> target_shared(target->shared()); Handle<SharedFunctionInfo> target_shared(target->shared());
if (!Parser::Parse(&target_info) || !Scope::Analyze(&target_info) || if (!Parser::Parse(&target_info) || !Scope::Analyze(&target_info)) {
!AstNumbering::Renumber(target_info.function(), target_info.zone())) {
if (target_info.isolate()->has_pending_exception()) { if (target_info.isolate()->has_pending_exception()) {
// Parse or scope error, never optimize this function. // Parse or scope error, never optimize this function.
SetStackOverflow(); SetStackOverflow();
......
...@@ -736,7 +736,8 @@ FunctionLiteral* ParserTraits::ParseFunctionLiteral( ...@@ -736,7 +736,8 @@ FunctionLiteral* ParserTraits::ParseFunctionLiteral(
Parser::Parser(CompilationInfo* info, ParseInfo* parse_info) Parser::Parser(CompilationInfo* info, ParseInfo* parse_info)
: ParserBase<ParserTraits>(&scanner_, parse_info->stack_limit, : ParserBase<ParserTraits>(&scanner_, parse_info->stack_limit,
info->extension(), NULL, info->zone(), this), info->extension(), NULL, info->zone(),
info->ast_node_id_gen(), this),
scanner_(parse_info->unicode_cache), scanner_(parse_info->unicode_cache),
reusable_preparser_(NULL), reusable_preparser_(NULL),
original_scope_(NULL), original_scope_(NULL),
...@@ -878,7 +879,7 @@ FunctionLiteral* Parser::DoParseProgram(CompilationInfo* info, Scope** scope, ...@@ -878,7 +879,7 @@ FunctionLiteral* Parser::DoParseProgram(CompilationInfo* info, Scope** scope,
// Enters 'scope'. // Enters 'scope'.
AstNodeFactory<AstConstructionVisitor> function_factory( AstNodeFactory<AstConstructionVisitor> function_factory(
ast_value_factory()); zone(), ast_value_factory(), info->ast_node_id_gen());
FunctionState function_state(&function_state_, &scope_, *scope, FunctionState function_state(&function_state_, &scope_, *scope,
&function_factory); &function_factory);
...@@ -993,7 +994,7 @@ FunctionLiteral* Parser::ParseLazy(Utf16CharacterStream* source) { ...@@ -993,7 +994,7 @@ FunctionLiteral* Parser::ParseLazy(Utf16CharacterStream* source) {
} }
original_scope_ = scope; original_scope_ = scope;
AstNodeFactory<AstConstructionVisitor> function_factory( AstNodeFactory<AstConstructionVisitor> function_factory(
ast_value_factory()); zone(), ast_value_factory(), info()->ast_node_id_gen());
FunctionState function_state(&function_state_, &scope_, scope, FunctionState function_state(&function_state_, &scope_, scope,
&function_factory); &function_factory);
DCHECK(scope->strict_mode() == SLOPPY || info()->strict_mode() == STRICT); DCHECK(scope->strict_mode() == SLOPPY || info()->strict_mode() == STRICT);
...@@ -3495,7 +3496,7 @@ FunctionLiteral* Parser::ParseFunctionLiteral( ...@@ -3495,7 +3496,7 @@ FunctionLiteral* Parser::ParseFunctionLiteral(
// Parse function body. // Parse function body.
{ {
AstNodeFactory<AstConstructionVisitor> function_factory( AstNodeFactory<AstConstructionVisitor> function_factory(
ast_value_factory()); zone(), ast_value_factory(), info()->ast_node_id_gen());
FunctionState function_state(&function_state_, &scope_, scope, FunctionState function_state(&function_state_, &scope_, scope,
&function_factory); &function_factory);
scope_->SetScopeName(function_name); scope_->SetScopeName(function_name);
......
...@@ -104,11 +104,11 @@ PreParser::PreParseResult PreParser::PreParseLazyFunction( ...@@ -104,11 +104,11 @@ PreParser::PreParseResult PreParser::PreParseLazyFunction(
log_ = log; log_ = log;
// Lazy functions always have trivial outer scopes (no with/catch scopes). // Lazy functions always have trivial outer scopes (no with/catch scopes).
PreParserScope top_scope(scope_, GLOBAL_SCOPE); PreParserScope top_scope(scope_, GLOBAL_SCOPE);
PreParserFactory top_factory(NULL); PreParserFactory top_factory(NULL, NULL, NULL);
FunctionState top_state(&function_state_, &scope_, &top_scope, &top_factory); FunctionState top_state(&function_state_, &scope_, &top_scope, &top_factory);
scope_->SetStrictMode(strict_mode); scope_->SetStrictMode(strict_mode);
PreParserScope function_scope(scope_, FUNCTION_SCOPE); PreParserScope function_scope(scope_, FUNCTION_SCOPE);
PreParserFactory function_factory(NULL); PreParserFactory function_factory(NULL, NULL, NULL);
FunctionState function_state(&function_state_, &scope_, &function_scope, FunctionState function_state(&function_state_, &scope_, &function_scope,
&function_factory); &function_factory);
function_state.set_is_generator(is_generator); function_state.set_is_generator(is_generator);
...@@ -813,7 +813,7 @@ PreParser::Expression PreParser::ParseFunctionLiteral( ...@@ -813,7 +813,7 @@ PreParser::Expression PreParser::ParseFunctionLiteral(
// Parse function body. // Parse function body.
ScopeType outer_scope_type = scope_->type(); ScopeType outer_scope_type = scope_->type();
PreParserScope function_scope(scope_, FUNCTION_SCOPE); PreParserScope function_scope(scope_, FUNCTION_SCOPE);
PreParserFactory factory(NULL); PreParserFactory factory(NULL, NULL, NULL);
FunctionState function_state(&function_state_, &scope_, &function_scope, FunctionState function_state(&function_state_, &scope_, &function_scope,
&factory); &factory);
function_state.set_is_generator(IsGeneratorFunction(kind)); function_state.set_is_generator(IsGeneratorFunction(kind));
......
...@@ -70,6 +70,7 @@ class ParserBase : public Traits { ...@@ -70,6 +70,7 @@ class ParserBase : public Traits {
ParserBase(Scanner* scanner, uintptr_t stack_limit, v8::Extension* extension, ParserBase(Scanner* scanner, uintptr_t stack_limit, v8::Extension* extension,
ParserRecorder* log, typename Traits::Type::Zone* zone, ParserRecorder* log, typename Traits::Type::Zone* zone,
AstNode::IdGen* ast_node_id_gen,
typename Traits::Type::Parser this_object) typename Traits::Type::Parser this_object)
: Traits(this_object), : Traits(this_object),
parenthesized_function_(false), parenthesized_function_(false),
...@@ -86,7 +87,8 @@ class ParserBase : public Traits { ...@@ -86,7 +87,8 @@ class ParserBase : public Traits {
allow_natives_syntax_(false), allow_natives_syntax_(false),
allow_arrow_functions_(false), allow_arrow_functions_(false),
allow_harmony_object_literals_(false), allow_harmony_object_literals_(false),
zone_(zone) {} zone_(zone),
ast_node_id_gen_(ast_node_id_gen) {}
// Getters that indicate whether certain syntactical constructs are // Getters that indicate whether certain syntactical constructs are
// allowed to be parsed by this instance of the parser. // allowed to be parsed by this instance of the parser.
...@@ -275,6 +277,7 @@ class ParserBase : public Traits { ...@@ -275,6 +277,7 @@ class ParserBase : public Traits {
void set_stack_overflow() { stack_overflow_ = true; } void set_stack_overflow() { stack_overflow_ = true; }
Mode mode() const { return mode_; } Mode mode() const { return mode_; }
typename Traits::Type::Zone* zone() const { return zone_; } typename Traits::Type::Zone* zone() const { return zone_; }
AstNode::IdGen* ast_node_id_gen() const { return ast_node_id_gen_; }
INLINE(Token::Value peek()) { INLINE(Token::Value peek()) {
if (stack_overflow_) return Token::ILLEGAL; if (stack_overflow_) return Token::ILLEGAL;
...@@ -577,6 +580,7 @@ class ParserBase : public Traits { ...@@ -577,6 +580,7 @@ class ParserBase : public Traits {
bool allow_harmony_object_literals_; bool allow_harmony_object_literals_;
typename Traits::Type::Zone* zone_; // Only used by Parser. typename Traits::Type::Zone* zone_; // Only used by Parser.
AstNode::IdGen* ast_node_id_gen_;
}; };
...@@ -968,7 +972,7 @@ class PreParserScope { ...@@ -968,7 +972,7 @@ class PreParserScope {
class PreParserFactory { class PreParserFactory {
public: public:
explicit PreParserFactory(void* unused_value_factory) {} PreParserFactory(void*, void*, void*) {}
PreParserExpression NewStringLiteral(PreParserIdentifier identifier, PreParserExpression NewStringLiteral(PreParserIdentifier identifier,
int pos) { int pos) {
return PreParserExpression::Default(); return PreParserExpression::Default();
...@@ -1413,7 +1417,7 @@ class PreParser : public ParserBase<PreParserTraits> { ...@@ -1413,7 +1417,7 @@ class PreParser : public ParserBase<PreParserTraits> {
}; };
PreParser(Scanner* scanner, ParserRecorder* log, uintptr_t stack_limit) PreParser(Scanner* scanner, ParserRecorder* log, uintptr_t stack_limit)
: ParserBase<PreParserTraits>(scanner, stack_limit, NULL, log, NULL, : ParserBase<PreParserTraits>(scanner, stack_limit, NULL, log, NULL, NULL,
this) {} this) {}
// Pre-parse the program from the character stream; returns true on // Pre-parse the program from the character stream; returns true on
...@@ -1422,7 +1426,7 @@ class PreParser : public ParserBase<PreParserTraits> { ...@@ -1422,7 +1426,7 @@ class PreParser : public ParserBase<PreParserTraits> {
// during parsing. // during parsing.
PreParseResult PreParseProgram() { PreParseResult PreParseProgram() {
PreParserScope scope(scope_, GLOBAL_SCOPE); PreParserScope scope(scope_, GLOBAL_SCOPE);
PreParserFactory factory(NULL); PreParserFactory factory(NULL, NULL, NULL);
FunctionState top_scope(&function_state_, &scope_, &scope, &factory); FunctionState top_scope(&function_state_, &scope_, &scope, &factory);
bool ok = true; bool ok = true;
int start_position = scanner()->peek_location().beg_pos; int start_position = scanner()->peek_location().beg_pos;
...@@ -2612,7 +2616,8 @@ typename ParserBase<Traits>::ExpressionT ParserBase< ...@@ -2612,7 +2616,8 @@ typename ParserBase<Traits>::ExpressionT ParserBase<
int handler_count = 0; int handler_count = 0;
{ {
typename Traits::Type::Factory function_factory(this->ast_value_factory()); typename Traits::Type::Factory function_factory(
zone(), this->ast_value_factory(), ast_node_id_gen_);
FunctionState function_state(&function_state_, &scope_, FunctionState function_state(&function_state_, &scope_,
Traits::Type::ptr_to_scope(scope), Traits::Type::ptr_to_scope(scope),
&function_factory); &function_factory);
......
...@@ -15,13 +15,15 @@ namespace internal { ...@@ -15,13 +15,15 @@ namespace internal {
class Processor: public AstVisitor { class Processor: public AstVisitor {
public: public:
Processor(Variable* result, AstValueFactory* ast_value_factory) Processor(Variable* result, Zone* zone, AstNode::IdGen* ast_node_id_gen)
: result_(result), : result_(result),
result_assigned_(false), result_assigned_(false),
is_set_(false), is_set_(false),
in_try_(false), in_try_(false),
factory_(ast_value_factory) { // Passing a null AstValueFactory is fine, because Processor doesn't
InitializeAstVisitor(ast_value_factory->zone()); // need to create strings or literals.
factory_(zone, NULL, ast_node_id_gen) {
InitializeAstVisitor(zone);
} }
virtual ~Processor() { } virtual ~Processor() { }
...@@ -238,7 +240,7 @@ bool Rewriter::Rewrite(CompilationInfo* info) { ...@@ -238,7 +240,7 @@ bool Rewriter::Rewrite(CompilationInfo* info) {
scope->NewTemporary(info->ast_value_factory()->dot_result_string()); scope->NewTemporary(info->ast_value_factory()->dot_result_string());
// The name string must be internalized at this point. // The name string must be internalized at this point.
DCHECK(!result->name().is_null()); DCHECK(!result->name().is_null());
Processor processor(result, info->ast_value_factory()); Processor processor(result, info->zone(), info->ast_node_id_gen());
processor.Process(body); processor.Process(body);
if (processor.HasStackOverflow()) return false; if (processor.HasStackOverflow()) return false;
......
...@@ -275,7 +275,8 @@ bool Scope::Analyze(CompilationInfo* info) { ...@@ -275,7 +275,8 @@ bool Scope::Analyze(CompilationInfo* info) {
// Allocate the variables. // Allocate the variables.
{ {
AstNodeFactory<AstNullVisitor> ast_node_factory(info->ast_value_factory()); AstNodeFactory<AstNullVisitor> ast_node_factory(
info->zone(), info->ast_value_factory(), info->ast_node_id_gen());
if (!top->AllocateVariables(info, &ast_node_factory)) return false; if (!top->AllocateVariables(info, &ast_node_factory)) return false;
} }
......
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
#include "src/v8.h" #include "src/v8.h"
#include "test/cctest/cctest.h" #include "test/cctest/cctest.h"
#include "src/ast-numbering.h"
#include "src/compiler.h" #include "src/compiler.h"
#include "src/compiler/linkage.h" #include "src/compiler/linkage.h"
#include "src/compiler/pipeline.h" #include "src/compiler/pipeline.h"
...@@ -167,7 +166,6 @@ class FunctionTester : public InitializedHandleScope { ...@@ -167,7 +166,6 @@ class FunctionTester : public InitializedHandleScope {
} }
CHECK(Rewriter::Rewrite(&info)); CHECK(Rewriter::Rewrite(&info));
CHECK(Scope::Analyze(&info)); CHECK(Scope::Analyze(&info));
CHECK(AstNumbering::Renumber(info.function(), info.zone()));
CHECK(Compiler::EnsureDeoptimizationSupport(&info)); CHECK(Compiler::EnsureDeoptimizationSupport(&info));
Pipeline pipeline(&info); Pipeline pipeline(&info);
...@@ -217,7 +215,6 @@ class FunctionTester : public InitializedHandleScope { ...@@ -217,7 +215,6 @@ class FunctionTester : public InitializedHandleScope {
Handle<Code>(function->shared()->code())); Handle<Code>(function->shared()->code()));
CHECK(Rewriter::Rewrite(&info)); CHECK(Rewriter::Rewrite(&info));
CHECK(Scope::Analyze(&info)); CHECK(Scope::Analyze(&info));
CHECK(AstNumbering::Renumber(info.function(), info.zone()));
CHECK(Compiler::EnsureDeoptimizationSupport(&info)); CHECK(Compiler::EnsureDeoptimizationSupport(&info));
Pipeline pipeline(&info); Pipeline pipeline(&info);
......
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
#include "src/compiler/register-allocator.h" #include "src/compiler/register-allocator.h"
#include "src/compiler/schedule.h" #include "src/compiler/schedule.h"
#include "src/ast-numbering.h"
#include "src/full-codegen.h" #include "src/full-codegen.h"
#include "src/parser.h" #include "src/parser.h"
#include "src/rewriter.h" #include "src/rewriter.h"
...@@ -49,7 +48,6 @@ class DeoptCodegenTester { ...@@ -49,7 +48,6 @@ class DeoptCodegenTester {
info.SetOptimizing(BailoutId::None(), Handle<Code>(function->code())); info.SetOptimizing(BailoutId::None(), Handle<Code>(function->code()));
CHECK(Rewriter::Rewrite(&info)); CHECK(Rewriter::Rewrite(&info));
CHECK(Scope::Analyze(&info)); CHECK(Scope::Analyze(&info));
CHECK(AstNumbering::Renumber(info.function(), info.zone()));
CHECK(Compiler::EnsureDeoptimizationSupport(&info)); CHECK(Compiler::EnsureDeoptimizationSupport(&info));
DCHECK(info.shared_info()->has_deoptimization_support()); DCHECK(info.shared_info()->has_deoptimization_support());
......
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
#include "src/v8.h" #include "src/v8.h"
#include "test/cctest/cctest.h" #include "test/cctest/cctest.h"
#include "src/ast-numbering.h"
#include "src/compiler.h" #include "src/compiler.h"
#include "src/compiler/pipeline.h" #include "src/compiler/pipeline.h"
#include "src/handles.h" #include "src/handles.h"
...@@ -26,7 +25,6 @@ TEST(PipelineAdd) { ...@@ -26,7 +25,6 @@ TEST(PipelineAdd) {
CHECK(Parser::Parse(&info)); CHECK(Parser::Parse(&info));
CHECK(Rewriter::Rewrite(&info)); CHECK(Rewriter::Rewrite(&info));
CHECK(Scope::Analyze(&info)); CHECK(Scope::Analyze(&info));
CHECK(AstNumbering::Renumber(info.function(), info.zone()));
CHECK_NE(NULL, info.scope()); CHECK_NE(NULL, info.scope());
Pipeline pipeline(&info); Pipeline pipeline(&info);
......
...@@ -40,8 +40,8 @@ TEST(List) { ...@@ -40,8 +40,8 @@ TEST(List) {
Isolate* isolate = CcTest::i_isolate(); Isolate* isolate = CcTest::i_isolate();
Zone zone(isolate); Zone zone(isolate);
AstValueFactory value_factory(&zone, 0); AstNode::IdGen id_gen;
AstNodeFactory<AstNullVisitor> factory(&value_factory); AstNodeFactory<AstNullVisitor> factory(&zone, NULL, &id_gen);
AstNode* node = factory.NewEmptyStatement(RelocInfo::kNoPosition); AstNode* node = factory.NewEmptyStatement(RelocInfo::kNoPosition);
list->Add(node); list->Add(node);
CHECK_EQ(1, list->length()); CHECK_EQ(1, list->length());
......
...@@ -31,8 +31,6 @@ ...@@ -31,8 +31,6 @@
#include "src/v8.h" #include "src/v8.h"
#include "src/ast.h"
#include "src/ast-numbering.h"
#include "src/ast-value-factory.h" #include "src/ast-value-factory.h"
#include "src/compiler.h" #include "src/compiler.h"
#include "src/execution.h" #include "src/execution.h"
...@@ -3275,7 +3273,6 @@ TEST(InnerAssignment) { ...@@ -3275,7 +3273,6 @@ TEST(InnerAssignment) {
CHECK(parser.Parse()); CHECK(parser.Parse());
CHECK(i::Rewriter::Rewrite(&info)); CHECK(i::Rewriter::Rewrite(&info));
CHECK(i::Scope::Analyze(&info)); CHECK(i::Scope::Analyze(&info));
CHECK(i::AstNumbering::Renumber(info.function(), info.zone()));
CHECK(info.function() != NULL); CHECK(info.function() != NULL);
i::Scope* scope = info.function()->scope(); i::Scope* scope = info.function()->scope();
......
...@@ -349,8 +349,6 @@ ...@@ -349,8 +349,6 @@
'../../src/assert-scope.cc', '../../src/assert-scope.cc',
'../../src/ast-value-factory.cc', '../../src/ast-value-factory.cc',
'../../src/ast-value-factory.h', '../../src/ast-value-factory.h',
'../../src/ast-numbering.cc',
'../../src/ast-numbering.h',
'../../src/ast.cc', '../../src/ast.cc',
'../../src/ast.h', '../../src/ast.h',
'../../src/background-parsing-task.cc', '../../src/background-parsing-task.cc',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment