| 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-stubs.h" | 7 #include "src/code-stubs.h" |
| 8 #include "src/api-arguments.h" | 8 #include "src/api-arguments.h" |
| 9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
| 10 #include "src/bootstrapper.h" | 10 #include "src/bootstrapper.h" |
| (...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 __ fstp_d(Operand(esp, 0 * kDoubleSize)); | 274 __ fstp_d(Operand(esp, 0 * kDoubleSize)); |
| 275 // Put the double_exponent parameter in call stack | 275 // Put the double_exponent parameter in call stack |
| 276 __ fstp_d(Operand(esp, 1 * kDoubleSize)); | 276 __ fstp_d(Operand(esp, 1 * kDoubleSize)); |
| 277 __ CallCFunction(ExternalReference::power_double_double_function(isolate()), | 277 __ CallCFunction(ExternalReference::power_double_double_function(isolate()), |
| 278 4); | 278 4); |
| 279 } | 279 } |
| 280 // Return value is in st(0) on ia32. | 280 // Return value is in st(0) on ia32. |
| 281 __ ret(0); | 281 __ ret(0); |
| 282 } | 282 } |
| 283 | 283 |
| 284 | |
| 285 void FunctionPrototypeStub::Generate(MacroAssembler* masm) { | |
| 286 Label miss; | |
| 287 Register receiver = LoadDescriptor::ReceiverRegister(); | |
| 288 // With careful management, we won't have to save slot and vector on | |
| 289 // the stack. Simply handle the possibly missing case first. | |
| 290 // TODO(mvstanton): this code can be more efficient. | |
| 291 __ cmp(FieldOperand(receiver, JSFunction::kPrototypeOrInitialMapOffset), | |
| 292 Immediate(isolate()->factory()->the_hole_value())); | |
| 293 __ j(equal, &miss); | |
| 294 __ TryGetFunctionPrototype(receiver, eax, ebx, &miss); | |
| 295 __ ret(0); | |
| 296 | |
| 297 __ bind(&miss); | |
| 298 PropertyAccessCompiler::TailCallBuiltin( | |
| 299 masm, PropertyAccessCompiler::MissBuiltin(Code::LOAD_IC)); | |
| 300 } | |
| 301 | |
| 302 void RegExpExecStub::Generate(MacroAssembler* masm) { | 284 void RegExpExecStub::Generate(MacroAssembler* masm) { |
| 303 // Just jump directly to runtime if native RegExp is not selected at compile | 285 // Just jump directly to runtime if native RegExp is not selected at compile |
| 304 // time or if regexp entry in generated code is turned off runtime switch or | 286 // time or if regexp entry in generated code is turned off runtime switch or |
| 305 // at compilation. | 287 // at compilation. |
| 306 #ifdef V8_INTERPRETED_REGEXP | 288 #ifdef V8_INTERPRETED_REGEXP |
| 307 __ TailCallRuntime(Runtime::kRegExpExec); | 289 __ TailCallRuntime(Runtime::kRegExpExec); |
| 308 #else // V8_INTERPRETED_REGEXP | 290 #else // V8_INTERPRETED_REGEXP |
| 309 | 291 |
| 310 // Stack frame on entry. | 292 // Stack frame on entry. |
| 311 // esp[0]: return address | 293 // esp[0]: return address |
| (...skipping 3605 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3917 kStackUnwindSpace, nullptr, return_value_operand, | 3899 kStackUnwindSpace, nullptr, return_value_operand, |
| 3918 NULL); | 3900 NULL); |
| 3919 } | 3901 } |
| 3920 | 3902 |
| 3921 #undef __ | 3903 #undef __ |
| 3922 | 3904 |
| 3923 } // namespace internal | 3905 } // namespace internal |
| 3924 } // namespace v8 | 3906 } // namespace v8 |
| 3925 | 3907 |
| 3926 #endif // V8_TARGET_ARCH_X87 | 3908 #endif // V8_TARGET_ARCH_X87 |
| OLD | NEW |