| 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 3022 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3033 __ SmiTag(index, index); | 3033 __ SmiTag(index, index); |
| 3034 } | 3034 } |
| 3035 | 3035 |
| 3036 __ SmiUntag(value); | 3036 __ SmiUntag(value); |
| 3037 __ SmiToShortArrayOffset(r1, index); | 3037 __ SmiToShortArrayOffset(r1, index); |
| 3038 __ StoreHalfWord(value, MemOperand(r1, string, SeqTwoByteString::kHeaderSize - | 3038 __ StoreHalfWord(value, MemOperand(r1, string, SeqTwoByteString::kHeaderSize - |
| 3039 kHeapObjectTag)); | 3039 kHeapObjectTag)); |
| 3040 context()->Plug(string); | 3040 context()->Plug(string); |
| 3041 } | 3041 } |
| 3042 | 3042 |
| 3043 void FullCodeGenerator::EmitToInteger(CallRuntime* expr) { | |
| 3044 ZoneList<Expression*>* args = expr->arguments(); | |
| 3045 DCHECK_EQ(1, args->length()); | |
| 3046 | |
| 3047 // Load the argument into r2 and convert it. | |
| 3048 VisitForAccumulatorValue(args->at(0)); | |
| 3049 | |
| 3050 // Convert the object to an integer. | |
| 3051 Label done_convert; | |
| 3052 __ JumpIfSmi(r2, &done_convert); | |
| 3053 __ Push(r2); | |
| 3054 __ CallRuntime(Runtime::kToInteger); | |
| 3055 __ bind(&done_convert); | |
| 3056 context()->Plug(r2); | |
| 3057 } | |
| 3058 | |
| 3059 void FullCodeGenerator::EmitStringCharFromCode(CallRuntime* expr) { | 3043 void FullCodeGenerator::EmitStringCharFromCode(CallRuntime* expr) { |
| 3060 ZoneList<Expression*>* args = expr->arguments(); | 3044 ZoneList<Expression*>* args = expr->arguments(); |
| 3061 DCHECK(args->length() == 1); | 3045 DCHECK(args->length() == 1); |
| 3062 VisitForAccumulatorValue(args->at(0)); | 3046 VisitForAccumulatorValue(args->at(0)); |
| 3063 | 3047 |
| 3064 Label done; | 3048 Label done; |
| 3065 StringCharFromCodeGenerator generator(r2, r3); | 3049 StringCharFromCodeGenerator generator(r2, r3); |
| 3066 generator.GenerateFast(masm_); | 3050 generator.GenerateFast(masm_); |
| 3067 __ b(&done); | 3051 __ b(&done); |
| 3068 | 3052 |
| (...skipping 918 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3987 DCHECK(kOSRBranchInstruction == br_instr); | 3971 DCHECK(kOSRBranchInstruction == br_instr); |
| 3988 | 3972 |
| 3989 DCHECK(interrupt_address == | 3973 DCHECK(interrupt_address == |
| 3990 isolate->builtins()->OnStackReplacement()->entry()); | 3974 isolate->builtins()->OnStackReplacement()->entry()); |
| 3991 return ON_STACK_REPLACEMENT; | 3975 return ON_STACK_REPLACEMENT; |
| 3992 } | 3976 } |
| 3993 | 3977 |
| 3994 } // namespace internal | 3978 } // namespace internal |
| 3995 } // namespace v8 | 3979 } // namespace v8 |
| 3996 #endif // V8_TARGET_ARCH_S390 | 3980 #endif // V8_TARGET_ARCH_S390 |
| OLD | NEW |