Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(155)

Side by Side Diff: src/x64/builtins-x64.cc

Issue 23480031: Enable preaging of code objects when --optimize-for-size. (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: bool -> enum Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/x64/assembler-x64-inl.h ('k') | src/x64/codegen-x64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 609 matching lines...) Expand 10 before | Expand all | Expand 10 after
620 GenerateMakeCodeYoungAgainCommon(masm); \ 620 GenerateMakeCodeYoungAgainCommon(masm); \
621 } \ 621 } \
622 void Builtins::Generate_Make##C##CodeYoungAgainOddMarking( \ 622 void Builtins::Generate_Make##C##CodeYoungAgainOddMarking( \
623 MacroAssembler* masm) { \ 623 MacroAssembler* masm) { \
624 GenerateMakeCodeYoungAgainCommon(masm); \ 624 GenerateMakeCodeYoungAgainCommon(masm); \
625 } 625 }
626 CODE_AGE_LIST(DEFINE_CODE_AGE_BUILTIN_GENERATOR) 626 CODE_AGE_LIST(DEFINE_CODE_AGE_BUILTIN_GENERATOR)
627 #undef DEFINE_CODE_AGE_BUILTIN_GENERATOR 627 #undef DEFINE_CODE_AGE_BUILTIN_GENERATOR
628 628
629 629
630 void Builtins::Generate_MarkCodeAsExecutedOnce(MacroAssembler* masm) {
631 // For now, as in GenerateMakeCodeYoungAgainCommon, we are relying on the fact
632 // that make_code_young doesn't do any garbage collection which allows us to
633 // save/restore the registers without worrying about which of them contain
634 // pointers.
635 __ Pushad();
636 __ movq(arg_reg_2, ExternalReference::isolate_address(masm->isolate()));
637 __ movq(arg_reg_1, Operand(rsp, kNumSafepointRegisters * kPointerSize));
638 __ subq(arg_reg_1, Immediate(Assembler::kShortCallInstructionLength));
639 { // NOLINT
640 FrameScope scope(masm, StackFrame::MANUAL);
641 __ PrepareCallCFunction(1);
642 __ CallCFunction(
643 ExternalReference::get_mark_code_as_executed_function(masm->isolate()),
644 1);
645 }
646 __ Popad();
647
648 // Perform prologue operations usually performed by the young code stub.
649 __ pop(r10); // Pop return address into scratch register.
650 __ push(rbp); // Caller's frame pointer.
651 __ movq(rbp, rsp);
652 __ push(rsi); // Callee's context.
653 __ push(rdi); // Callee's JS Function.
654 __ push(r10); // Push return address after frame prologue.
655
656 // Jump to point after the code-age stub.
657 __ ret(0);
658 }
659
660
661 void Builtins::Generate_MarkCodeAsExecutedTwice(MacroAssembler* masm) {
662 GenerateMakeCodeYoungAgainCommon(masm);
663 }
664
665
630 void Builtins::Generate_NotifyStubFailure(MacroAssembler* masm) { 666 void Builtins::Generate_NotifyStubFailure(MacroAssembler* masm) {
631 // Enter an internal frame. 667 // Enter an internal frame.
632 { 668 {
633 FrameScope scope(masm, StackFrame::INTERNAL); 669 FrameScope scope(masm, StackFrame::INTERNAL);
634 670
635 // Preserve registers across notification, this is important for compiled 671 // Preserve registers across notification, this is important for compiled
636 // stubs that tail call the runtime on deopts passing their parameters in 672 // stubs that tail call the runtime on deopts passing their parameters in
637 // registers. 673 // registers.
638 __ Pushad(); 674 __ Pushad();
639 __ CallRuntime(Runtime::kNotifyStubFailure, 0); 675 __ CallRuntime(Runtime::kNotifyStubFailure, 0);
(...skipping 761 matching lines...) Expand 10 before | Expand all | Expand 10 after
1401 __ bind(&ok); 1437 __ bind(&ok);
1402 __ ret(0); 1438 __ ret(0);
1403 } 1439 }
1404 1440
1405 1441
1406 #undef __ 1442 #undef __
1407 1443
1408 } } // namespace v8::internal 1444 } } // namespace v8::internal
1409 1445
1410 #endif // V8_TARGET_ARCH_X64 1446 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/assembler-x64-inl.h ('k') | src/x64/codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698