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 582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
593 // For now, we are relying on the fact that make_code_young doesn't do any | 593 // For now, we are relying on the fact that make_code_young doesn't do any |
594 // garbage collection which allows us to save/restore the registers without | 594 // garbage collection which allows us to save/restore the registers without |
595 // worrying about which of them contain pointers. We also don't build an | 595 // worrying about which of them contain pointers. We also don't build an |
596 // internal frame to make the code faster, since we shouldn't have to do stack | 596 // internal frame to make the code faster, since we shouldn't have to do stack |
597 // crawls in MakeCodeYoung. This seems a bit fragile. | 597 // crawls in MakeCodeYoung. This seems a bit fragile. |
598 | 598 |
599 // Re-execute the code that was patched back to the young age when | 599 // Re-execute the code that was patched back to the young age when |
600 // the stub returns. | 600 // the stub returns. |
601 __ subq(Operand(rsp, 0), Immediate(5)); | 601 __ subq(Operand(rsp, 0), Immediate(5)); |
602 __ Pushad(); | 602 __ Pushad(); |
603 __ movq(arg_reg_2, | |
604 ExternalReference::isolate_address(masm->isolate())); | |
605 __ movq(arg_reg_1, Operand(rsp, kNumSafepointRegisters * kPointerSize)); | 603 __ movq(arg_reg_1, Operand(rsp, kNumSafepointRegisters * kPointerSize)); |
606 { // NOLINT | 604 { // NOLINT |
607 FrameScope scope(masm, StackFrame::MANUAL); | 605 FrameScope scope(masm, StackFrame::MANUAL); |
608 __ PrepareCallCFunction(1); | 606 __ PrepareCallCFunction(1); |
609 __ CallCFunction( | 607 __ CallCFunction( |
610 ExternalReference::get_make_code_young_function(masm->isolate()), 1); | 608 ExternalReference::get_make_code_young_function(masm->isolate()), 1); |
611 } | 609 } |
612 __ Popad(); | 610 __ Popad(); |
613 __ ret(0); | 611 __ ret(0); |
614 } | 612 } |
(...skipping 786 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1401 // And "return" to the OSR entry point of the function. | 1399 // And "return" to the OSR entry point of the function. |
1402 __ ret(0); | 1400 __ ret(0); |
1403 } | 1401 } |
1404 | 1402 |
1405 | 1403 |
1406 #undef __ | 1404 #undef __ |
1407 | 1405 |
1408 } } // namespace v8::internal | 1406 } } // namespace v8::internal |
1409 | 1407 |
1410 #endif // V8_TARGET_ARCH_X64 | 1408 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |