| 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 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #if V8_TARGET_ARCH_ARM | 7 #if V8_TARGET_ARCH_ARM |
| 8 | 8 |
| 9 #include "src/code-factory.h" | 9 #include "src/code-factory.h" |
| 10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
| (...skipping 1065 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1076 __ b(eq, &exit); | 1076 __ b(eq, &exit); |
| 1077 | 1077 |
| 1078 PrepareForBailoutForId(stmt->PrepareId(), TOS_REG); | 1078 PrepareForBailoutForId(stmt->PrepareId(), TOS_REG); |
| 1079 | 1079 |
| 1080 // Convert the object to a JS object. | 1080 // Convert the object to a JS object. |
| 1081 Label convert, done_convert; | 1081 Label convert, done_convert; |
| 1082 __ JumpIfSmi(r0, &convert); | 1082 __ JumpIfSmi(r0, &convert); |
| 1083 __ CompareObjectType(r0, r1, r1, FIRST_SPEC_OBJECT_TYPE); | 1083 __ CompareObjectType(r0, r1, r1, FIRST_SPEC_OBJECT_TYPE); |
| 1084 __ b(ge, &done_convert); | 1084 __ b(ge, &done_convert); |
| 1085 __ bind(&convert); | 1085 __ bind(&convert); |
| 1086 __ push(r0); | 1086 ToObjectStub stub(isolate()); |
| 1087 __ InvokeBuiltin(Builtins::TO_OBJECT, CALL_FUNCTION); | 1087 __ CallStub(&stub); |
| 1088 __ bind(&done_convert); | 1088 __ bind(&done_convert); |
| 1089 PrepareForBailoutForId(stmt->ToObjectId(), TOS_REG); | 1089 PrepareForBailoutForId(stmt->ToObjectId(), TOS_REG); |
| 1090 __ push(r0); | 1090 __ push(r0); |
| 1091 | 1091 |
| 1092 // Check for proxies. | 1092 // Check for proxies. |
| 1093 Label call_runtime; | 1093 Label call_runtime; |
| 1094 STATIC_ASSERT(FIRST_JS_PROXY_TYPE == FIRST_SPEC_OBJECT_TYPE); | 1094 STATIC_ASSERT(FIRST_JS_PROXY_TYPE == FIRST_SPEC_OBJECT_TYPE); |
| 1095 __ CompareObjectType(r0, r1, r1, LAST_JS_PROXY_TYPE); | 1095 __ CompareObjectType(r0, r1, r1, LAST_JS_PROXY_TYPE); |
| 1096 __ b(le, &call_runtime); | 1096 __ b(le, &call_runtime); |
| 1097 | 1097 |
| (...skipping 2913 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4011 DCHECK_EQ(args->length(), 1); | 4011 DCHECK_EQ(args->length(), 1); |
| 4012 // Load the argument into r0 and call the stub. | 4012 // Load the argument into r0 and call the stub. |
| 4013 VisitForAccumulatorValue(args->at(0)); | 4013 VisitForAccumulatorValue(args->at(0)); |
| 4014 | 4014 |
| 4015 NumberToStringStub stub(isolate()); | 4015 NumberToStringStub stub(isolate()); |
| 4016 __ CallStub(&stub); | 4016 __ CallStub(&stub); |
| 4017 context()->Plug(r0); | 4017 context()->Plug(r0); |
| 4018 } | 4018 } |
| 4019 | 4019 |
| 4020 | 4020 |
| 4021 void FullCodeGenerator::EmitToObject(CallRuntime* expr) { |
| 4022 ZoneList<Expression*>* args = expr->arguments(); |
| 4023 DCHECK_EQ(1, args->length()); |
| 4024 |
| 4025 // Load the argument into r0 and convert it. |
| 4026 VisitForAccumulatorValue(args->at(0)); |
| 4027 |
| 4028 ToObjectStub stub(isolate()); |
| 4029 __ CallStub(&stub); |
| 4030 context()->Plug(r0); |
| 4031 } |
| 4032 |
| 4033 |
| 4021 void FullCodeGenerator::EmitStringCharFromCode(CallRuntime* expr) { | 4034 void FullCodeGenerator::EmitStringCharFromCode(CallRuntime* expr) { |
| 4022 ZoneList<Expression*>* args = expr->arguments(); | 4035 ZoneList<Expression*>* args = expr->arguments(); |
| 4023 DCHECK(args->length() == 1); | 4036 DCHECK(args->length() == 1); |
| 4024 VisitForAccumulatorValue(args->at(0)); | 4037 VisitForAccumulatorValue(args->at(0)); |
| 4025 | 4038 |
| 4026 Label done; | 4039 Label done; |
| 4027 StringCharFromCodeGenerator generator(r0, r1); | 4040 StringCharFromCodeGenerator generator(r0, r1); |
| 4028 generator.GenerateFast(masm_); | 4041 generator.GenerateFast(masm_); |
| 4029 __ jmp(&done); | 4042 __ jmp(&done); |
| 4030 | 4043 |
| (...skipping 1424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5455 DCHECK(interrupt_address == | 5468 DCHECK(interrupt_address == |
| 5456 isolate->builtins()->OsrAfterStackCheck()->entry()); | 5469 isolate->builtins()->OsrAfterStackCheck()->entry()); |
| 5457 return OSR_AFTER_STACK_CHECK; | 5470 return OSR_AFTER_STACK_CHECK; |
| 5458 } | 5471 } |
| 5459 | 5472 |
| 5460 | 5473 |
| 5461 } // namespace internal | 5474 } // namespace internal |
| 5462 } // namespace v8 | 5475 } // namespace v8 |
| 5463 | 5476 |
| 5464 #endif // V8_TARGET_ARCH_ARM | 5477 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |