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