| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 543 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 554 GenerateMakeCodeYoungAgainCommon(masm); \ | 554 GenerateMakeCodeYoungAgainCommon(masm); \ |
| 555 } \ | 555 } \ |
| 556 void Builtins::Generate_Make##C##CodeYoungAgainOddMarking( \ | 556 void Builtins::Generate_Make##C##CodeYoungAgainOddMarking( \ |
| 557 MacroAssembler* masm) { \ | 557 MacroAssembler* masm) { \ |
| 558 GenerateMakeCodeYoungAgainCommon(masm); \ | 558 GenerateMakeCodeYoungAgainCommon(masm); \ |
| 559 } | 559 } |
| 560 CODE_AGE_LIST(DEFINE_CODE_AGE_BUILTIN_GENERATOR) | 560 CODE_AGE_LIST(DEFINE_CODE_AGE_BUILTIN_GENERATOR) |
| 561 #undef DEFINE_CODE_AGE_BUILTIN_GENERATOR | 561 #undef DEFINE_CODE_AGE_BUILTIN_GENERATOR |
| 562 | 562 |
| 563 | 563 |
| 564 void Builtins::Generate_NotifyStubFailure(MacroAssembler* masm) { | 564 static void Generate_NotifyStubFailureHelper(MacroAssembler* masm, |
| 565 SaveFPRegsMode save_doubles) { |
| 565 // Enter an internal frame. | 566 // Enter an internal frame. |
| 566 { | 567 { |
| 567 FrameScope scope(masm, StackFrame::INTERNAL); | 568 FrameScope scope(masm, StackFrame::INTERNAL); |
| 568 | 569 |
| 569 // Preserve registers across notification, this is important for compiled | 570 // Preserve registers across notification, this is important for compiled |
| 570 // stubs that tail call the runtime on deopts passing their parameters in | 571 // stubs that tail call the runtime on deopts passing their parameters in |
| 571 // registers. | 572 // registers. |
| 572 __ pushad(); | 573 __ pushad(); |
| 573 __ CallRuntime(Runtime::kNotifyStubFailure, 0); | 574 __ CallRuntime(Runtime::kNotifyStubFailure, 0, save_doubles); |
| 574 __ popad(); | 575 __ popad(); |
| 575 // Tear down internal frame. | 576 // Tear down internal frame. |
| 576 } | 577 } |
| 577 | 578 |
| 578 __ pop(MemOperand(esp, 0)); // Ignore state offset | 579 __ pop(MemOperand(esp, 0)); // Ignore state offset |
| 579 __ ret(0); // Return to IC Miss stub, continuation still on stack. | 580 __ ret(0); // Return to IC Miss stub, continuation still on stack. |
| 580 } | 581 } |
| 581 | 582 |
| 582 | 583 |
| 584 void Builtins::Generate_NotifyStubFailure(MacroAssembler* masm) { |
| 585 Generate_NotifyStubFailureHelper(masm, kDontSaveFPRegs); |
| 586 } |
| 587 |
| 588 |
| 589 void Builtins::Generate_NotifyStubFailureSaveDoubles(MacroAssembler* masm) { |
| 590 if (Serializer::enabled()) { |
| 591 PlatformFeatureScope sse2(SSE2); |
| 592 Generate_NotifyStubFailureHelper(masm, kSaveFPRegs); |
| 593 } else { |
| 594 Generate_NotifyStubFailureHelper(masm, kSaveFPRegs); |
| 595 } |
| 596 } |
| 597 |
| 598 |
| 583 static void Generate_NotifyDeoptimizedHelper(MacroAssembler* masm, | 599 static void Generate_NotifyDeoptimizedHelper(MacroAssembler* masm, |
| 584 Deoptimizer::BailoutType type) { | 600 Deoptimizer::BailoutType type) { |
| 585 { | 601 { |
| 586 FrameScope scope(masm, StackFrame::INTERNAL); | 602 FrameScope scope(masm, StackFrame::INTERNAL); |
| 587 | 603 |
| 588 // Pass deoptimization type to the runtime system. | 604 // Pass deoptimization type to the runtime system. |
| 589 __ push(Immediate(Smi::FromInt(static_cast<int>(type)))); | 605 __ push(Immediate(Smi::FromInt(static_cast<int>(type)))); |
| 590 __ CallRuntime(Runtime::kNotifyDeoptimized, 1); | 606 __ CallRuntime(Runtime::kNotifyDeoptimized, 1); |
| 591 | 607 |
| 592 // Tear down internal frame. | 608 // Tear down internal frame. |
| (...skipping 731 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1324 // And "return" to the OSR entry point of the function. | 1340 // And "return" to the OSR entry point of the function. |
| 1325 __ ret(0); | 1341 __ ret(0); |
| 1326 } | 1342 } |
| 1327 | 1343 |
| 1328 | 1344 |
| 1329 #undef __ | 1345 #undef __ |
| 1330 } | 1346 } |
| 1331 } // namespace v8::internal | 1347 } // namespace v8::internal |
| 1332 | 1348 |
| 1333 #endif // V8_TARGET_ARCH_IA32 | 1349 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |