| 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 #if V8_TARGET_ARCH_ARM | 5 #if V8_TARGET_ARCH_ARM |
| 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 2839 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2850 __ bind(&null); | 2850 __ bind(&null); |
| 2851 __ LoadRoot(r0, Heap::kNullValueRootIndex); | 2851 __ LoadRoot(r0, Heap::kNullValueRootIndex); |
| 2852 | 2852 |
| 2853 // All done. | 2853 // All done. |
| 2854 __ bind(&done); | 2854 __ bind(&done); |
| 2855 | 2855 |
| 2856 context()->Plug(r0); | 2856 context()->Plug(r0); |
| 2857 } | 2857 } |
| 2858 | 2858 |
| 2859 | 2859 |
| 2860 void FullCodeGenerator::EmitValueOf(CallRuntime* expr) { | |
| 2861 ZoneList<Expression*>* args = expr->arguments(); | |
| 2862 DCHECK(args->length() == 1); | |
| 2863 VisitForAccumulatorValue(args->at(0)); // Load the object. | |
| 2864 | |
| 2865 Label done; | |
| 2866 // If the object is a smi return the object. | |
| 2867 __ JumpIfSmi(r0, &done); | |
| 2868 // If the object is not a value type, return the object. | |
| 2869 __ CompareObjectType(r0, r1, r1, JS_VALUE_TYPE); | |
| 2870 __ ldr(r0, FieldMemOperand(r0, JSValue::kValueOffset), eq); | |
| 2871 | |
| 2872 __ bind(&done); | |
| 2873 context()->Plug(r0); | |
| 2874 } | |
| 2875 | |
| 2876 | |
| 2877 void FullCodeGenerator::EmitStringCharFromCode(CallRuntime* expr) { | 2860 void FullCodeGenerator::EmitStringCharFromCode(CallRuntime* expr) { |
| 2878 ZoneList<Expression*>* args = expr->arguments(); | 2861 ZoneList<Expression*>* args = expr->arguments(); |
| 2879 DCHECK(args->length() == 1); | 2862 DCHECK(args->length() == 1); |
| 2880 VisitForAccumulatorValue(args->at(0)); | 2863 VisitForAccumulatorValue(args->at(0)); |
| 2881 | 2864 |
| 2882 Label done; | 2865 Label done; |
| 2883 StringCharFromCodeGenerator generator(r0, r1); | 2866 StringCharFromCodeGenerator generator(r0, r1); |
| 2884 generator.GenerateFast(masm_); | 2867 generator.GenerateFast(masm_); |
| 2885 __ jmp(&done); | 2868 __ jmp(&done); |
| 2886 | 2869 |
| (...skipping 969 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3856 DCHECK(interrupt_address == | 3839 DCHECK(interrupt_address == |
| 3857 isolate->builtins()->OnStackReplacement()->entry()); | 3840 isolate->builtins()->OnStackReplacement()->entry()); |
| 3858 return ON_STACK_REPLACEMENT; | 3841 return ON_STACK_REPLACEMENT; |
| 3859 } | 3842 } |
| 3860 | 3843 |
| 3861 | 3844 |
| 3862 } // namespace internal | 3845 } // namespace internal |
| 3863 } // namespace v8 | 3846 } // namespace v8 |
| 3864 | 3847 |
| 3865 #endif // V8_TARGET_ARCH_ARM | 3848 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |