| 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-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 444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 455 // Store it into the (fixed) result register. | 455 // Store it into the (fixed) result register. |
| 456 __ sub(esp, Immediate(kDoubleSize)); | 456 __ sub(esp, Immediate(kDoubleSize)); |
| 457 __ fstp_d(Operand(esp, 0)); | 457 __ fstp_d(Operand(esp, 0)); |
| 458 __ movsd(double_result, Operand(esp, 0)); | 458 __ movsd(double_result, Operand(esp, 0)); |
| 459 __ add(esp, Immediate(kDoubleSize)); | 459 __ add(esp, Immediate(kDoubleSize)); |
| 460 | 460 |
| 461 __ bind(&done); | 461 __ bind(&done); |
| 462 __ ret(0); | 462 __ ret(0); |
| 463 } | 463 } |
| 464 | 464 |
| 465 void FunctionPrototypeStub::Generate(MacroAssembler* masm) { | |
| 466 Label miss; | |
| 467 Register receiver = LoadDescriptor::ReceiverRegister(); | |
| 468 // With careful management, we won't have to save slot and vector on | |
| 469 // the stack. Simply handle the possibly missing case first. | |
| 470 // TODO(mvstanton): this code can be more efficient. | |
| 471 __ cmp(FieldOperand(receiver, JSFunction::kPrototypeOrInitialMapOffset), | |
| 472 Immediate(isolate()->factory()->the_hole_value())); | |
| 473 __ j(equal, &miss); | |
| 474 __ TryGetFunctionPrototype(receiver, eax, ebx, &miss); | |
| 475 __ ret(0); | |
| 476 | |
| 477 __ bind(&miss); | |
| 478 PropertyAccessCompiler::TailCallBuiltin( | |
| 479 masm, PropertyAccessCompiler::MissBuiltin(Code::LOAD_IC)); | |
| 480 } | |
| 481 | |
| 482 void RegExpExecStub::Generate(MacroAssembler* masm) { | 465 void RegExpExecStub::Generate(MacroAssembler* masm) { |
| 483 // Just jump directly to runtime if native RegExp is not selected at compile | 466 // Just jump directly to runtime if native RegExp is not selected at compile |
| 484 // time or if regexp entry in generated code is turned off runtime switch or | 467 // time or if regexp entry in generated code is turned off runtime switch or |
| 485 // at compilation. | 468 // at compilation. |
| 486 #ifdef V8_INTERPRETED_REGEXP | 469 #ifdef V8_INTERPRETED_REGEXP |
| 487 __ TailCallRuntime(Runtime::kRegExpExec); | 470 __ TailCallRuntime(Runtime::kRegExpExec); |
| 488 #else // V8_INTERPRETED_REGEXP | 471 #else // V8_INTERPRETED_REGEXP |
| 489 | 472 |
| 490 // Stack frame on entry. | 473 // Stack frame on entry. |
| 491 // esp[0]: return address | 474 // esp[0]: return address |
| (...skipping 2869 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3361 kStackUnwindSpace, nullptr, return_value_operand, | 3344 kStackUnwindSpace, nullptr, return_value_operand, |
| 3362 NULL); | 3345 NULL); |
| 3363 } | 3346 } |
| 3364 | 3347 |
| 3365 #undef __ | 3348 #undef __ |
| 3366 | 3349 |
| 3367 } // namespace internal | 3350 } // namespace internal |
| 3368 } // namespace v8 | 3351 } // namespace v8 |
| 3369 | 3352 |
| 3370 #endif // V8_TARGET_ARCH_IA32 | 3353 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |