| 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/full-codegen/full-codegen.h" | 7 #include "src/full-codegen/full-codegen.h" |
| 8 #include "src/ast/compile-time-value.h" | 8 #include "src/ast/compile-time-value.h" |
| 9 #include "src/ast/scopes.h" | 9 #include "src/ast/scopes.h" |
| 10 #include "src/code-factory.h" | 10 #include "src/code-factory.h" |
| (...skipping 2748 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2759 __ LoadP(r3, MemOperand(sp, (argc + 1) * kPointerSize)); | 2759 __ LoadP(r3, MemOperand(sp, (argc + 1) * kPointerSize)); |
| 2760 // Call the target. | 2760 // Call the target. |
| 2761 __ mov(r2, Operand(argc)); | 2761 __ mov(r2, Operand(argc)); |
| 2762 __ Call(isolate()->builtins()->Call(), RelocInfo::CODE_TARGET); | 2762 __ Call(isolate()->builtins()->Call(), RelocInfo::CODE_TARGET); |
| 2763 OperandStackDepthDecrement(argc + 1); | 2763 OperandStackDepthDecrement(argc + 1); |
| 2764 RestoreContext(); | 2764 RestoreContext(); |
| 2765 // Discard the function left on TOS. | 2765 // Discard the function left on TOS. |
| 2766 context()->DropAndPlug(1, r2); | 2766 context()->DropAndPlug(1, r2); |
| 2767 } | 2767 } |
| 2768 | 2768 |
| 2769 void FullCodeGenerator::EmitHasCachedArrayIndex(CallRuntime* expr) { | |
| 2770 ZoneList<Expression*>* args = expr->arguments(); | |
| 2771 VisitForAccumulatorValue(args->at(0)); | |
| 2772 | |
| 2773 Label materialize_true, materialize_false; | |
| 2774 Label* if_true = NULL; | |
| 2775 Label* if_false = NULL; | |
| 2776 Label* fall_through = NULL; | |
| 2777 context()->PrepareTest(&materialize_true, &materialize_false, &if_true, | |
| 2778 &if_false, &fall_through); | |
| 2779 | |
| 2780 __ LoadlW(r2, FieldMemOperand(r2, String::kHashFieldOffset)); | |
| 2781 __ AndP(r0, r2, Operand(String::kContainsCachedArrayIndexMask)); | |
| 2782 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); | |
| 2783 Split(eq, if_true, if_false, fall_through); | |
| 2784 | |
| 2785 context()->Plug(if_true, if_false); | |
| 2786 } | |
| 2787 | |
| 2788 void FullCodeGenerator::EmitGetCachedArrayIndex(CallRuntime* expr) { | |
| 2789 ZoneList<Expression*>* args = expr->arguments(); | |
| 2790 DCHECK(args->length() == 1); | |
| 2791 VisitForAccumulatorValue(args->at(0)); | |
| 2792 | |
| 2793 __ AssertString(r2); | |
| 2794 | |
| 2795 __ LoadlW(r2, FieldMemOperand(r2, String::kHashFieldOffset)); | |
| 2796 __ IndexFromHash(r2, r2); | |
| 2797 | |
| 2798 context()->Plug(r2); | |
| 2799 } | |
| 2800 | |
| 2801 void FullCodeGenerator::EmitGetSuperConstructor(CallRuntime* expr) { | 2769 void FullCodeGenerator::EmitGetSuperConstructor(CallRuntime* expr) { |
| 2802 ZoneList<Expression*>* args = expr->arguments(); | 2770 ZoneList<Expression*>* args = expr->arguments(); |
| 2803 DCHECK_EQ(1, args->length()); | 2771 DCHECK_EQ(1, args->length()); |
| 2804 VisitForAccumulatorValue(args->at(0)); | 2772 VisitForAccumulatorValue(args->at(0)); |
| 2805 __ AssertFunction(r2); | 2773 __ AssertFunction(r2); |
| 2806 __ LoadP(r2, FieldMemOperand(r2, HeapObject::kMapOffset)); | 2774 __ LoadP(r2, FieldMemOperand(r2, HeapObject::kMapOffset)); |
| 2807 __ LoadP(r2, FieldMemOperand(r2, Map::kPrototypeOffset)); | 2775 __ LoadP(r2, FieldMemOperand(r2, Map::kPrototypeOffset)); |
| 2808 context()->Plug(r2); | 2776 context()->Plug(r2); |
| 2809 } | 2777 } |
| 2810 | 2778 |
| (...skipping 758 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3569 DCHECK(kOSRBranchInstruction == br_instr); | 3537 DCHECK(kOSRBranchInstruction == br_instr); |
| 3570 | 3538 |
| 3571 DCHECK(interrupt_address == | 3539 DCHECK(interrupt_address == |
| 3572 isolate->builtins()->OnStackReplacement()->entry()); | 3540 isolate->builtins()->OnStackReplacement()->entry()); |
| 3573 return ON_STACK_REPLACEMENT; | 3541 return ON_STACK_REPLACEMENT; |
| 3574 } | 3542 } |
| 3575 | 3543 |
| 3576 } // namespace internal | 3544 } // namespace internal |
| 3577 } // namespace v8 | 3545 } // namespace v8 |
| 3578 #endif // V8_TARGET_ARCH_S390 | 3546 #endif // V8_TARGET_ARCH_S390 |
| OLD | NEW |