OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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_PPC | 7 #if V8_TARGET_ARCH_PPC |
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 999 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1010 | 1010 |
1011 __ cmp(r4, r3); | 1011 __ cmp(r4, r3); |
1012 __ bne(&next_test); | 1012 __ bne(&next_test); |
1013 __ Drop(1); // Switch value is no longer needed. | 1013 __ Drop(1); // Switch value is no longer needed. |
1014 __ b(clause->body_target()); | 1014 __ b(clause->body_target()); |
1015 __ bind(&slow_case); | 1015 __ bind(&slow_case); |
1016 } | 1016 } |
1017 | 1017 |
1018 // Record position before stub call for type feedback. | 1018 // Record position before stub call for type feedback. |
1019 SetSourcePosition(clause->position()); | 1019 SetSourcePosition(clause->position()); |
1020 Handle<Code> ic = | 1020 Handle<Code> ic = CodeFactory::CompareIC(isolate(), Token::EQ_STRICT, |
1021 CodeFactory::CompareIC(isolate(), Token::EQ_STRICT).code(); | 1021 language_mode()).code(); |
1022 CallIC(ic, clause->CompareId()); | 1022 CallIC(ic, clause->CompareId()); |
1023 patch_site.EmitPatchInfo(); | 1023 patch_site.EmitPatchInfo(); |
1024 | 1024 |
1025 Label skip; | 1025 Label skip; |
1026 __ b(&skip); | 1026 __ b(&skip); |
1027 PrepareForBailout(clause, TOS_REG); | 1027 PrepareForBailout(clause, TOS_REG); |
1028 __ LoadRoot(ip, Heap::kTrueValueRootIndex); | 1028 __ LoadRoot(ip, Heap::kTrueValueRootIndex); |
1029 __ cmp(r3, ip); | 1029 __ cmp(r3, ip); |
1030 __ bne(&next_test); | 1030 __ bne(&next_test); |
1031 __ Drop(1); | 1031 __ Drop(1); |
(...skipping 4211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5243 Label slow_case; | 5243 Label slow_case; |
5244 __ orx(r5, r3, r4); | 5244 __ orx(r5, r3, r4); |
5245 patch_site.EmitJumpIfNotSmi(r5, &slow_case); | 5245 patch_site.EmitJumpIfNotSmi(r5, &slow_case); |
5246 __ cmp(r4, r3); | 5246 __ cmp(r4, r3); |
5247 Split(cond, if_true, if_false, NULL); | 5247 Split(cond, if_true, if_false, NULL); |
5248 __ bind(&slow_case); | 5248 __ bind(&slow_case); |
5249 } | 5249 } |
5250 | 5250 |
5251 // Record position and call the compare IC. | 5251 // Record position and call the compare IC. |
5252 SetSourcePosition(expr->position()); | 5252 SetSourcePosition(expr->position()); |
5253 Handle<Code> ic = CodeFactory::CompareIC(isolate(), op).code(); | 5253 Handle<Code> ic = |
| 5254 CodeFactory::CompareIC(isolate(), op, language_mode()).code(); |
5254 CallIC(ic, expr->CompareOperationFeedbackId()); | 5255 CallIC(ic, expr->CompareOperationFeedbackId()); |
5255 patch_site.EmitPatchInfo(); | 5256 patch_site.EmitPatchInfo(); |
5256 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); | 5257 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); |
5257 __ cmpi(r3, Operand::Zero()); | 5258 __ cmpi(r3, Operand::Zero()); |
5258 Split(cond, if_true, if_false, fall_through); | 5259 Split(cond, if_true, if_false, fall_through); |
5259 } | 5260 } |
5260 } | 5261 } |
5261 | 5262 |
5262 // Convert the result of the comparison into one expected for this | 5263 // Convert the result of the comparison into one expected for this |
5263 // expression's context. | 5264 // expression's context. |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5453 return ON_STACK_REPLACEMENT; | 5454 return ON_STACK_REPLACEMENT; |
5454 } | 5455 } |
5455 | 5456 |
5456 DCHECK(interrupt_address == | 5457 DCHECK(interrupt_address == |
5457 isolate->builtins()->OsrAfterStackCheck()->entry()); | 5458 isolate->builtins()->OsrAfterStackCheck()->entry()); |
5458 return OSR_AFTER_STACK_CHECK; | 5459 return OSR_AFTER_STACK_CHECK; |
5459 } | 5460 } |
5460 } | 5461 } |
5461 } // namespace v8::internal | 5462 } // namespace v8::internal |
5462 #endif // V8_TARGET_ARCH_PPC | 5463 #endif // V8_TARGET_ARCH_PPC |
OLD | NEW |