OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 959 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
970 __ Drop(1); // Switch value is no longer needed. | 970 __ Drop(1); // Switch value is no longer needed. |
971 __ jmp(clause->body_target()); | 971 __ jmp(clause->body_target()); |
972 __ bind(&slow_case); | 972 __ bind(&slow_case); |
973 } | 973 } |
974 | 974 |
975 // Record position before stub call for type feedback. | 975 // Record position before stub call for type feedback. |
976 SetSourcePosition(clause->position()); | 976 SetSourcePosition(clause->position()); |
977 Handle<Code> ic = CompareIC::GetUninitialized(isolate(), Token::EQ_STRICT); | 977 Handle<Code> ic = CompareIC::GetUninitialized(isolate(), Token::EQ_STRICT); |
978 CallIC(ic, RelocInfo::CODE_TARGET, clause->CompareId()); | 978 CallIC(ic, RelocInfo::CODE_TARGET, clause->CompareId()); |
979 patch_site.EmitPatchInfo(); | 979 patch_site.EmitPatchInfo(); |
| 980 |
| 981 Label skip; |
| 982 __ jmp(&skip, Label::kNear); |
| 983 PrepareForBailout(clause, TOS_REG); |
| 984 __ cmp(eax, isolate()->factory()->true_value()); |
| 985 __ j(not_equal, &next_test); |
| 986 __ Drop(1); |
| 987 __ jmp(clause->body_target()); |
| 988 __ bind(&skip); |
| 989 |
980 __ test(eax, eax); | 990 __ test(eax, eax); |
981 __ j(not_equal, &next_test); | 991 __ j(not_equal, &next_test); |
982 __ Drop(1); // Switch value is no longer needed. | 992 __ Drop(1); // Switch value is no longer needed. |
983 __ jmp(clause->body_target()); | 993 __ jmp(clause->body_target()); |
984 } | 994 } |
985 | 995 |
986 // Discard the test value and jump to the default if present, otherwise to | 996 // Discard the test value and jump to the default if present, otherwise to |
987 // the end of the statement. | 997 // the end of the statement. |
988 __ bind(&next_test); | 998 __ bind(&next_test); |
989 __ Drop(1); // Switch value is no longer needed. | 999 __ Drop(1); // Switch value is no longer needed. |
(...skipping 3911 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4901 | 4911 |
4902 ASSERT_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), | 4912 ASSERT_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), |
4903 Assembler::target_address_at(call_target_address)); | 4913 Assembler::target_address_at(call_target_address)); |
4904 return OSR_AFTER_STACK_CHECK; | 4914 return OSR_AFTER_STACK_CHECK; |
4905 } | 4915 } |
4906 | 4916 |
4907 | 4917 |
4908 } } // namespace v8::internal | 4918 } } // namespace v8::internal |
4909 | 4919 |
4910 #endif // V8_TARGET_ARCH_IA32 | 4920 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |