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 3103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3114 __ SmiUntag(value, value); | 3114 __ SmiUntag(value, value); |
3115 __ add(ip, | 3115 __ add(ip, |
3116 string, | 3116 string, |
3117 Operand(SeqTwoByteString::kHeaderSize - kHeapObjectTag)); | 3117 Operand(SeqTwoByteString::kHeaderSize - kHeapObjectTag)); |
3118 STATIC_ASSERT(kSmiTagSize == 1 && kSmiTag == 0); | 3118 STATIC_ASSERT(kSmiTagSize == 1 && kSmiTag == 0); |
3119 __ strh(value, MemOperand(ip, index)); | 3119 __ strh(value, MemOperand(ip, index)); |
3120 context()->Plug(string); | 3120 context()->Plug(string); |
3121 } | 3121 } |
3122 | 3122 |
3123 | 3123 |
3124 void FullCodeGenerator::EmitToInteger(CallRuntime* expr) { | |
3125 ZoneList<Expression*>* args = expr->arguments(); | |
3126 DCHECK_EQ(1, args->length()); | |
3127 | |
3128 // Load the argument into r0 and convert it. | |
3129 VisitForAccumulatorValue(args->at(0)); | |
3130 | |
3131 // Convert the object to an integer. | |
3132 Label done_convert; | |
3133 __ JumpIfSmi(r0, &done_convert); | |
3134 __ Push(r0); | |
3135 __ CallRuntime(Runtime::kToInteger); | |
3136 __ bind(&done_convert); | |
3137 context()->Plug(r0); | |
3138 } | |
3139 | |
3140 | |
3141 void FullCodeGenerator::EmitStringCharFromCode(CallRuntime* expr) { | 3124 void FullCodeGenerator::EmitStringCharFromCode(CallRuntime* expr) { |
3142 ZoneList<Expression*>* args = expr->arguments(); | 3125 ZoneList<Expression*>* args = expr->arguments(); |
3143 DCHECK(args->length() == 1); | 3126 DCHECK(args->length() == 1); |
3144 VisitForAccumulatorValue(args->at(0)); | 3127 VisitForAccumulatorValue(args->at(0)); |
3145 | 3128 |
3146 Label done; | 3129 Label done; |
3147 StringCharFromCodeGenerator generator(r0, r1); | 3130 StringCharFromCodeGenerator generator(r0, r1); |
3148 generator.GenerateFast(masm_); | 3131 generator.GenerateFast(masm_); |
3149 __ jmp(&done); | 3132 __ jmp(&done); |
3150 | 3133 |
(...skipping 1022 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4173 DCHECK(interrupt_address == | 4156 DCHECK(interrupt_address == |
4174 isolate->builtins()->OnStackReplacement()->entry()); | 4157 isolate->builtins()->OnStackReplacement()->entry()); |
4175 return ON_STACK_REPLACEMENT; | 4158 return ON_STACK_REPLACEMENT; |
4176 } | 4159 } |
4177 | 4160 |
4178 | 4161 |
4179 } // namespace internal | 4162 } // namespace internal |
4180 } // namespace v8 | 4163 } // namespace v8 |
4181 | 4164 |
4182 #endif // V8_TARGET_ARCH_ARM | 4165 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |