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 1175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1186 | 1186 |
1187 void Builtins::Generate_NotifyLazyDeoptimized(MacroAssembler* masm) { | 1187 void Builtins::Generate_NotifyLazyDeoptimized(MacroAssembler* masm) { |
1188 Generate_NotifyDeoptimizedHelper(masm, Deoptimizer::LAZY); | 1188 Generate_NotifyDeoptimizedHelper(masm, Deoptimizer::LAZY); |
1189 } | 1189 } |
1190 | 1190 |
1191 | 1191 |
1192 // static | 1192 // static |
1193 void Builtins::Generate_DatePrototype_GetField(MacroAssembler* masm, | 1193 void Builtins::Generate_DatePrototype_GetField(MacroAssembler* masm, |
1194 int field_index) { | 1194 int field_index) { |
1195 // ----------- S t a t e ------------- | 1195 // ----------- S t a t e ------------- |
| 1196 // -- eax : number of arguments |
| 1197 // -- edi : function |
| 1198 // -- esi : context |
1196 // -- esp[0] : return address | 1199 // -- esp[0] : return address |
1197 // -- esp[4] : receiver | 1200 // -- esp[4] : receiver |
1198 // ----------------------------------- | 1201 // ----------------------------------- |
1199 | 1202 |
1200 // 1. Load receiver into eax and check that it's actually a JSDate object. | 1203 // 1. Load receiver into eax and check that it's actually a JSDate object. |
1201 Label receiver_not_date; | 1204 Label receiver_not_date; |
1202 { | 1205 { |
1203 __ mov(eax, Operand(esp, kPointerSize)); | 1206 __ mov(eax, Operand(esp, kPointerSize)); |
1204 __ JumpIfSmi(eax, &receiver_not_date); | 1207 __ JumpIfSmi(eax, &receiver_not_date); |
1205 __ CmpObjectType(eax, JS_DATE_TYPE, ebx); | 1208 __ CmpObjectType(eax, JS_DATE_TYPE, ebx); |
(...skipping 22 matching lines...) Expand all Loading... |
1228 Immediate(Smi::FromInt(field_index))); | 1231 Immediate(Smi::FromInt(field_index))); |
1229 __ CallCFunction( | 1232 __ CallCFunction( |
1230 ExternalReference::get_date_field_function(masm->isolate()), 2); | 1233 ExternalReference::get_date_field_function(masm->isolate()), 2); |
1231 } | 1234 } |
1232 __ ret(1 * kPointerSize); | 1235 __ ret(1 * kPointerSize); |
1233 | 1236 |
1234 // 3. Raise a TypeError if the receiver is not a date. | 1237 // 3. Raise a TypeError if the receiver is not a date. |
1235 __ bind(&receiver_not_date); | 1238 __ bind(&receiver_not_date); |
1236 { | 1239 { |
1237 FrameScope scope(masm, StackFrame::MANUAL); | 1240 FrameScope scope(masm, StackFrame::MANUAL); |
1238 __ EnterFrame(StackFrame::INTERNAL); | 1241 __ Push(ebp); |
| 1242 __ Move(ebp, esp); |
| 1243 __ Push(esi); |
| 1244 __ Push(edi); |
| 1245 __ Push(Immediate(0)); |
1239 __ CallRuntime(Runtime::kThrowNotDateError); | 1246 __ CallRuntime(Runtime::kThrowNotDateError); |
1240 } | 1247 } |
1241 } | 1248 } |
1242 | 1249 |
1243 // static | 1250 // static |
1244 void Builtins::Generate_FunctionPrototypeApply(MacroAssembler* masm) { | 1251 void Builtins::Generate_FunctionPrototypeApply(MacroAssembler* masm) { |
1245 // ----------- S t a t e ------------- | 1252 // ----------- S t a t e ------------- |
1246 // -- eax : argc | 1253 // -- eax : argc |
1247 // -- esp[0] : return address | 1254 // -- esp[0] : return address |
1248 // -- esp[4] : argArray | 1255 // -- esp[4] : argArray |
(...skipping 1723 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2972 // And "return" to the OSR entry point of the function. | 2979 // And "return" to the OSR entry point of the function. |
2973 __ ret(0); | 2980 __ ret(0); |
2974 } | 2981 } |
2975 | 2982 |
2976 | 2983 |
2977 #undef __ | 2984 #undef __ |
2978 } // namespace internal | 2985 } // namespace internal |
2979 } // namespace v8 | 2986 } // namespace v8 |
2980 | 2987 |
2981 #endif // V8_TARGET_ARCH_IA32 | 2988 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |