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 2866 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2877 // -- edx : message_id as Smi | 2877 // -- edx : message_id as Smi |
2878 // -- esp[0] : return address | 2878 // -- esp[0] : return address |
2879 // ----------------------------------- | 2879 // ----------------------------------- |
2880 __ PopReturnAddressTo(ecx); | 2880 __ PopReturnAddressTo(ecx); |
2881 __ Push(edx); | 2881 __ Push(edx); |
2882 __ PushReturnAddressFrom(ecx); | 2882 __ PushReturnAddressFrom(ecx); |
2883 __ Move(esi, Smi::FromInt(0)); | 2883 __ Move(esi, Smi::FromInt(0)); |
2884 __ TailCallRuntime(Runtime::kAbort); | 2884 __ TailCallRuntime(Runtime::kAbort); |
2885 } | 2885 } |
2886 | 2886 |
2887 // static | |
2888 void Builtins::Generate_ToNumber(MacroAssembler* masm) { | |
2889 // The ToNumber stub takes one argument in eax. | |
2890 Label not_smi; | |
2891 __ JumpIfNotSmi(eax, ¬_smi, Label::kNear); | |
2892 __ Ret(); | |
2893 __ bind(¬_smi); | |
2894 | |
2895 Label not_heap_number; | |
2896 __ CompareMap(eax, masm->isolate()->factory()->heap_number_map()); | |
2897 __ j(not_equal, ¬_heap_number, Label::kNear); | |
2898 __ Ret(); | |
2899 __ bind(¬_heap_number); | |
2900 | |
2901 __ Jump(masm->isolate()->builtins()->NonNumberToNumber(), | |
2902 RelocInfo::CODE_TARGET); | |
2903 } | |
2904 | |
2905 void Builtins::Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm) { | 2887 void Builtins::Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm) { |
2906 // ----------- S t a t e ------------- | 2888 // ----------- S t a t e ------------- |
2907 // -- eax : actual number of arguments | 2889 // -- eax : actual number of arguments |
2908 // -- ebx : expected number of arguments | 2890 // -- ebx : expected number of arguments |
2909 // -- edx : new target (passed through to callee) | 2891 // -- edx : new target (passed through to callee) |
2910 // -- edi : function (passed through to callee) | 2892 // -- edi : function (passed through to callee) |
2911 // ----------------------------------- | 2893 // ----------------------------------- |
2912 | 2894 |
2913 Label invoke, dont_adapt_arguments, stack_overflow; | 2895 Label invoke, dont_adapt_arguments, stack_overflow; |
2914 __ IncrementCounter(masm->isolate()->counters()->arguments_adaptors(), 1); | 2896 __ IncrementCounter(masm->isolate()->counters()->arguments_adaptors(), 1); |
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3171 | 3153 |
3172 void Builtins::Generate_InterpreterOnStackReplacement(MacroAssembler* masm) { | 3154 void Builtins::Generate_InterpreterOnStackReplacement(MacroAssembler* masm) { |
3173 Generate_OnStackReplacementHelper(masm, true); | 3155 Generate_OnStackReplacementHelper(masm, true); |
3174 } | 3156 } |
3175 | 3157 |
3176 #undef __ | 3158 #undef __ |
3177 } // namespace internal | 3159 } // namespace internal |
3178 } // namespace v8 | 3160 } // namespace v8 |
3179 | 3161 |
3180 #endif // V8_TARGET_ARCH_IA32 | 3162 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |