| 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_IA32 | 5 #if V8_TARGET_ARCH_IA32 |
| 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 2645 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2656 __ bind(&non_function_constructor); | 2656 __ bind(&non_function_constructor); |
| 2657 __ mov(eax, isolate()->factory()->Object_string()); | 2657 __ mov(eax, isolate()->factory()->Object_string()); |
| 2658 | 2658 |
| 2659 // All done. | 2659 // All done. |
| 2660 __ bind(&done); | 2660 __ bind(&done); |
| 2661 | 2661 |
| 2662 context()->Plug(eax); | 2662 context()->Plug(eax); |
| 2663 } | 2663 } |
| 2664 | 2664 |
| 2665 | 2665 |
| 2666 void FullCodeGenerator::EmitStringCharFromCode(CallRuntime* expr) { | |
| 2667 ZoneList<Expression*>* args = expr->arguments(); | |
| 2668 DCHECK(args->length() == 1); | |
| 2669 | |
| 2670 VisitForAccumulatorValue(args->at(0)); | |
| 2671 | |
| 2672 Label done; | |
| 2673 StringCharFromCodeGenerator generator(eax, ebx); | |
| 2674 generator.GenerateFast(masm_); | |
| 2675 __ jmp(&done); | |
| 2676 | |
| 2677 NopRuntimeCallHelper call_helper; | |
| 2678 generator.GenerateSlow(masm_, call_helper); | |
| 2679 | |
| 2680 __ bind(&done); | |
| 2681 context()->Plug(ebx); | |
| 2682 } | |
| 2683 | |
| 2684 | |
| 2685 void FullCodeGenerator::EmitStringCharCodeAt(CallRuntime* expr) { | 2666 void FullCodeGenerator::EmitStringCharCodeAt(CallRuntime* expr) { |
| 2686 ZoneList<Expression*>* args = expr->arguments(); | 2667 ZoneList<Expression*>* args = expr->arguments(); |
| 2687 DCHECK(args->length() == 2); | 2668 DCHECK(args->length() == 2); |
| 2688 | 2669 |
| 2689 VisitForStackValue(args->at(0)); | 2670 VisitForStackValue(args->at(0)); |
| 2690 VisitForAccumulatorValue(args->at(1)); | 2671 VisitForAccumulatorValue(args->at(1)); |
| 2691 | 2672 |
| 2692 Register object = ebx; | 2673 Register object = ebx; |
| 2693 Register index = eax; | 2674 Register index = eax; |
| 2694 Register result = edx; | 2675 Register result = edx; |
| (...skipping 890 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3585 isolate->builtins()->OnStackReplacement()->entry(), | 3566 isolate->builtins()->OnStackReplacement()->entry(), |
| 3586 Assembler::target_address_at(call_target_address, unoptimized_code)); | 3567 Assembler::target_address_at(call_target_address, unoptimized_code)); |
| 3587 return ON_STACK_REPLACEMENT; | 3568 return ON_STACK_REPLACEMENT; |
| 3588 } | 3569 } |
| 3589 | 3570 |
| 3590 | 3571 |
| 3591 } // namespace internal | 3572 } // namespace internal |
| 3592 } // namespace v8 | 3573 } // namespace v8 |
| 3593 | 3574 |
| 3594 #endif // V8_TARGET_ARCH_IA32 | 3575 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |