OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_X87 | 7 #if V8_TARGET_ARCH_X87 |
8 | 8 |
9 #include "src/code-factory.h" | 9 #include "src/code-factory.h" |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
(...skipping 971 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
982 | 982 |
983 __ cmp(edx, eax); | 983 __ cmp(edx, eax); |
984 __ j(not_equal, &next_test); | 984 __ j(not_equal, &next_test); |
985 __ Drop(1); // Switch value is no longer needed. | 985 __ Drop(1); // Switch value is no longer needed. |
986 __ jmp(clause->body_target()); | 986 __ jmp(clause->body_target()); |
987 __ bind(&slow_case); | 987 __ bind(&slow_case); |
988 } | 988 } |
989 | 989 |
990 // Record position before stub call for type feedback. | 990 // Record position before stub call for type feedback. |
991 SetSourcePosition(clause->position()); | 991 SetSourcePosition(clause->position()); |
992 Handle<Code> ic = | 992 Handle<Code> ic = CodeFactory::CompareIC(isolate(), Token::EQ_STRICT, |
993 CodeFactory::CompareIC(isolate(), Token::EQ_STRICT).code(); | 993 language_mode()).code(); |
994 CallIC(ic, clause->CompareId()); | 994 CallIC(ic, clause->CompareId()); |
995 patch_site.EmitPatchInfo(); | 995 patch_site.EmitPatchInfo(); |
996 | 996 |
997 Label skip; | 997 Label skip; |
998 __ jmp(&skip, Label::kNear); | 998 __ jmp(&skip, Label::kNear); |
999 PrepareForBailout(clause, TOS_REG); | 999 PrepareForBailout(clause, TOS_REG); |
1000 __ cmp(eax, isolate()->factory()->true_value()); | 1000 __ cmp(eax, isolate()->factory()->true_value()); |
1001 __ j(not_equal, &next_test); | 1001 __ j(not_equal, &next_test); |
1002 __ Drop(1); | 1002 __ Drop(1); |
1003 __ jmp(clause->body_target()); | 1003 __ jmp(clause->body_target()); |
(...skipping 4142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5146 __ mov(ecx, edx); | 5146 __ mov(ecx, edx); |
5147 __ or_(ecx, eax); | 5147 __ or_(ecx, eax); |
5148 patch_site.EmitJumpIfNotSmi(ecx, &slow_case, Label::kNear); | 5148 patch_site.EmitJumpIfNotSmi(ecx, &slow_case, Label::kNear); |
5149 __ cmp(edx, eax); | 5149 __ cmp(edx, eax); |
5150 Split(cc, if_true, if_false, NULL); | 5150 Split(cc, if_true, if_false, NULL); |
5151 __ bind(&slow_case); | 5151 __ bind(&slow_case); |
5152 } | 5152 } |
5153 | 5153 |
5154 // Record position and call the compare IC. | 5154 // Record position and call the compare IC. |
5155 SetSourcePosition(expr->position()); | 5155 SetSourcePosition(expr->position()); |
5156 Handle<Code> ic = CodeFactory::CompareIC(isolate(), op).code(); | 5156 Handle<Code> ic = |
| 5157 CodeFactory::CompareIC(isolate(), op, language_mode()).code(); |
5157 CallIC(ic, expr->CompareOperationFeedbackId()); | 5158 CallIC(ic, expr->CompareOperationFeedbackId()); |
5158 patch_site.EmitPatchInfo(); | 5159 patch_site.EmitPatchInfo(); |
5159 | 5160 |
5160 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); | 5161 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); |
5161 __ test(eax, eax); | 5162 __ test(eax, eax); |
5162 Split(cc, if_true, if_false, fall_through); | 5163 Split(cc, if_true, if_false, fall_through); |
5163 } | 5164 } |
5164 } | 5165 } |
5165 | 5166 |
5166 // Convert the result of the comparison into one expected for this | 5167 // Convert the result of the comparison into one expected for this |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5365 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), | 5366 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), |
5366 Assembler::target_address_at(call_target_address, | 5367 Assembler::target_address_at(call_target_address, |
5367 unoptimized_code)); | 5368 unoptimized_code)); |
5368 return OSR_AFTER_STACK_CHECK; | 5369 return OSR_AFTER_STACK_CHECK; |
5369 } | 5370 } |
5370 | 5371 |
5371 | 5372 |
5372 } } // namespace v8::internal | 5373 } } // namespace v8::internal |
5373 | 5374 |
5374 #endif // V8_TARGET_ARCH_X87 | 5375 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |