Chromium Code Reviews| 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/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/debug/debug.h" | 10 #include "src/debug/debug.h" |
| (...skipping 3779 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3790 DCHECK_EQ(args->length(), 1); | 3790 DCHECK_EQ(args->length(), 1); |
| 3791 // Load the argument into r0 and call the stub. | 3791 // Load the argument into r0 and call the stub. |
| 3792 VisitForAccumulatorValue(args->at(0)); | 3792 VisitForAccumulatorValue(args->at(0)); |
| 3793 | 3793 |
| 3794 NumberToStringStub stub(isolate()); | 3794 NumberToStringStub stub(isolate()); |
| 3795 __ CallStub(&stub); | 3795 __ CallStub(&stub); |
| 3796 context()->Plug(r0); | 3796 context()->Plug(r0); |
| 3797 } | 3797 } |
| 3798 | 3798 |
| 3799 | 3799 |
| 3800 void FullCodeGenerator::EmitToLength(CallRuntime* expr) { | |
| 3801 ZoneList<Expression*>* args = expr->arguments(); | |
| 3802 DCHECK_EQ(1, args->length()); | |
| 3803 | |
| 3804 // Load the argument into r0 and convert it. | |
| 3805 VisitForAccumulatorValue(args->at(0)); | |
| 3806 | |
| 3807 ToLengthStub stub(isolate()); | |
| 3808 __ CallStub(&stub); | |
| 3809 context()->Plug(r0); | |
|
Jarin
2015/10/19 06:50:16
I see nearly the same code in EmitToString, EmitTo
Michael Starzinger
2015/10/19 08:21:08
Nah, PlugTOS targets top-of-stack, not the accumul
| |
| 3810 } | |
| 3811 | |
| 3812 | |
| 3800 void FullCodeGenerator::EmitToString(CallRuntime* expr) { | 3813 void FullCodeGenerator::EmitToString(CallRuntime* expr) { |
| 3801 ZoneList<Expression*>* args = expr->arguments(); | 3814 ZoneList<Expression*>* args = expr->arguments(); |
| 3802 DCHECK_EQ(1, args->length()); | 3815 DCHECK_EQ(1, args->length()); |
| 3803 | 3816 |
| 3804 // Load the argument into r0 and convert it. | 3817 // Load the argument into r0 and convert it. |
| 3805 VisitForAccumulatorValue(args->at(0)); | 3818 VisitForAccumulatorValue(args->at(0)); |
| 3806 | 3819 |
| 3807 ToStringStub stub(isolate()); | 3820 ToStringStub stub(isolate()); |
| 3808 __ CallStub(&stub); | 3821 __ CallStub(&stub); |
| 3809 context()->Plug(r0); | 3822 context()->Plug(r0); |
| (...skipping 1479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5289 DCHECK(interrupt_address == | 5302 DCHECK(interrupt_address == |
| 5290 isolate->builtins()->OsrAfterStackCheck()->entry()); | 5303 isolate->builtins()->OsrAfterStackCheck()->entry()); |
| 5291 return OSR_AFTER_STACK_CHECK; | 5304 return OSR_AFTER_STACK_CHECK; |
| 5292 } | 5305 } |
| 5293 | 5306 |
| 5294 | 5307 |
| 5295 } // namespace internal | 5308 } // namespace internal |
| 5296 } // namespace v8 | 5309 } // namespace v8 |
| 5297 | 5310 |
| 5298 #endif // V8_TARGET_ARCH_ARM | 5311 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |