Revision: 24910
Author: [email protected]
Date: Mon Oct 27 16:25:11 2014 UTC
Log: Revert "Move AST node counting to post-pass"
This reverts commit 698356720824559a6bd81c24be707b44ac277526 for
breaking regress-96526-002 among other things.
[email protected]
BUG=
Review URL: https://codereview.chromium.org/678033002
https://code.google.com/p/v8/source/detail?r=24910
Modified:
/branches/bleeding_edge/src/ast-numbering.cc
/branches/bleeding_edge/src/ast.cc
/branches/bleeding_edge/src/ast.h
/branches/bleeding_edge/src/compiler/js-inlining.cc
/branches/bleeding_edge/src/compiler.cc
/branches/bleeding_edge/src/compiler.h
/branches/bleeding_edge/src/full-codegen.cc
/branches/bleeding_edge/src/hydrogen.cc
/branches/bleeding_edge/test/cctest/compiler/function-tester.h
/branches/bleeding_edge/test/cctest/compiler/test-codegen-deopt.cc
/branches/bleeding_edge/test/cctest/compiler/test-pipeline.cc
/branches/bleeding_edge/test/cctest/test-parsing.cc
=======================================
--- /branches/bleeding_edge/src/ast-numbering.cc Mon Oct 27 15:00:09 2014
UTC
+++ /branches/bleeding_edge/src/ast-numbering.cc Mon Oct 27 16:25:11 2014
UTC
@@ -38,11 +38,8 @@
next_id_ += n;
return tmp;
}
-
- void IncrementNodeCount() { properties_.add_node_count(1); }
int next_id_;
- AstProperties properties_;
DEFINE_AST_VISITOR_SUBCLASS_MEMBERS();
DISALLOW_COPY_AND_ASSIGN(AstNumberingVisitor);
@@ -50,127 +47,102 @@
void AstNumberingVisitor::VisitVariableDeclaration(VariableDeclaration*
node) {
- IncrementNodeCount();
VisitVariableProxy(node->proxy());
}
void AstNumberingVisitor::VisitExportDeclaration(ExportDeclaration* node) {
- IncrementNodeCount();
VisitVariableProxy(node->proxy());
}
-void AstNumberingVisitor::VisitModuleUrl(ModuleUrl* node) {
- IncrementNodeCount();
-}
+void AstNumberingVisitor::VisitModuleUrl(ModuleUrl* node) {}
-void AstNumberingVisitor::VisitEmptyStatement(EmptyStatement* node) {
- IncrementNodeCount();
-}
+void AstNumberingVisitor::VisitEmptyStatement(EmptyStatement* node) {}
-void AstNumberingVisitor::VisitContinueStatement(ContinueStatement* node) {
- IncrementNodeCount();
-}
+void AstNumberingVisitor::VisitContinueStatement(ContinueStatement* node)
{}
-void AstNumberingVisitor::VisitBreakStatement(BreakStatement* node) {
- IncrementNodeCount();
-}
+void AstNumberingVisitor::VisitBreakStatement(BreakStatement* node) {}
void AstNumberingVisitor::VisitDebuggerStatement(DebuggerStatement* node) {
- IncrementNodeCount();
node->set_base_id(ReserveIdRange(DebuggerStatement::num_ids()));
}
void AstNumberingVisitor::VisitNativeFunctionLiteral(
NativeFunctionLiteral* node) {
- IncrementNodeCount();
node->set_base_id(ReserveIdRange(NativeFunctionLiteral::num_ids()));
}
void AstNumberingVisitor::VisitLiteral(Literal* node) {
- IncrementNodeCount();
node->set_base_id(ReserveIdRange(Literal::num_ids()));
}
void AstNumberingVisitor::VisitRegExpLiteral(RegExpLiteral* node) {
- IncrementNodeCount();
node->set_base_id(ReserveIdRange(RegExpLiteral::num_ids()));
}
void AstNumberingVisitor::VisitVariableProxy(VariableProxy* node) {
- IncrementNodeCount();
node->set_base_id(ReserveIdRange(VariableProxy::num_ids()));
}
void AstNumberingVisitor::VisitThisFunction(ThisFunction* node) {
- IncrementNodeCount();
node->set_base_id(ReserveIdRange(ThisFunction::num_ids()));
}
void AstNumberingVisitor::VisitSuperReference(SuperReference* node) {
- IncrementNodeCount();
node->set_base_id(ReserveIdRange(SuperReference::num_ids()));
Visit(node->this_var());
}
void AstNumberingVisitor::VisitModuleDeclaration(ModuleDeclaration* node) {
- IncrementNodeCount();
VisitVariableProxy(node->proxy());
Visit(node->module());
}
void AstNumberingVisitor::VisitImportDeclaration(ImportDeclaration* node) {
- IncrementNodeCount();
VisitVariableProxy(node->proxy());
Visit(node->module());
}
void AstNumberingVisitor::VisitModuleVariable(ModuleVariable* node) {
- IncrementNodeCount();
Visit(node->proxy());
}
void AstNumberingVisitor::VisitModulePath(ModulePath* node) {
- IncrementNodeCount();
Visit(node->module());
}
void AstNumberingVisitor::VisitModuleStatement(ModuleStatement* node) {
- IncrementNodeCount();
Visit(node->body());
}
void AstNumberingVisitor::VisitExpressionStatement(ExpressionStatement*
node) {
- IncrementNodeCount();
Visit(node->expression());
}
void AstNumberingVisitor::VisitReturnStatement(ReturnStatement* node) {
- IncrementNodeCount();
Visit(node->expression());
}
void AstNumberingVisitor::VisitYield(Yield* node) {
- IncrementNodeCount();
node->set_base_id(ReserveIdRange(Yield::num_ids()));
Visit(node->generator_object());
Visit(node->expression());
@@ -178,28 +150,24 @@
void AstNumberingVisitor::VisitThrow(Throw* node) {
- IncrementNodeCount();
node->set_base_id(ReserveIdRange(Throw::num_ids()));
Visit(node->exception());
}
void AstNumberingVisitor::VisitUnaryOperation(UnaryOperation* node) {
- IncrementNodeCount();
node->set_base_id(ReserveIdRange(UnaryOperation::num_ids()));
Visit(node->expression());
}
void AstNumberingVisitor::VisitCountOperation(CountOperation* node) {
- IncrementNodeCount();
node->set_base_id(ReserveIdRange(CountOperation::num_ids()));
Visit(node->expression());
}
void AstNumberingVisitor::VisitBlock(Block* node) {
- IncrementNodeCount();
node->set_base_id(ReserveIdRange(Block::num_ids()));
if (node->scope() != NULL)
VisitDeclarations(node->scope()->declarations());
VisitStatements(node->statements());
@@ -207,34 +175,29 @@
void AstNumberingVisitor::VisitFunctionDeclaration(FunctionDeclaration*
node) {
- IncrementNodeCount();
VisitVariableProxy(node->proxy());
VisitFunctionLiteral(node->fun());
}
void AstNumberingVisitor::VisitModuleLiteral(ModuleLiteral* node) {
- IncrementNodeCount();
VisitBlock(node->body());
}
void AstNumberingVisitor::VisitCallRuntime(CallRuntime* node) {
- IncrementNodeCount();
node->set_base_id(ReserveIdRange(CallRuntime::num_ids()));
VisitArguments(node->arguments());
}
void AstNumberingVisitor::VisitWithStatement(WithStatement* node) {
- IncrementNodeCount();
Visit(node->expression());
Visit(node->statement());
}
void AstNumberingVisitor::VisitDoWhileStatement(DoWhileStatement* node) {
- IncrementNodeCount();
node->set_base_id(ReserveIdRange(DoWhileStatement::num_ids()));
Visit(node->body());
Visit(node->cond());
@@ -242,7 +205,6 @@
void AstNumberingVisitor::VisitWhileStatement(WhileStatement* node) {
- IncrementNodeCount();
node->set_base_id(ReserveIdRange(WhileStatement::num_ids()));
Visit(node->cond());
Visit(node->body());
@@ -250,21 +212,18 @@
void AstNumberingVisitor::VisitTryCatchStatement(TryCatchStatement* node) {
- IncrementNodeCount();
Visit(node->try_block());
Visit(node->catch_block());
}
void AstNumberingVisitor::VisitTryFinallyStatement(TryFinallyStatement*
node) {
- IncrementNodeCount();
Visit(node->try_block());
Visit(node->finally_block());
}
void AstNumberingVisitor::VisitProperty(Property* node) {
- IncrementNodeCount();
node->set_base_id(ReserveIdRange(Property::num_ids()));
Visit(node->key());
Visit(node->obj());
@@ -272,7 +231,6 @@
void AstNumberingVisitor::VisitAssignment(Assignment* node) {
- IncrementNodeCount();
node->set_base_id(ReserveIdRange(Assignment::num_ids()));
if (node->is_compound()) VisitBinaryOperation(node->binary_operation());
Visit(node->target());
@@ -281,7 +239,6 @@
void AstNumberingVisitor::VisitBinaryOperation(BinaryOperation* node) {
- IncrementNodeCount();
node->set_base_id(ReserveIdRange(BinaryOperation::num_ids()));
Visit(node->left());
Visit(node->right());
@@ -289,7 +246,6 @@
void AstNumberingVisitor::VisitCompareOperation(CompareOperation* node) {
- IncrementNodeCount();
node->set_base_id(ReserveIdRange(CompareOperation::num_ids()));
Visit(node->left());
Visit(node->right());
@@ -297,7 +253,6 @@
void AstNumberingVisitor::VisitForInStatement(ForInStatement* node) {
- IncrementNodeCount();
node->set_base_id(ReserveIdRange(ForInStatement::num_ids()));
Visit(node->each());
Visit(node->enumerable());
@@ -306,7 +261,6 @@
void AstNumberingVisitor::VisitForOfStatement(ForOfStatement* node) {
- IncrementNodeCount();
node->set_base_id(ReserveIdRange(ForOfStatement::num_ids()));
Visit(node->assign_iterator());
Visit(node->next_result());
@@ -317,7 +271,6 @@
void AstNumberingVisitor::VisitConditional(Conditional* node) {
- IncrementNodeCount();
node->set_base_id(ReserveIdRange(Conditional::num_ids()));
Visit(node->condition());
Visit(node->then_expression());
@@ -326,7 +279,6 @@
void AstNumberingVisitor::VisitIfStatement(IfStatement* node) {
- IncrementNodeCount();
node->set_base_id(ReserveIdRange(IfStatement::num_ids()));
Visit(node->condition());
Visit(node->then_statement());
@@ -337,7 +289,6 @@
void AstNumberingVisitor::VisitSwitchStatement(SwitchStatement* node) {
- IncrementNodeCount();
node->set_base_id(ReserveIdRange(SwitchStatement::num_ids()));
Visit(node->tag());
ZoneList<CaseClause*>* cases = node->cases();
@@ -348,7 +299,6 @@
void AstNumberingVisitor::VisitCaseClause(CaseClause* node) {
- IncrementNodeCount();
node->set_base_id(ReserveIdRange(CaseClause::num_ids()));
if (!node->is_default()) Visit(node->label());
VisitStatements(node->statements());
@@ -356,7 +306,6 @@
void AstNumberingVisitor::VisitForStatement(ForStatement* node) {
- IncrementNodeCount();
node->set_base_id(ReserveIdRange(ForStatement::num_ids()));
if (node->init() != NULL) Visit(node->init());
if (node->cond() != NULL) Visit(node->cond());
@@ -366,7 +315,6 @@
void AstNumberingVisitor::VisitClassLiteral(ClassLiteral* node) {
- IncrementNodeCount();
node->set_base_id(ReserveIdRange(ClassLiteral::num_ids()));
if (node->extends()) Visit(node->extends());
if (node->constructor()) Visit(node->constructor());
@@ -377,7 +325,6 @@
void AstNumberingVisitor::VisitObjectLiteral(ObjectLiteral* node) {
- IncrementNodeCount();
node->set_base_id(ReserveIdRange(ObjectLiteral::num_ids()));
for (int i = 0; i < node->properties()->length(); i++) {
VisitObjectLiteralProperty(node->properties()->at(i));
@@ -393,7 +340,6 @@
void AstNumberingVisitor::VisitArrayLiteral(ArrayLiteral* node) {
- IncrementNodeCount();
node->set_base_id(ReserveIdRange(node->num_ids()));
for (int i = 0; i < node->values()->length(); i++) {
Visit(node->values()->at(i));
@@ -402,7 +348,6 @@
void AstNumberingVisitor::VisitCall(Call* node) {
- IncrementNodeCount();
node->set_base_id(ReserveIdRange(Call::num_ids()));
Visit(node->expression());
VisitArguments(node->arguments());
@@ -410,7 +355,6 @@
void AstNumberingVisitor::VisitCallNew(CallNew* node) {
- IncrementNodeCount();
node->set_base_id(ReserveIdRange(CallNew::num_ids()));
Visit(node->expression());
VisitArguments(node->arguments());
@@ -441,7 +385,6 @@
void AstNumberingVisitor::VisitFunctionLiteral(FunctionLiteral* node) {
- IncrementNodeCount();
node->set_base_id(ReserveIdRange(FunctionLiteral::num_ids()));
// We don't recurse into the declarations or body of the function
literal:
// you have to separately Renumber() each FunctionLiteral that you
compile.
@@ -449,10 +392,6 @@
void AstNumberingVisitor::Renumber(FunctionLiteral* node) {
- properties_.flags()->Add(*node->flags());
- properties_.increase_feedback_slots(node->slot_count());
- properties_.increase_ic_feedback_slots(node->ic_slot_count());
-
if (node->scope()->HasIllegalRedeclaration()) {
node->scope()->VisitIllegalRedeclaration(this);
return;
@@ -465,8 +404,6 @@
Visit(scope->function());
}
VisitStatements(node->body());
-
- node->set_ast_properties(&properties_);
}
=======================================
--- /branches/bleeding_edge/src/ast.cc Mon Oct 27 15:00:09 2014 UTC
+++ /branches/bleeding_edge/src/ast.cc Mon Oct 27 16:25:11 2014 UTC
@@ -998,30 +998,36 @@
#define REGULAR_NODE(NodeType) \
void AstConstructionVisitor::Visit##NodeType(NodeType* node) { \
+ increase_node_count(); \
}
#define REGULAR_NODE_WITH_FEEDBACK_SLOTS(NodeType) \
void AstConstructionVisitor::Visit##NodeType(NodeType* node) { \
+ increase_node_count(); \
add_slot_node(node); \
}
#define DONT_OPTIMIZE_NODE(NodeType) \
void AstConstructionVisitor::Visit##NodeType(NodeType* node) { \
+ increase_node_count(); \
set_dont_crankshaft_reason(k##NodeType); \
add_flag(kDontSelfOptimize); \
}
#define DONT_OPTIMIZE_NODE_WITH_FEEDBACK_SLOTS(NodeType) \
void AstConstructionVisitor::Visit##NodeType(NodeType* node) { \
+ increase_node_count(); \
add_slot_node(node); \
set_dont_crankshaft_reason(k##NodeType); \
add_flag(kDontSelfOptimize); \
}
#define DONT_TURBOFAN_NODE(NodeType) \
void AstConstructionVisitor::Visit##NodeType(NodeType* node) { \
+ increase_node_count(); \
set_dont_crankshaft_reason(k##NodeType); \
set_dont_turbofan_reason(k##NodeType); \
add_flag(kDontSelfOptimize); \
}
#define DONT_TURBOFAN_NODE_WITH_FEEDBACK_SLOTS(NodeType) \
void AstConstructionVisitor::Visit##NodeType(NodeType* node) { \
+ increase_node_count(); \
add_slot_node(node); \
set_dont_crankshaft_reason(k##NodeType); \
set_dont_turbofan_reason(k##NodeType); \
@@ -1029,15 +1035,18 @@
}
#define DONT_SELFOPTIMIZE_NODE(NodeType) \
void AstConstructionVisitor::Visit##NodeType(NodeType* node) { \
+ increase_node_count(); \
add_flag(kDontSelfOptimize); \
}
#define DONT_SELFOPTIMIZE_NODE_WITH_FEEDBACK_SLOTS(NodeType) \
void AstConstructionVisitor::Visit##NodeType(NodeType* node) { \
+ increase_node_count(); \
add_slot_node(node); \
add_flag(kDontSelfOptimize); \
}
#define DONT_CACHE_NODE(NodeType) \
void AstConstructionVisitor::Visit##NodeType(NodeType* node) { \
+ increase_node_count(); \
set_dont_crankshaft_reason(k##NodeType); \
add_flag(kDontSelfOptimize); \
add_flag(kDontCache); \
@@ -1111,6 +1120,7 @@
void AstConstructionVisitor::VisitCallRuntime(CallRuntime* node) {
+ increase_node_count();
add_slot_node(node);
if (node->is_jsruntime()) {
// Don't try to optimize JS runtime calls because we bailout on them.
=======================================
--- /branches/bleeding_edge/src/ast.h Mon Oct 27 15:00:09 2014 UTC
+++ /branches/bleeding_edge/src/ast.h Mon Oct 27 16:25:11 2014 UTC
@@ -3144,6 +3144,7 @@
AST_NODE_LIST(DEF_VISIT)
#undef DEF_VISIT
+ void increase_node_count() { properties_.add_node_count(1); }
void add_flag(AstPropertiesFlag flag) { properties_.flags()->Add(flag); }
void set_dont_crankshaft_reason(BailoutReason reason) {
dont_crankshaft_reason_ = reason;
=======================================
--- /branches/bleeding_edge/src/compiler/js-inlining.cc Mon Oct 27 15:00:09
2014 UTC
+++ /branches/bleeding_edge/src/compiler/js-inlining.cc Mon Oct 27 16:25:11
2014 UTC
@@ -57,6 +57,17 @@
InlinerVisitor visitor(this);
jsgraph_->graph()->VisitNodeInputsFromEnd(&visitor);
}
+
+
+// TODO(sigurds) Find a home for this function and reuse it everywhere
(esp. in
+// test cases, where similar code is currently duplicated).
+static void Parse(Handle<JSFunction> function, CompilationInfoWithZone*
info) {
+ CHECK(Parser::Parse(info));
+ CHECK(Rewriter::Rewrite(info));
+ CHECK(Scope::Analyze(info));
+ CHECK(AstNumbering::Renumber(info->function(), info->zone()));
+ CHECK(Compiler::EnsureDeoptimizationSupport(info));
+}
// A facade on a JSFunction's graph to facilitate inlining. It assumes the
@@ -374,8 +385,7 @@
}
CompilationInfoWithZone info(function);
- CHECK(Compiler::ParseAndAnalyze(&info));
- CHECK(Compiler::EnsureDeoptimizationSupport(&info));
+ Parse(function, &info);
if (info.scope()->arguments() != NULL && info.strict_mode() != STRICT) {
// For now do not inline functions that use their arguments array.
=======================================
--- /branches/bleeding_edge/src/compiler.cc Mon Oct 27 15:00:09 2014 UTC
+++ /branches/bleeding_edge/src/compiler.cc Mon Oct 27 16:25:11 2014 UTC
@@ -647,7 +647,11 @@
static bool CompileUnoptimizedCode(CompilationInfo* info) {
DCHECK(AllowCompilation::IsAllowed(info->isolate()));
- if (!Compiler::Analyze(info)) return false;
+ DCHECK(info->function() != NULL);
+ if (!Rewriter::Rewrite(info)) return false;
+ if (!Scope::Analyze(info)) return false;
+ DCHECK(info->scope() != NULL);
+
if (!FullCodeGenerator::MakeCode(info)) {
Isolate* isolate = info->isolate();
if (!isolate->has_pending_exception()) isolate->StackOverflow();
@@ -669,6 +673,7 @@
shared->set_strict_mode(lit->strict_mode());
SetExpectedNofPropertiesFromEstimate(shared,
lit->expected_property_count());
shared->set_bailout_reason(lit->dont_optimize_reason());
+ shared->set_ast_node_count(lit->ast_node_count());
// Compile unoptimized code.
if (!CompileUnoptimizedCode(info)) return MaybeHandle<Code>();
@@ -738,33 +743,18 @@
}
-static bool Renumber(CompilationInfo* info) {
- if (!AstNumbering::Renumber(info->function(), info->zone())) return
false;
- if (!info->shared_info().is_null()) {
-
info->shared_info()->set_ast_node_count(info->function()->ast_node_count());
- }
- return true;
-}
-
-
-bool Compiler::Analyze(CompilationInfo* info) {
- DCHECK(info->function() != NULL);
+static bool CompileOptimizedPrologue(CompilationInfo* info) {
+ if (!Parser::Parse(info)) return false;
if (!Rewriter::Rewrite(info)) return false;
if (!Scope::Analyze(info)) return false;
- if (!Renumber(info)) return false;
+ if (!AstNumbering::Renumber(info->function(), info->zone())) return
false;
DCHECK(info->scope() != NULL);
return true;
}
-bool Compiler::ParseAndAnalyze(CompilationInfo* info) {
- if (!Parser::Parse(info)) return false;
- return Compiler::Analyze(info);
-}
-
-
static bool GetOptimizedCodeNow(CompilationInfo* info) {
- if (!Compiler::ParseAndAnalyze(info)) return false;
+ if (!CompileOptimizedPrologue(info)) return false;
TimerEventScope<TimerEventRecompileSynchronous> timer(info->isolate());
@@ -806,7 +796,7 @@
}
CompilationHandleScope handle_scope(info);
- if (!Compiler::ParseAndAnalyze(info)) return false;
+ if (!CompileOptimizedPrologue(info)) return false;
info->SaveHandles(); // Copy handles to the compilation handle scope.
TimerEventScope<TimerEventRecompileSynchronous> timer(info->isolate());
@@ -920,8 +910,6 @@
// TODO(turbofan): In the future, unoptimized code with deopt support could
// be generated lazily once deopt is triggered.
bool Compiler::EnsureDeoptimizationSupport(CompilationInfo* info) {
- DCHECK(info->function() != NULL);
- DCHECK(info->scope() != NULL);
if (!info->shared_info()->has_deoptimization_support()) {
CompilationInfoWithZone unoptimized(info->shared_info());
// Note that we use the same AST that we will use for generating the
@@ -1316,7 +1304,7 @@
Handle<Code> code = isolate->builtins()->CompileLazy();
info.SetCode(code);
scope_info = Handle<ScopeInfo>(ScopeInfo::Empty(isolate));
- } else if (Renumber(&info) && FullCodeGenerator::MakeCode(&info)) {
+ } else if (FullCodeGenerator::MakeCode(&info)) {
DCHECK(!info.code().is_null());
scope_info = ScopeInfo::Create(info.scope(), info.zone());
} else {
=======================================
--- /branches/bleeding_edge/src/compiler.h Mon Oct 27 15:00:09 2014 UTC
+++ /branches/bleeding_edge/src/compiler.h Mon Oct 27 16:25:11 2014 UTC
@@ -675,16 +675,11 @@
MUST_USE_RESULT static MaybeHandle<Code> GetDebugCode(
Handle<JSFunction> function);
- // Parser::Parse, then Compiler::Analyze.
- static bool ParseAndAnalyze(CompilationInfo* info);
- // Rewrite, analyze scopes, and renumber.
- static bool Analyze(CompilationInfo* info);
- // Adds deoptimization support, requires ParseAndAnalyze.
- static bool EnsureDeoptimizationSupport(CompilationInfo* info);
-
static bool EnsureCompiled(Handle<JSFunction> function,
ClearExceptionFlag flag);
+ static bool EnsureDeoptimizationSupport(CompilationInfo* info);
+
static void CompileForLiveEdit(Handle<Script> script);
// Compile a String source within a context for eval.
=======================================
--- /branches/bleeding_edge/src/full-codegen.cc Mon Oct 27 15:00:09 2014 UTC
+++ /branches/bleeding_edge/src/full-codegen.cc Mon Oct 27 16:25:11 2014 UTC
@@ -308,6 +308,11 @@
TimerEventScope<TimerEventCompileFullCode> timer(info->isolate());
+ if (!AstNumbering::Renumber(info->function(), info->zone())) {
+ DCHECK(!isolate->has_pending_exception());
+ return false;
+ }
+
Handle<Script> script = info->script();
if (!script->IsUndefined() && !script->source()->IsUndefined()) {
int len = String::cast(script->source())->length();
=======================================
--- /branches/bleeding_edge/src/hydrogen.cc Mon Oct 27 15:00:09 2014 UTC
+++ /branches/bleeding_edge/src/hydrogen.cc Mon Oct 27 16:25:11 2014 UTC
@@ -7845,7 +7845,8 @@
// step, but don't transfer ownership to target_info.
target_info.SetAstValueFactory(top_info()->ast_value_factory(), false);
Handle<SharedFunctionInfo> target_shared(target->shared());
- if (!Compiler::ParseAndAnalyze(&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()) {
// Parse or scope error, never optimize this function.
SetStackOverflow();
=======================================
--- /branches/bleeding_edge/test/cctest/compiler/function-tester.h Mon Oct
27 15:00:09 2014 UTC
+++ /branches/bleeding_edge/test/cctest/compiler/function-tester.h Mon Oct
27 16:25:11 2014 UTC
@@ -165,7 +165,9 @@
if (flags_ & CompilationInfo::kTypingEnabled) {
info.MarkAsTypingEnabled();
}
- CHECK(Compiler::Analyze(&info));
+ CHECK(Rewriter::Rewrite(&info));
+ CHECK(Scope::Analyze(&info));
+ CHECK(AstNumbering::Renumber(info.function(), info.zone()));
CHECK(Compiler::EnsureDeoptimizationSupport(&info));
Pipeline pipeline(&info);
@@ -213,7 +215,9 @@
CHECK(Parser::Parse(&info));
info.SetOptimizing(BailoutId::None(),
Handle<Code>(function->shared()->code()));
- CHECK(Compiler::Analyze(&info));
+ CHECK(Rewriter::Rewrite(&info));
+ CHECK(Scope::Analyze(&info));
+ CHECK(AstNumbering::Renumber(info.function(), info.zone()));
CHECK(Compiler::EnsureDeoptimizationSupport(&info));
Pipeline pipeline(&info);
=======================================
--- /branches/bleeding_edge/test/cctest/compiler/test-codegen-deopt.cc Mon
Oct 27 15:00:09 2014 UTC
+++ /branches/bleeding_edge/test/cctest/compiler/test-codegen-deopt.cc Mon
Oct 27 16:25:11 2014 UTC
@@ -47,7 +47,9 @@
bailout_id(-1) {
CHECK(Parser::Parse(&info));
info.SetOptimizing(BailoutId::None(), Handle<Code>(function->code()));
- CHECK(Compiler::Analyze(&info));
+ CHECK(Rewriter::Rewrite(&info));
+ CHECK(Scope::Analyze(&info));
+ CHECK(AstNumbering::Renumber(info.function(), info.zone()));
CHECK(Compiler::EnsureDeoptimizationSupport(&info));
DCHECK(info.shared_info()->has_deoptimization_support());
=======================================
--- /branches/bleeding_edge/test/cctest/compiler/test-pipeline.cc Mon Oct
27 15:00:09 2014 UTC
+++ /branches/bleeding_edge/test/cctest/compiler/test-pipeline.cc Mon Oct
27 16:25:11 2014 UTC
@@ -23,7 +23,11 @@
*v8::Handle<v8::Function>::Cast(CompileRun(source)));
CompilationInfoWithZone info(function);
- CHECK(Compiler::ParseAndAnalyze(&info));
+ CHECK(Parser::Parse(&info));
+ CHECK(Rewriter::Rewrite(&info));
+ CHECK(Scope::Analyze(&info));
+ CHECK(AstNumbering::Renumber(info.function(), info.zone()));
+ CHECK_NE(NULL, info.scope());
Pipeline pipeline(&info);
#if V8_TURBOFAN_TARGET
=======================================
--- /branches/bleeding_edge/test/cctest/test-parsing.cc Mon Oct 27 15:00:09
2014 UTC
+++ /branches/bleeding_edge/test/cctest/test-parsing.cc Mon Oct 27 16:25:11
2014 UTC
@@ -3273,7 +3273,9 @@
i::Parser parser(&info, &parse_info);
parser.set_allow_harmony_scoping(true);
CHECK(parser.Parse());
- CHECK(i::Compiler::Analyze(&info));
+ CHECK(i::Rewriter::Rewrite(&info));
+ CHECK(i::Scope::Analyze(&info));
+ CHECK(i::AstNumbering::Renumber(info.function(), info.zone()));
CHECK(info.function() != NULL);
i::Scope* scope = info.function()->scope();
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.