| 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_X87 | 5 #if V8_TARGET_ARCH_X87 |
| 6 | 6 |
| 7 #include "src/full-codegen/full-codegen.h" | 7 #include "src/full-codegen/full-codegen.h" |
| 8 #include "src/ast/compile-time-value.h" | 8 #include "src/ast/compile-time-value.h" |
| 9 #include "src/ast/scopes.h" | 9 #include "src/ast/scopes.h" |
| 10 #include "src/code-factory.h" | 10 #include "src/code-factory.h" |
| (...skipping 2637 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2648 __ bind(&non_function_constructor); | 2648 __ bind(&non_function_constructor); |
| 2649 __ mov(eax, isolate()->factory()->Object_string()); | 2649 __ mov(eax, isolate()->factory()->Object_string()); |
| 2650 | 2650 |
| 2651 // All done. | 2651 // All done. |
| 2652 __ bind(&done); | 2652 __ bind(&done); |
| 2653 | 2653 |
| 2654 context()->Plug(eax); | 2654 context()->Plug(eax); |
| 2655 } | 2655 } |
| 2656 | 2656 |
| 2657 | 2657 |
| 2658 void FullCodeGenerator::EmitStringCharFromCode(CallRuntime* expr) { | |
| 2659 ZoneList<Expression*>* args = expr->arguments(); | |
| 2660 DCHECK(args->length() == 1); | |
| 2661 | |
| 2662 VisitForAccumulatorValue(args->at(0)); | |
| 2663 | |
| 2664 Label done; | |
| 2665 StringCharFromCodeGenerator generator(eax, ebx); | |
| 2666 generator.GenerateFast(masm_); | |
| 2667 __ jmp(&done); | |
| 2668 | |
| 2669 NopRuntimeCallHelper call_helper; | |
| 2670 generator.GenerateSlow(masm_, call_helper); | |
| 2671 | |
| 2672 __ bind(&done); | |
| 2673 context()->Plug(ebx); | |
| 2674 } | |
| 2675 | |
| 2676 | |
| 2677 void FullCodeGenerator::EmitStringCharCodeAt(CallRuntime* expr) { | 2658 void FullCodeGenerator::EmitStringCharCodeAt(CallRuntime* expr) { |
| 2678 ZoneList<Expression*>* args = expr->arguments(); | 2659 ZoneList<Expression*>* args = expr->arguments(); |
| 2679 DCHECK(args->length() == 2); | 2660 DCHECK(args->length() == 2); |
| 2680 | 2661 |
| 2681 VisitForStackValue(args->at(0)); | 2662 VisitForStackValue(args->at(0)); |
| 2682 VisitForAccumulatorValue(args->at(1)); | 2663 VisitForAccumulatorValue(args->at(1)); |
| 2683 | 2664 |
| 2684 Register object = ebx; | 2665 Register object = ebx; |
| 2685 Register index = eax; | 2666 Register index = eax; |
| 2686 Register result = edx; | 2667 Register result = edx; |
| (...skipping 890 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3577 isolate->builtins()->OnStackReplacement()->entry(), | 3558 isolate->builtins()->OnStackReplacement()->entry(), |
| 3578 Assembler::target_address_at(call_target_address, unoptimized_code)); | 3559 Assembler::target_address_at(call_target_address, unoptimized_code)); |
| 3579 return ON_STACK_REPLACEMENT; | 3560 return ON_STACK_REPLACEMENT; |
| 3580 } | 3561 } |
| 3581 | 3562 |
| 3582 | 3563 |
| 3583 } // namespace internal | 3564 } // namespace internal |
| 3584 } // namespace v8 | 3565 } // namespace v8 |
| 3585 | 3566 |
| 3586 #endif // V8_TARGET_ARCH_X87 | 3567 #endif // V8_TARGET_ARCH_X87 |
| OLD | NEW |