OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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_PPC | 5 #if V8_TARGET_ARCH_PPC |
6 | 6 |
7 #include "src/code-factory.h" | 7 #include "src/code-factory.h" |
8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
9 #include "src/codegen.h" | 9 #include "src/codegen.h" |
10 #include "src/compiler.h" | 10 #include "src/compiler.h" |
(...skipping 3971 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3982 DCHECK_EQ(args->length(), 1); | 3982 DCHECK_EQ(args->length(), 1); |
3983 // Load the argument into r3 and call the stub. | 3983 // Load the argument into r3 and call the stub. |
3984 VisitForAccumulatorValue(args->at(0)); | 3984 VisitForAccumulatorValue(args->at(0)); |
3985 | 3985 |
3986 NumberToStringStub stub(isolate()); | 3986 NumberToStringStub stub(isolate()); |
3987 __ CallStub(&stub); | 3987 __ CallStub(&stub); |
3988 context()->Plug(r3); | 3988 context()->Plug(r3); |
3989 } | 3989 } |
3990 | 3990 |
3991 | 3991 |
| 3992 void FullCodeGenerator::EmitToString(CallRuntime* expr) { |
| 3993 ZoneList<Expression*>* args = expr->arguments(); |
| 3994 DCHECK_EQ(1, args->length()); |
| 3995 |
| 3996 // Load the argument into r3 and convert it. |
| 3997 VisitForAccumulatorValue(args->at(0)); |
| 3998 |
| 3999 ToStringStub stub(isolate()); |
| 4000 __ CallStub(&stub); |
| 4001 context()->Plug(r3); |
| 4002 } |
| 4003 |
| 4004 |
| 4005 void FullCodeGenerator::EmitToName(CallRuntime* expr) { |
| 4006 ZoneList<Expression*>* args = expr->arguments(); |
| 4007 DCHECK_EQ(1, args->length()); |
| 4008 |
| 4009 // Load the argument into r3 and convert it. |
| 4010 VisitForAccumulatorValue(args->at(0)); |
| 4011 |
| 4012 Label convert, done_convert; |
| 4013 __ JumpIfSmi(r3, &convert); |
| 4014 STATIC_ASSERT(FIRST_NAME_TYPE == FIRST_TYPE); |
| 4015 __ CompareObjectType(r3, r4, r4, LAST_NAME_TYPE); |
| 4016 __ ble(&done_convert); |
| 4017 __ bind(&convert); |
| 4018 ToStringStub stub(isolate()); |
| 4019 __ CallStub(&stub); |
| 4020 __ bind(&done_convert); |
| 4021 context()->Plug(r3); |
| 4022 } |
| 4023 |
| 4024 |
3992 void FullCodeGenerator::EmitToObject(CallRuntime* expr) { | 4025 void FullCodeGenerator::EmitToObject(CallRuntime* expr) { |
3993 ZoneList<Expression*>* args = expr->arguments(); | 4026 ZoneList<Expression*>* args = expr->arguments(); |
3994 DCHECK_EQ(1, args->length()); | 4027 DCHECK_EQ(1, args->length()); |
3995 // Load the argument into r3 and convert it. | 4028 // Load the argument into r3 and convert it. |
3996 VisitForAccumulatorValue(args->at(0)); | 4029 VisitForAccumulatorValue(args->at(0)); |
3997 | 4030 |
3998 ToObjectStub stub(isolate()); | 4031 ToObjectStub stub(isolate()); |
3999 __ CallStub(&stub); | 4032 __ CallStub(&stub); |
4000 context()->Plug(r3); | 4033 context()->Plug(r3); |
4001 } | 4034 } |
(...skipping 1321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5323 return ON_STACK_REPLACEMENT; | 5356 return ON_STACK_REPLACEMENT; |
5324 } | 5357 } |
5325 | 5358 |
5326 DCHECK(interrupt_address == | 5359 DCHECK(interrupt_address == |
5327 isolate->builtins()->OsrAfterStackCheck()->entry()); | 5360 isolate->builtins()->OsrAfterStackCheck()->entry()); |
5328 return OSR_AFTER_STACK_CHECK; | 5361 return OSR_AFTER_STACK_CHECK; |
5329 } | 5362 } |
5330 } // namespace internal | 5363 } // namespace internal |
5331 } // namespace v8 | 5364 } // namespace v8 |
5332 #endif // V8_TARGET_ARCH_PPC | 5365 #endif // V8_TARGET_ARCH_PPC |
OLD | NEW |