| 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/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 2890 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2901 // -- edx : message_id as Smi | 2901 // -- edx : message_id as Smi |
| 2902 // -- esp[0] : return address | 2902 // -- esp[0] : return address |
| 2903 // ----------------------------------- | 2903 // ----------------------------------- |
| 2904 __ PopReturnAddressTo(ecx); | 2904 __ PopReturnAddressTo(ecx); |
| 2905 __ Push(edx); | 2905 __ Push(edx); |
| 2906 __ PushReturnAddressFrom(ecx); | 2906 __ PushReturnAddressFrom(ecx); |
| 2907 __ Move(esi, Smi::FromInt(0)); | 2907 __ Move(esi, Smi::FromInt(0)); |
| 2908 __ TailCallRuntime(Runtime::kAbort); | 2908 __ TailCallRuntime(Runtime::kAbort); |
| 2909 } | 2909 } |
| 2910 | 2910 |
| 2911 // static | |
| 2912 void Builtins::Generate_ToNumber(MacroAssembler* masm) { | |
| 2913 // The ToNumber stub takes one argument in eax. | |
| 2914 Label not_smi; | |
| 2915 __ JumpIfNotSmi(eax, ¬_smi, Label::kNear); | |
| 2916 __ Ret(); | |
| 2917 __ bind(¬_smi); | |
| 2918 | |
| 2919 Label not_heap_number; | |
| 2920 __ CompareMap(eax, masm->isolate()->factory()->heap_number_map()); | |
| 2921 __ j(not_equal, ¬_heap_number, Label::kNear); | |
| 2922 __ Ret(); | |
| 2923 __ bind(¬_heap_number); | |
| 2924 | |
| 2925 __ Jump(masm->isolate()->builtins()->NonNumberToNumber(), | |
| 2926 RelocInfo::CODE_TARGET); | |
| 2927 } | |
| 2928 | |
| 2929 void Builtins::Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm) { | 2911 void Builtins::Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm) { |
| 2930 // ----------- S t a t e ------------- | 2912 // ----------- S t a t e ------------- |
| 2931 // -- eax : actual number of arguments | 2913 // -- eax : actual number of arguments |
| 2932 // -- ebx : expected number of arguments | 2914 // -- ebx : expected number of arguments |
| 2933 // -- edx : new target (passed through to callee) | 2915 // -- edx : new target (passed through to callee) |
| 2934 // -- edi : function (passed through to callee) | 2916 // -- edi : function (passed through to callee) |
| 2935 // ----------------------------------- | 2917 // ----------------------------------- |
| 2936 | 2918 |
| 2937 Label invoke, dont_adapt_arguments, stack_overflow; | 2919 Label invoke, dont_adapt_arguments, stack_overflow; |
| 2938 __ IncrementCounter(masm->isolate()->counters()->arguments_adaptors(), 1); | 2920 __ IncrementCounter(masm->isolate()->counters()->arguments_adaptors(), 1); |
| (...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3196 | 3178 |
| 3197 void Builtins::Generate_InterpreterOnStackReplacement(MacroAssembler* masm) { | 3179 void Builtins::Generate_InterpreterOnStackReplacement(MacroAssembler* masm) { |
| 3198 Generate_OnStackReplacementHelper(masm, true); | 3180 Generate_OnStackReplacementHelper(masm, true); |
| 3199 } | 3181 } |
| 3200 | 3182 |
| 3201 #undef __ | 3183 #undef __ |
| 3202 } // namespace internal | 3184 } // namespace internal |
| 3203 } // namespace v8 | 3185 } // namespace v8 |
| 3204 | 3186 |
| 3205 #endif // V8_TARGET_ARCH_X87 | 3187 #endif // V8_TARGET_ARCH_X87 |
| OLD | NEW |