OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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_S390 | 5 #if V8_TARGET_ARCH_S390 |
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 2768 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2779 // Non-JS objects have class null. | 2779 // Non-JS objects have class null. |
2780 __ bind(&null); | 2780 __ bind(&null); |
2781 __ LoadRoot(r2, Heap::kNullValueRootIndex); | 2781 __ LoadRoot(r2, Heap::kNullValueRootIndex); |
2782 | 2782 |
2783 // All done. | 2783 // All done. |
2784 __ bind(&done); | 2784 __ bind(&done); |
2785 | 2785 |
2786 context()->Plug(r2); | 2786 context()->Plug(r2); |
2787 } | 2787 } |
2788 | 2788 |
2789 void FullCodeGenerator::EmitValueOf(CallRuntime* expr) { | |
2790 ZoneList<Expression*>* args = expr->arguments(); | |
2791 DCHECK(args->length() == 1); | |
2792 VisitForAccumulatorValue(args->at(0)); // Load the object. | |
2793 | |
2794 Label done; | |
2795 // If the object is a smi return the object. | |
2796 __ JumpIfSmi(r2, &done); | |
2797 // If the object is not a value type, return the object. | |
2798 __ CompareObjectType(r2, r3, r3, JS_VALUE_TYPE); | |
2799 __ bne(&done, Label::kNear); | |
2800 __ LoadP(r2, FieldMemOperand(r2, JSValue::kValueOffset)); | |
2801 | |
2802 __ bind(&done); | |
2803 context()->Plug(r2); | |
2804 } | |
2805 | |
2806 void FullCodeGenerator::EmitStringCharFromCode(CallRuntime* expr) { | 2789 void FullCodeGenerator::EmitStringCharFromCode(CallRuntime* expr) { |
2807 ZoneList<Expression*>* args = expr->arguments(); | 2790 ZoneList<Expression*>* args = expr->arguments(); |
2808 DCHECK(args->length() == 1); | 2791 DCHECK(args->length() == 1); |
2809 VisitForAccumulatorValue(args->at(0)); | 2792 VisitForAccumulatorValue(args->at(0)); |
2810 | 2793 |
2811 Label done; | 2794 Label done; |
2812 StringCharFromCodeGenerator generator(r2, r3); | 2795 StringCharFromCodeGenerator generator(r2, r3); |
2813 generator.GenerateFast(masm_); | 2796 generator.GenerateFast(masm_); |
2814 __ b(&done); | 2797 __ b(&done); |
2815 | 2798 |
(...skipping 875 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3691 DCHECK(kOSRBranchInstruction == br_instr); | 3674 DCHECK(kOSRBranchInstruction == br_instr); |
3692 | 3675 |
3693 DCHECK(interrupt_address == | 3676 DCHECK(interrupt_address == |
3694 isolate->builtins()->OnStackReplacement()->entry()); | 3677 isolate->builtins()->OnStackReplacement()->entry()); |
3695 return ON_STACK_REPLACEMENT; | 3678 return ON_STACK_REPLACEMENT; |
3696 } | 3679 } |
3697 | 3680 |
3698 } // namespace internal | 3681 } // namespace internal |
3699 } // namespace v8 | 3682 } // namespace v8 |
3700 #endif // V8_TARGET_ARCH_S390 | 3683 #endif // V8_TARGET_ARCH_S390 |
OLD | NEW |