Reviewers: Toon Verwaest,
Description:
Fix MIPS switch statement breakage.
BUG=
Please review this at https://codereview.chromium.org/116073004/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+9, -0 lines):
M src/mips/full-codegen-mips.cc
Index: src/mips/full-codegen-mips.cc
diff --git a/src/mips/full-codegen-mips.cc b/src/mips/full-codegen-mips.cc
index
997aa3e3d97a98cd3aa1393a46fda7cbfb35be4a..7c0f687f334320dc21814dd54edcbc66a75d0a80
100644
--- a/src/mips/full-codegen-mips.cc
+++ b/src/mips/full-codegen-mips.cc
@@ -1039,6 +1039,15 @@ void
FullCodeGenerator::VisitSwitchStatement(SwitchStatement* stmt) {
CallIC(ic, RelocInfo::CODE_TARGET, clause->CompareId());
patch_site.EmitPatchInfo();
+ Label skip;
+ __ b(&skip);
+ PrepareForBailout(clause, TOS_REG);
+ __ LoadRoot(at, Heap::kTrueValueRootIndex);
+ __ Branch(&next_test, ne, v0, Operand(zero_reg));
+ __ Drop(1);
+ __ jmp(clause->body_target());
+ __ bind(&skip);
+
__ Branch(&next_test, ne, v0, Operand(zero_reg));
__ Drop(1); // Switch value is no longer needed.
__ Branch(clause->body_target());
--
--
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/groups/opt_out.