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 #if V8_TARGET_ARCH_PPC | 5 #if V8_TARGET_ARCH_PPC |
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 2835 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2846 __ bind(&null); | 2846 __ bind(&null); |
2847 __ LoadRoot(r3, Heap::kNullValueRootIndex); | 2847 __ LoadRoot(r3, Heap::kNullValueRootIndex); |
2848 | 2848 |
2849 // All done. | 2849 // All done. |
2850 __ bind(&done); | 2850 __ bind(&done); |
2851 | 2851 |
2852 context()->Plug(r3); | 2852 context()->Plug(r3); |
2853 } | 2853 } |
2854 | 2854 |
2855 | 2855 |
2856 void FullCodeGenerator::EmitValueOf(CallRuntime* expr) { | |
2857 ZoneList<Expression*>* args = expr->arguments(); | |
2858 DCHECK(args->length() == 1); | |
2859 VisitForAccumulatorValue(args->at(0)); // Load the object. | |
2860 | |
2861 Label done; | |
2862 // If the object is a smi return the object. | |
2863 __ JumpIfSmi(r3, &done); | |
2864 // If the object is not a value type, return the object. | |
2865 __ CompareObjectType(r3, r4, r4, JS_VALUE_TYPE); | |
2866 __ bne(&done); | |
2867 __ LoadP(r3, FieldMemOperand(r3, JSValue::kValueOffset)); | |
2868 | |
2869 __ bind(&done); | |
2870 context()->Plug(r3); | |
2871 } | |
2872 | |
2873 | |
2874 void FullCodeGenerator::EmitStringCharFromCode(CallRuntime* expr) { | 2856 void FullCodeGenerator::EmitStringCharFromCode(CallRuntime* expr) { |
2875 ZoneList<Expression*>* args = expr->arguments(); | 2857 ZoneList<Expression*>* args = expr->arguments(); |
2876 DCHECK(args->length() == 1); | 2858 DCHECK(args->length() == 1); |
2877 VisitForAccumulatorValue(args->at(0)); | 2859 VisitForAccumulatorValue(args->at(0)); |
2878 | 2860 |
2879 Label done; | 2861 Label done; |
2880 StringCharFromCodeGenerator generator(r3, r4); | 2862 StringCharFromCodeGenerator generator(r3, r4); |
2881 generator.GenerateFast(masm_); | 2863 generator.GenerateFast(masm_); |
2882 __ b(&done); | 2864 __ b(&done); |
2883 | 2865 |
(...skipping 894 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3778 | 3760 |
3779 DCHECK(Assembler::IsCrSet(Assembler::instr_at(cmp_address))); | 3761 DCHECK(Assembler::IsCrSet(Assembler::instr_at(cmp_address))); |
3780 | 3762 |
3781 DCHECK(interrupt_address == | 3763 DCHECK(interrupt_address == |
3782 isolate->builtins()->OnStackReplacement()->entry()); | 3764 isolate->builtins()->OnStackReplacement()->entry()); |
3783 return ON_STACK_REPLACEMENT; | 3765 return ON_STACK_REPLACEMENT; |
3784 } | 3766 } |
3785 } // namespace internal | 3767 } // namespace internal |
3786 } // namespace v8 | 3768 } // namespace v8 |
3787 #endif // V8_TARGET_ARCH_PPC | 3769 #endif // V8_TARGET_ARCH_PPC |
OLD | NEW |