| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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_ARM64 | 5 #if V8_TARGET_ARCH_ARM64 |
| 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 3229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3240 // Convert the object to an integer. | 3240 // Convert the object to an integer. |
| 3241 Label done_convert; | 3241 Label done_convert; |
| 3242 __ JumpIfSmi(x0, &done_convert); | 3242 __ JumpIfSmi(x0, &done_convert); |
| 3243 __ Push(x0); | 3243 __ Push(x0); |
| 3244 __ CallRuntime(Runtime::kToInteger); | 3244 __ CallRuntime(Runtime::kToInteger); |
| 3245 __ bind(&done_convert); | 3245 __ bind(&done_convert); |
| 3246 context()->Plug(x0); | 3246 context()->Plug(x0); |
| 3247 } | 3247 } |
| 3248 | 3248 |
| 3249 | 3249 |
| 3250 void FullCodeGenerator::EmitToName(CallRuntime* expr) { | |
| 3251 ZoneList<Expression*>* args = expr->arguments(); | |
| 3252 DCHECK_EQ(1, args->length()); | |
| 3253 | |
| 3254 // Load the argument into x0 and convert it. | |
| 3255 VisitForAccumulatorValue(args->at(0)); | |
| 3256 | |
| 3257 Label convert, done_convert; | |
| 3258 __ JumpIfSmi(x0, &convert); | |
| 3259 STATIC_ASSERT(FIRST_NAME_TYPE == FIRST_TYPE); | |
| 3260 __ JumpIfObjectType(x0, x1, x1, LAST_NAME_TYPE, &done_convert, ls); | |
| 3261 __ Bind(&convert); | |
| 3262 __ Push(x0); | |
| 3263 __ CallRuntime(Runtime::kToName); | |
| 3264 __ Bind(&done_convert); | |
| 3265 context()->Plug(x0); | |
| 3266 } | |
| 3267 | |
| 3268 | |
| 3269 void FullCodeGenerator::EmitStringCharFromCode(CallRuntime* expr) { | 3250 void FullCodeGenerator::EmitStringCharFromCode(CallRuntime* expr) { |
| 3270 ZoneList<Expression*>* args = expr->arguments(); | 3251 ZoneList<Expression*>* args = expr->arguments(); |
| 3271 DCHECK(args->length() == 1); | 3252 DCHECK(args->length() == 1); |
| 3272 | 3253 |
| 3273 VisitForAccumulatorValue(args->at(0)); | 3254 VisitForAccumulatorValue(args->at(0)); |
| 3274 | 3255 |
| 3275 Label done; | 3256 Label done; |
| 3276 Register code = x0; | 3257 Register code = x0; |
| 3277 Register result = x1; | 3258 Register result = x1; |
| 3278 | 3259 |
| (...skipping 1575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4854 } | 4835 } |
| 4855 | 4836 |
| 4856 return INTERRUPT; | 4837 return INTERRUPT; |
| 4857 } | 4838 } |
| 4858 | 4839 |
| 4859 | 4840 |
| 4860 } // namespace internal | 4841 } // namespace internal |
| 4861 } // namespace v8 | 4842 } // namespace v8 |
| 4862 | 4843 |
| 4863 #endif // V8_TARGET_ARCH_ARM64 | 4844 #endif // V8_TARGET_ARCH_ARM64 |
| OLD | NEW |