Enable --trace when --multipass is on. Bugfix in bailout condition.

All V8 and (ia32) mozilla tests pass with --multipass on, failures now
count as regressions.

Review URL: http://codereview.chromium.org/159698

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2598 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 33f54fa6
...@@ -62,6 +62,9 @@ void EntryNode::Compile(MacroAssembler* masm) { ...@@ -62,6 +62,9 @@ void EntryNode::Compile(MacroAssembler* masm) {
__ push(ip); __ push(ip);
} }
} }
if (FLAG_trace) {
__ CallRuntime(Runtime::kTraceEnter, 0);
}
if (FLAG_check_stack) { if (FLAG_check_stack) {
StackCheckStub stub; StackCheckStub stub;
__ CallStub(&stub); __ CallStub(&stub);
...@@ -75,6 +78,10 @@ void ExitNode::Compile(MacroAssembler* masm) { ...@@ -75,6 +78,10 @@ void ExitNode::Compile(MacroAssembler* masm) {
ASSERT(!is_marked()); ASSERT(!is_marked());
is_marked_ = true; is_marked_ = true;
Comment cmnt(masm, "[ ExitNode"); Comment cmnt(masm, "[ ExitNode");
if (FLAG_trace) {
__ push(r0);
__ CallRuntime(Runtime::kTraceExit, 1);
}
__ mov(sp, fp); __ mov(sp, fp);
__ ldm(ia_w, sp, fp.bit() | lr.bit()); __ ldm(ia_w, sp, fp.bit() | lr.bit());
__ add(sp, sp, Operand((parameter_count_ + 1) * kPointerSize)); __ add(sp, sp, Operand((parameter_count_ + 1) * kPointerSize));
......
...@@ -68,8 +68,9 @@ Cfg* Cfg::Build(FunctionLiteral* fun) { ...@@ -68,8 +68,9 @@ Cfg* Cfg::Build(FunctionLiteral* fun) {
if (cfg == NULL) { if (cfg == NULL) {
BAILOUT("unsupported statement type"); BAILOUT("unsupported statement type");
} }
if (cfg->has_exit()) {
ASSERT(!cfg->has_exit()); // Return on all paths. BAILOUT("control path without explicit return");
}
cfg->PrependEntryNode(fun); cfg->PrependEntryNode(fun);
return cfg; return cfg;
} }
......
...@@ -65,6 +65,9 @@ void EntryNode::Compile(MacroAssembler* masm) { ...@@ -65,6 +65,9 @@ void EntryNode::Compile(MacroAssembler* masm) {
__ push(eax); __ push(eax);
} }
} }
if (FLAG_trace) {
__ CallRuntime(Runtime::kTraceEnter, 0);
}
if (FLAG_check_stack) { if (FLAG_check_stack) {
ExternalReference stack_limit = ExternalReference stack_limit =
ExternalReference::address_of_stack_guard_limit(); ExternalReference::address_of_stack_guard_limit();
...@@ -87,6 +90,10 @@ void ExitNode::Compile(MacroAssembler* masm) { ...@@ -87,6 +90,10 @@ void ExitNode::Compile(MacroAssembler* masm) {
ASSERT(!is_marked()); ASSERT(!is_marked());
is_marked_ = true; is_marked_ = true;
Comment cmnt(masm, "[ ExitNode"); Comment cmnt(masm, "[ ExitNode");
if (FLAG_trace) {
__ push(eax);
__ CallRuntime(Runtime::kTraceExit, 1);
}
__ RecordJSReturn(); __ RecordJSReturn();
__ mov(esp, ebp); __ mov(esp, ebp);
__ pop(ebp); __ pop(ebp);
......
...@@ -67,6 +67,9 @@ void EntryNode::Compile(MacroAssembler* masm) { ...@@ -67,6 +67,9 @@ void EntryNode::Compile(MacroAssembler* masm) {
__ push(kScratchRegister); __ push(kScratchRegister);
} }
} }
if (FLAG_trace) {
__ CallRuntime(Runtime::kTraceEnter, 0);
}
if (FLAG_check_stack) { if (FLAG_check_stack) {
ExternalReference stack_limit = ExternalReference stack_limit =
ExternalReference::address_of_stack_guard_limit(); ExternalReference::address_of_stack_guard_limit();
...@@ -91,6 +94,10 @@ void ExitNode::Compile(MacroAssembler* masm) { ...@@ -91,6 +94,10 @@ void ExitNode::Compile(MacroAssembler* masm) {
is_marked_ = true; is_marked_ = true;
Comment cmnt(masm, "[ ExitNode"); Comment cmnt(masm, "[ ExitNode");
if (FLAG_trace) {
__ push(rax);
__ CallRuntime(Runtime::kTraceExit, 1);
}
__ RecordJSReturn(); __ RecordJSReturn();
__ movq(rsp, rbp); __ movq(rsp, rbp);
__ pop(rbp); __ pop(rbp);
......
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