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_IA32 | 7 #if V8_TARGET_ARCH_IA32 |
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 977 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
988 | 988 |
989 __ cmp(edx, eax); | 989 __ cmp(edx, eax); |
990 __ j(not_equal, &next_test); | 990 __ j(not_equal, &next_test); |
991 __ Drop(1); // Switch value is no longer needed. | 991 __ Drop(1); // Switch value is no longer needed. |
992 __ jmp(clause->body_target()); | 992 __ jmp(clause->body_target()); |
993 __ bind(&slow_case); | 993 __ bind(&slow_case); |
994 } | 994 } |
995 | 995 |
996 // Record position before stub call for type feedback. | 996 // Record position before stub call for type feedback. |
997 SetSourcePosition(clause->position()); | 997 SetSourcePosition(clause->position()); |
998 Handle<Code> ic = | 998 Handle<Code> ic = CodeFactory::CompareIC(isolate(), Token::EQ_STRICT, |
999 CodeFactory::CompareIC(isolate(), Token::EQ_STRICT).code(); | 999 language_mode()).code(); |
1000 CallIC(ic, clause->CompareId()); | 1000 CallIC(ic, clause->CompareId()); |
1001 patch_site.EmitPatchInfo(); | 1001 patch_site.EmitPatchInfo(); |
1002 | 1002 |
1003 Label skip; | 1003 Label skip; |
1004 __ jmp(&skip, Label::kNear); | 1004 __ jmp(&skip, Label::kNear); |
1005 PrepareForBailout(clause, TOS_REG); | 1005 PrepareForBailout(clause, TOS_REG); |
1006 __ cmp(eax, isolate()->factory()->true_value()); | 1006 __ cmp(eax, isolate()->factory()->true_value()); |
1007 __ j(not_equal, &next_test); | 1007 __ j(not_equal, &next_test); |
1008 __ Drop(1); | 1008 __ Drop(1); |
1009 __ jmp(clause->body_target()); | 1009 __ jmp(clause->body_target()); |
(...skipping 4143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5153 __ mov(ecx, edx); | 5153 __ mov(ecx, edx); |
5154 __ or_(ecx, eax); | 5154 __ or_(ecx, eax); |
5155 patch_site.EmitJumpIfNotSmi(ecx, &slow_case, Label::kNear); | 5155 patch_site.EmitJumpIfNotSmi(ecx, &slow_case, Label::kNear); |
5156 __ cmp(edx, eax); | 5156 __ cmp(edx, eax); |
5157 Split(cc, if_true, if_false, NULL); | 5157 Split(cc, if_true, if_false, NULL); |
5158 __ bind(&slow_case); | 5158 __ bind(&slow_case); |
5159 } | 5159 } |
5160 | 5160 |
5161 // Record position and call the compare IC. | 5161 // Record position and call the compare IC. |
5162 SetSourcePosition(expr->position()); | 5162 SetSourcePosition(expr->position()); |
5163 Handle<Code> ic = CodeFactory::CompareIC(isolate(), op).code(); | 5163 Handle<Code> ic = |
| 5164 CodeFactory::CompareIC(isolate(), op, language_mode()).code(); |
5164 CallIC(ic, expr->CompareOperationFeedbackId()); | 5165 CallIC(ic, expr->CompareOperationFeedbackId()); |
5165 patch_site.EmitPatchInfo(); | 5166 patch_site.EmitPatchInfo(); |
5166 | 5167 |
5167 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); | 5168 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); |
5168 __ test(eax, eax); | 5169 __ test(eax, eax); |
5169 Split(cc, if_true, if_false, fall_through); | 5170 Split(cc, if_true, if_false, fall_through); |
5170 } | 5171 } |
5171 } | 5172 } |
5172 | 5173 |
5173 // Convert the result of the comparison into one expected for this | 5174 // Convert the result of the comparison into one expected for this |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5372 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), | 5373 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), |
5373 Assembler::target_address_at(call_target_address, | 5374 Assembler::target_address_at(call_target_address, |
5374 unoptimized_code)); | 5375 unoptimized_code)); |
5375 return OSR_AFTER_STACK_CHECK; | 5376 return OSR_AFTER_STACK_CHECK; |
5376 } | 5377 } |
5377 | 5378 |
5378 | 5379 |
5379 } } // namespace v8::internal | 5380 } } // namespace v8::internal |
5380 | 5381 |
5381 #endif // V8_TARGET_ARCH_IA32 | 5382 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |