| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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_ARM64 | 7 #if V8_TARGET_ARCH_ARM64 |
| 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 1039 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1050 patch_site.EmitJumpIfEitherNotSmi(x0, x1, &slow_case); | 1050 patch_site.EmitJumpIfEitherNotSmi(x0, x1, &slow_case); |
| 1051 __ Cmp(x1, x0); | 1051 __ Cmp(x1, x0); |
| 1052 __ B(ne, &next_test); | 1052 __ B(ne, &next_test); |
| 1053 __ Drop(1); // Switch value is no longer needed. | 1053 __ Drop(1); // Switch value is no longer needed. |
| 1054 __ B(clause->body_target()); | 1054 __ B(clause->body_target()); |
| 1055 __ Bind(&slow_case); | 1055 __ Bind(&slow_case); |
| 1056 } | 1056 } |
| 1057 | 1057 |
| 1058 // Record position before stub call for type feedback. | 1058 // Record position before stub call for type feedback. |
| 1059 SetSourcePosition(clause->position()); | 1059 SetSourcePosition(clause->position()); |
| 1060 Handle<Code> ic = | 1060 Handle<Code> ic = CodeFactory::CompareIC(isolate(), Token::EQ_STRICT, |
| 1061 CodeFactory::CompareIC(isolate(), Token::EQ_STRICT).code(); | 1061 language_mode()).code(); |
| 1062 CallIC(ic, clause->CompareId()); | 1062 CallIC(ic, clause->CompareId()); |
| 1063 patch_site.EmitPatchInfo(); | 1063 patch_site.EmitPatchInfo(); |
| 1064 | 1064 |
| 1065 Label skip; | 1065 Label skip; |
| 1066 __ B(&skip); | 1066 __ B(&skip); |
| 1067 PrepareForBailout(clause, TOS_REG); | 1067 PrepareForBailout(clause, TOS_REG); |
| 1068 __ JumpIfNotRoot(x0, Heap::kTrueValueRootIndex, &next_test); | 1068 __ JumpIfNotRoot(x0, Heap::kTrueValueRootIndex, &next_test); |
| 1069 __ Drop(1); | 1069 __ Drop(1); |
| 1070 __ B(clause->body_target()); | 1070 __ B(clause->body_target()); |
| 1071 __ Bind(&skip); | 1071 __ Bind(&skip); |
| (...skipping 3843 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4915 if (ShouldInlineSmiCase(op)) { | 4915 if (ShouldInlineSmiCase(op)) { |
| 4916 Label slow_case; | 4916 Label slow_case; |
| 4917 patch_site.EmitJumpIfEitherNotSmi(x0, x1, &slow_case); | 4917 patch_site.EmitJumpIfEitherNotSmi(x0, x1, &slow_case); |
| 4918 __ Cmp(x1, x0); | 4918 __ Cmp(x1, x0); |
| 4919 Split(cond, if_true, if_false, NULL); | 4919 Split(cond, if_true, if_false, NULL); |
| 4920 __ Bind(&slow_case); | 4920 __ Bind(&slow_case); |
| 4921 } | 4921 } |
| 4922 | 4922 |
| 4923 // Record position and call the compare IC. | 4923 // Record position and call the compare IC. |
| 4924 SetSourcePosition(expr->position()); | 4924 SetSourcePosition(expr->position()); |
| 4925 Handle<Code> ic = CodeFactory::CompareIC(isolate(), op).code(); | 4925 Handle<Code> ic = |
| 4926 CodeFactory::CompareIC(isolate(), op, language_mode()).code(); |
| 4926 CallIC(ic, expr->CompareOperationFeedbackId()); | 4927 CallIC(ic, expr->CompareOperationFeedbackId()); |
| 4927 patch_site.EmitPatchInfo(); | 4928 patch_site.EmitPatchInfo(); |
| 4928 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); | 4929 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); |
| 4929 __ CompareAndSplit(x0, 0, cond, if_true, if_false, fall_through); | 4930 __ CompareAndSplit(x0, 0, cond, if_true, if_false, fall_through); |
| 4930 } | 4931 } |
| 4931 } | 4932 } |
| 4932 | 4933 |
| 4933 // Convert the result of the comparison into one expected for this | 4934 // Convert the result of the comparison into one expected for this |
| 4934 // expression's context. | 4935 // expression's context. |
| 4935 context()->Plug(if_true, if_false); | 4936 context()->Plug(if_true, if_false); |
| (...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5480 } | 5481 } |
| 5481 } | 5482 } |
| 5482 | 5483 |
| 5483 return INTERRUPT; | 5484 return INTERRUPT; |
| 5484 } | 5485 } |
| 5485 | 5486 |
| 5486 | 5487 |
| 5487 } } // namespace v8::internal | 5488 } } // namespace v8::internal |
| 5488 | 5489 |
| 5489 #endif // V8_TARGET_ARCH_ARM64 | 5490 #endif // V8_TARGET_ARCH_ARM64 |
| OLD | NEW |