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/code-factory.h" | 7 #include "src/code-factory.h" |
8 #include "src/codegen.h" | 8 #include "src/codegen.h" |
9 #include "src/deoptimizer.h" | 9 #include "src/deoptimizer.h" |
10 #include "src/full-codegen/full-codegen.h" | 10 #include "src/full-codegen/full-codegen.h" |
(...skipping 2681 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2692 __ SmiTag(edx); | 2692 __ SmiTag(edx); |
2693 __ PopReturnAddressTo(ecx); | 2693 __ PopReturnAddressTo(ecx); |
2694 __ Push(edx); | 2694 __ Push(edx); |
2695 __ Push(Smi::FromInt(AllocateTargetSpace::encode(OLD_SPACE))); | 2695 __ Push(Smi::FromInt(AllocateTargetSpace::encode(OLD_SPACE))); |
2696 __ PushReturnAddressFrom(ecx); | 2696 __ PushReturnAddressFrom(ecx); |
2697 __ Move(esi, Smi::FromInt(0)); | 2697 __ Move(esi, Smi::FromInt(0)); |
2698 __ TailCallRuntime(Runtime::kAllocateInTargetSpace); | 2698 __ TailCallRuntime(Runtime::kAllocateInTargetSpace); |
2699 } | 2699 } |
2700 | 2700 |
2701 // static | 2701 // static |
| 2702 void Builtins::Generate_Abort(MacroAssembler* masm) { |
| 2703 // ----------- S t a t e ------------- |
| 2704 // -- edx : message_id as Smi |
| 2705 // -- esp[0] : return address |
| 2706 // ----------------------------------- |
| 2707 __ PopReturnAddressTo(ecx); |
| 2708 __ Push(edx); |
| 2709 __ PushReturnAddressFrom(ecx); |
| 2710 __ Move(esi, Smi::FromInt(0)); |
| 2711 __ TailCallRuntime(Runtime::kAbort); |
| 2712 } |
| 2713 |
| 2714 // static |
2702 void Builtins::Generate_StringToNumber(MacroAssembler* masm) { | 2715 void Builtins::Generate_StringToNumber(MacroAssembler* masm) { |
2703 // The StringToNumber stub takes one argument in eax. | 2716 // The StringToNumber stub takes one argument in eax. |
2704 __ AssertString(eax); | 2717 __ AssertString(eax); |
2705 | 2718 |
2706 // Check if string has a cached array index. | 2719 // Check if string has a cached array index. |
2707 Label runtime; | 2720 Label runtime; |
2708 __ test(FieldOperand(eax, String::kHashFieldOffset), | 2721 __ test(FieldOperand(eax, String::kHashFieldOffset), |
2709 Immediate(String::kContainsCachedArrayIndexMask)); | 2722 Immediate(String::kContainsCachedArrayIndexMask)); |
2710 __ j(not_zero, &runtime, Label::kNear); | 2723 __ j(not_zero, &runtime, Label::kNear); |
2711 __ mov(eax, FieldOperand(eax, String::kHashFieldOffset)); | 2724 __ mov(eax, FieldOperand(eax, String::kHashFieldOffset)); |
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2990 | 3003 |
2991 // And "return" to the OSR entry point of the function. | 3004 // And "return" to the OSR entry point of the function. |
2992 __ ret(0); | 3005 __ ret(0); |
2993 } | 3006 } |
2994 | 3007 |
2995 #undef __ | 3008 #undef __ |
2996 } // namespace internal | 3009 } // namespace internal |
2997 } // namespace v8 | 3010 } // namespace v8 |
2998 | 3011 |
2999 #endif // V8_TARGET_ARCH_IA32 | 3012 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |