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

Side by Side Diff: src/ia32/builtins-ia32.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, 2 months 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/ia32/assembler-ia32-inl.h ('k') | src/ia32/codegen-ia32.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 545 matching lines...) Expand 10 before | Expand all | Expand 10 after
556 GenerateMakeCodeYoungAgainCommon(masm); \ 556 GenerateMakeCodeYoungAgainCommon(masm); \
557 } \ 557 } \
558 void Builtins::Generate_Make##C##CodeYoungAgainOddMarking( \ 558 void Builtins::Generate_Make##C##CodeYoungAgainOddMarking( \
559 MacroAssembler* masm) { \ 559 MacroAssembler* masm) { \
560 GenerateMakeCodeYoungAgainCommon(masm); \ 560 GenerateMakeCodeYoungAgainCommon(masm); \
561 } 561 }
562 CODE_AGE_LIST(DEFINE_CODE_AGE_BUILTIN_GENERATOR) 562 CODE_AGE_LIST(DEFINE_CODE_AGE_BUILTIN_GENERATOR)
563 #undef DEFINE_CODE_AGE_BUILTIN_GENERATOR 563 #undef DEFINE_CODE_AGE_BUILTIN_GENERATOR
564 564
565 565
566 void Builtins::Generate_MarkCodeAsExecutedOnce(MacroAssembler* masm) {
567 // For now, as in GenerateMakeCodeYoungAgainCommon, we are relying on the fact
568 // that make_code_young doesn't do any garbage collection which allows us to
569 // save/restore the registers without worrying about which of them contain
570 // pointers.
571 __ pushad();
572 __ mov(eax, Operand(esp, 8 * kPointerSize));
573 __ sub(eax, Immediate(Assembler::kCallInstructionLength));
574 { // NOLINT
575 FrameScope scope(masm, StackFrame::MANUAL);
576 __ PrepareCallCFunction(2, ebx);
577 __ mov(Operand(esp, 1 * kPointerSize),
578 Immediate(ExternalReference::isolate_address(masm->isolate())));
579 __ mov(Operand(esp, 0), eax);
580 __ CallCFunction(
581 ExternalReference::get_mark_code_as_executed_function(masm->isolate()),
582 2);
583 }
584 __ popad();
585
586 // Perform prologue operations usually performed by the young code stub.
587 __ pop(eax); // Pop return address into scratch register.
588 __ push(ebp); // Caller's frame pointer.
589 __ mov(ebp, esp);
590 __ push(esi); // Callee's context.
591 __ push(edi); // Callee's JS Function.
592 __ push(eax); // Push return address after frame prologue.
593
594 // Jump to point after the code-age stub.
595 __ ret(0);
596 }
597
598
599 void Builtins::Generate_MarkCodeAsExecutedTwice(MacroAssembler* masm) {
600 GenerateMakeCodeYoungAgainCommon(masm);
601 }
602
603
566 void Builtins::Generate_NotifyStubFailure(MacroAssembler* masm) { 604 void Builtins::Generate_NotifyStubFailure(MacroAssembler* masm) {
567 // Enter an internal frame. 605 // Enter an internal frame.
568 { 606 {
569 FrameScope scope(masm, StackFrame::INTERNAL); 607 FrameScope scope(masm, StackFrame::INTERNAL);
570 608
571 // Preserve registers across notification, this is important for compiled 609 // Preserve registers across notification, this is important for compiled
572 // stubs that tail call the runtime on deopts passing their parameters in 610 // stubs that tail call the runtime on deopts passing their parameters in
573 // registers. 611 // registers.
574 __ pushad(); 612 __ pushad();
575 __ CallRuntime(Runtime::kNotifyStubFailure, 0); 613 __ CallRuntime(Runtime::kNotifyStubFailure, 0);
(...skipping 747 matching lines...) Expand 10 before | Expand all | Expand 10 after
1323 1361
1324 __ bind(&ok); 1362 __ bind(&ok);
1325 __ ret(0); 1363 __ ret(0);
1326 } 1364 }
1327 1365
1328 #undef __ 1366 #undef __
1329 } 1367 }
1330 } // namespace v8::internal 1368 } // namespace v8::internal
1331 1369
1332 #endif // V8_TARGET_ARCH_IA32 1370 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/assembler-ia32-inl.h ('k') | src/ia32/codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698