| 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 612 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 623 void Builtins::Generate_NotifySoftDeoptimized(MacroAssembler* masm) { | 623 void Builtins::Generate_NotifySoftDeoptimized(MacroAssembler* masm) { |
| 624 Generate_NotifyDeoptimizedHelper(masm, Deoptimizer::SOFT); | 624 Generate_NotifyDeoptimizedHelper(masm, Deoptimizer::SOFT); |
| 625 } | 625 } |
| 626 | 626 |
| 627 | 627 |
| 628 void Builtins::Generate_NotifyLazyDeoptimized(MacroAssembler* masm) { | 628 void Builtins::Generate_NotifyLazyDeoptimized(MacroAssembler* masm) { |
| 629 Generate_NotifyDeoptimizedHelper(masm, Deoptimizer::LAZY); | 629 Generate_NotifyDeoptimizedHelper(masm, Deoptimizer::LAZY); |
| 630 } | 630 } |
| 631 | 631 |
| 632 | 632 |
| 633 void Builtins::Generate_NotifyOSR(MacroAssembler* masm) { | |
| 634 // TODO(kasperl): Do we need to save/restore the XMM registers too? | |
| 635 // TODO(mvstanton): We should save these regs, do this in a future | |
| 636 // checkin. | |
| 637 | |
| 638 // For now, we are relying on the fact that Runtime::NotifyOSR | |
| 639 // doesn't do any garbage collection which allows us to save/restore | |
| 640 // the registers without worrying about which of them contain | |
| 641 // pointers. This seems a bit fragile. | |
| 642 __ pushad(); | |
| 643 { | |
| 644 FrameScope scope(masm, StackFrame::INTERNAL); | |
| 645 __ CallRuntime(Runtime::kNotifyOSR, 0); | |
| 646 } | |
| 647 __ popad(); | |
| 648 __ ret(0); | |
| 649 } | |
| 650 | |
| 651 | |
| 652 void Builtins::Generate_FunctionCall(MacroAssembler* masm) { | 633 void Builtins::Generate_FunctionCall(MacroAssembler* masm) { |
| 653 Factory* factory = masm->isolate()->factory(); | 634 Factory* factory = masm->isolate()->factory(); |
| 654 | 635 |
| 655 // 1. Make sure we have at least one argument. | 636 // 1. Make sure we have at least one argument. |
| 656 { Label done; | 637 { Label done; |
| 657 __ test(eax, eax); | 638 __ test(eax, eax); |
| 658 __ j(not_zero, &done); | 639 __ j(not_zero, &done); |
| 659 __ pop(ebx); | 640 __ pop(ebx); |
| 660 __ push(Immediate(factory->undefined_value())); | 641 __ push(Immediate(factory->undefined_value())); |
| 661 __ push(ebx); | 642 __ push(ebx); |
| (...skipping 662 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1324 // And "return" to the OSR entry point of the function. | 1305 // And "return" to the OSR entry point of the function. |
| 1325 __ ret(0); | 1306 __ ret(0); |
| 1326 } | 1307 } |
| 1327 | 1308 |
| 1328 | 1309 |
| 1329 #undef __ | 1310 #undef __ |
| 1330 } | 1311 } |
| 1331 } // namespace v8::internal | 1312 } // namespace v8::internal |
| 1332 | 1313 |
| 1333 #endif // V8_TARGET_ARCH_IA32 | 1314 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |