| Index: src/x64/full-codegen-x64.cc
|
| diff --git a/src/x64/full-codegen-x64.cc b/src/x64/full-codegen-x64.cc
|
| index 473f548500b170793864daa0ab227446d532b900..3d6107552f1041d7ad408026afdc077bcd88013b 100644
|
| --- a/src/x64/full-codegen-x64.cc
|
| +++ b/src/x64/full-codegen-x64.cc
|
| @@ -986,6 +986,15 @@ void FullCodeGenerator::VisitSwitchStatement(SwitchStatement* stmt) {
|
| CallIC(ic, RelocInfo::CODE_TARGET, clause->CompareId());
|
| patch_site.EmitPatchInfo();
|
|
|
| + Label skip;
|
| + __ jmp(&skip, Label::kNear);
|
| + PrepareForBailout(clause, TOS_REG);
|
| + __ CompareRoot(rax, Heap::kTrueValueRootIndex);
|
| + __ j(not_equal, &next_test);
|
| + __ Drop(1);
|
| + __ jmp(clause->body_target());
|
| + __ bind(&skip);
|
| +
|
| __ testq(rax, rax);
|
| __ j(not_equal, &next_test);
|
| __ Drop(1); // Switch value is no longer needed.
|
|
|