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

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

Issue 23480031: Enable preaging of code objects when --optimize-for-size. (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: Add missing ia32 lithium codegen. 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
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 660 matching lines...) Expand 10 before | Expand all | Expand 10 after
671 __ subsd(result, double_scratch); 671 __ subsd(result, double_scratch);
672 __ addsd(result, Operand(kScratchRegister, 8 * kDoubleSize)); 672 __ addsd(result, Operand(kScratchRegister, 8 * kDoubleSize));
673 __ mulsd(result, input); 673 __ mulsd(result, input);
674 674
675 __ bind(&done); 675 __ bind(&done);
676 } 676 }
677 677
678 #undef __ 678 #undef __
679 679
680 680
681 static const int kNoCodeAgeSequenceLength = 6;
682
683 static byte* GetNoCodeAgeSequence(uint32_t* length) { 681 static byte* GetNoCodeAgeSequence(uint32_t* length) {
684 static bool initialized = false; 682 static bool initialized = false;
685 static byte sequence[kNoCodeAgeSequenceLength]; 683 static byte sequence[kNoCodeAgeSequenceLength];
686 *length = kNoCodeAgeSequenceLength; 684 *length = kNoCodeAgeSequenceLength;
687 if (!initialized) { 685 if (!initialized) {
688 // The sequence of instructions that is patched out for aging code is the 686 // The sequence of instructions that is patched out for aging code is the
689 // following boilerplate stack-building prologue that is found both in 687 // following boilerplate stack-building prologue that is found both in
690 // FUNCTION and OPTIMIZED_FUNCTION code: 688 // FUNCTION and OPTIMIZED_FUNCTION code:
691 CodePatcher patcher(sequence, kNoCodeAgeSequenceLength); 689 CodePatcher patcher(sequence, kNoCodeAgeSequenceLength);
692 patcher.masm()->push(rbp); 690 patcher.masm()->push(rbp);
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
763 // argument_count_reg_ * times_pointer_size + (receiver - 1) * kPointerSize. 761 // argument_count_reg_ * times_pointer_size + (receiver - 1) * kPointerSize.
764 return Operand(base_reg_, argument_count_reg_, times_pointer_size, 762 return Operand(base_reg_, argument_count_reg_, times_pointer_size,
765 displacement_to_last_argument + (receiver - 1 - index) * kPointerSize); 763 displacement_to_last_argument + (receiver - 1 - index) * kPointerSize);
766 } 764 }
767 } 765 }
768 766
769 767
770 } } // namespace v8::internal 768 } } // namespace v8::internal
771 769
772 #endif // V8_TARGET_ARCH_X64 770 #endif // V8_TARGET_ARCH_X64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698