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

Side by Side Diff: src/arm/builtins-arm.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/arm/assembler-arm-inl.h ('k') | src/arm/full-codegen-arm.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 808 matching lines...) Expand 10 before | Expand all | Expand 10 after
819 GenerateMakeCodeYoungAgainCommon(masm); \ 819 GenerateMakeCodeYoungAgainCommon(masm); \
820 } \ 820 } \
821 void Builtins::Generate_Make##C##CodeYoungAgainOddMarking( \ 821 void Builtins::Generate_Make##C##CodeYoungAgainOddMarking( \
822 MacroAssembler* masm) { \ 822 MacroAssembler* masm) { \
823 GenerateMakeCodeYoungAgainCommon(masm); \ 823 GenerateMakeCodeYoungAgainCommon(masm); \
824 } 824 }
825 CODE_AGE_LIST(DEFINE_CODE_AGE_BUILTIN_GENERATOR) 825 CODE_AGE_LIST(DEFINE_CODE_AGE_BUILTIN_GENERATOR)
826 #undef DEFINE_CODE_AGE_BUILTIN_GENERATOR 826 #undef DEFINE_CODE_AGE_BUILTIN_GENERATOR
827 827
828 828
829 void Builtins::Generate_MarkCodeAsExecutedOnce(MacroAssembler* masm) {
830 // For now, as in GenerateMakeCodeYoungAgainCommon, we are relying on the fact
831 // that make_code_young doesn't do any garbage collection which allows us to
832 // save/restore the registers without worrying about which of them contain
833 // pointers.
834
835 // The following registers must be saved and restored when calling through to
836 // the runtime:
837 // r0 - contains return address (beginning of patch sequence)
838 // r1 - isolate
839 FrameScope scope(masm, StackFrame::MANUAL);
840 __ stm(db_w, sp, r0.bit() | r1.bit() | fp.bit() | lr.bit());
841 __ PrepareCallCFunction(1, 0, r2);
842 __ mov(r1, Operand(ExternalReference::isolate_address(masm->isolate())));
843 __ CallCFunction(ExternalReference::get_mark_code_as_executed_function(
844 masm->isolate()), 2);
845 __ ldm(ia_w, sp, r0.bit() | r1.bit() | fp.bit() | lr.bit());
846
847 // Perform prologue operations usually performed by the young code stub.
848 __ stm(db_w, sp, r1.bit() | cp.bit() | fp.bit() | lr.bit());
849 __ add(fp, sp, Operand(2 * kPointerSize));
850
851 // Jump to point after the code-age stub.
852 __ add(r0, r0, Operand(kNoCodeAgeSequenceLength * Assembler::kInstrSize));
853 __ mov(pc, r0);
854 }
855
856
857 void Builtins::Generate_MarkCodeAsExecutedTwice(MacroAssembler* masm) {
858 GenerateMakeCodeYoungAgainCommon(masm);
859 }
860
861
829 void Builtins::Generate_NotifyStubFailure(MacroAssembler* masm) { 862 void Builtins::Generate_NotifyStubFailure(MacroAssembler* masm) {
830 { 863 {
831 FrameScope scope(masm, StackFrame::INTERNAL); 864 FrameScope scope(masm, StackFrame::INTERNAL);
832 865
833 // Preserve registers across notification, this is important for compiled 866 // Preserve registers across notification, this is important for compiled
834 // stubs that tail call the runtime on deopts passing their parameters in 867 // stubs that tail call the runtime on deopts passing their parameters in
835 // registers. 868 // registers.
836 __ stm(db_w, sp, kJSCallerSaved | kCalleeSaved); 869 __ stm(db_w, sp, kJSCallerSaved | kCalleeSaved);
837 // Pass the function and deoptimization type to the runtime system. 870 // Pass the function and deoptimization type to the runtime system.
838 __ CallRuntime(Runtime::kNotifyStubFailure, 0); 871 __ CallRuntime(Runtime::kNotifyStubFailure, 0);
(...skipping 597 matching lines...) Expand 10 before | Expand all | Expand 10 after
1436 __ bind(&dont_adapt_arguments); 1469 __ bind(&dont_adapt_arguments);
1437 __ Jump(r3); 1470 __ Jump(r3);
1438 } 1471 }
1439 1472
1440 1473
1441 #undef __ 1474 #undef __
1442 1475
1443 } } // namespace v8::internal 1476 } } // namespace v8::internal
1444 1477
1445 #endif // V8_TARGET_ARCH_ARM 1478 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/assembler-arm-inl.h ('k') | src/arm/full-codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698