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 #if V8_TARGET_ARCH_ARM64 | 5 #if V8_TARGET_ARCH_ARM64 |
6 | 6 |
7 #include "src/ast/scopes.h" | 7 #include "src/ast/scopes.h" |
8 #include "src/code-factory.h" | 8 #include "src/code-factory.h" |
9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 2745 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2756 __ Bind(&null); | 2756 __ Bind(&null); |
2757 __ LoadRoot(x0, Heap::kNullValueRootIndex); | 2757 __ LoadRoot(x0, Heap::kNullValueRootIndex); |
2758 | 2758 |
2759 // All done. | 2759 // All done. |
2760 __ Bind(&done); | 2760 __ Bind(&done); |
2761 | 2761 |
2762 context()->Plug(x0); | 2762 context()->Plug(x0); |
2763 } | 2763 } |
2764 | 2764 |
2765 | 2765 |
2766 void FullCodeGenerator::EmitValueOf(CallRuntime* expr) { | |
2767 ASM_LOCATION("FullCodeGenerator::EmitValueOf"); | |
2768 ZoneList<Expression*>* args = expr->arguments(); | |
2769 DCHECK(args->length() == 1); | |
2770 VisitForAccumulatorValue(args->at(0)); // Load the object. | |
2771 | |
2772 Label done; | |
2773 // If the object is a smi return the object. | |
2774 __ JumpIfSmi(x0, &done); | |
2775 // If the object is not a value type, return the object. | |
2776 __ JumpIfNotObjectType(x0, x10, x11, JS_VALUE_TYPE, &done); | |
2777 __ Ldr(x0, FieldMemOperand(x0, JSValue::kValueOffset)); | |
2778 | |
2779 __ Bind(&done); | |
2780 context()->Plug(x0); | |
2781 } | |
2782 | |
2783 | |
2784 void FullCodeGenerator::EmitStringCharFromCode(CallRuntime* expr) { | 2766 void FullCodeGenerator::EmitStringCharFromCode(CallRuntime* expr) { |
2785 ZoneList<Expression*>* args = expr->arguments(); | 2767 ZoneList<Expression*>* args = expr->arguments(); |
2786 DCHECK(args->length() == 1); | 2768 DCHECK(args->length() == 1); |
2787 | 2769 |
2788 VisitForAccumulatorValue(args->at(0)); | 2770 VisitForAccumulatorValue(args->at(0)); |
2789 | 2771 |
2790 Label done; | 2772 Label done; |
2791 Register code = x0; | 2773 Register code = x0; |
2792 Register result = x1; | 2774 Register result = x1; |
2793 | 2775 |
(...skipping 1070 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3864 } | 3846 } |
3865 | 3847 |
3866 return INTERRUPT; | 3848 return INTERRUPT; |
3867 } | 3849 } |
3868 | 3850 |
3869 | 3851 |
3870 } // namespace internal | 3852 } // namespace internal |
3871 } // namespace v8 | 3853 } // namespace v8 |
3872 | 3854 |
3873 #endif // V8_TARGET_ARCH_ARM64 | 3855 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |