Commit 1b79ef17 authored by palfia@homejinni.com's avatar palfia@homejinni.com

MIPS: Enable optimization of functions with generic switches.

Port r18347 (64ac25c)

Fix of r18351

BUG=
R=hpayer@chromium.org

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

Patch from Balazs Kilvady <kilvadyb@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18361 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 8c159ed4
......@@ -1040,12 +1040,12 @@ void FullCodeGenerator::VisitSwitchStatement(SwitchStatement* stmt) {
patch_site.EmitPatchInfo();
Label skip;
__ b(&skip);
__ Branch(&skip);
PrepareForBailout(clause, TOS_REG);
__ LoadRoot(at, Heap::kTrueValueRootIndex);
__ Branch(&next_test, ne, v0, Operand(at));
__ Drop(1);
__ jmp(clause->body_target());
__ Branch(clause->body_target());
__ bind(&skip);
__ Branch(&next_test, ne, v0, Operand(zero_reg));
......
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