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

Side by Side Diff: src/ia32/codegen-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/builtins-ia32.cc ('k') | src/ia32/full-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 1099 matching lines...) Expand 10 before | Expand all | Expand 10 after
1110 __ pshufd(input, input, static_cast<uint8_t>(0xe1)); // Order: 11 10 00 01 1110 __ pshufd(input, input, static_cast<uint8_t>(0xe1)); // Order: 11 10 00 01
1111 __ movsd(double_scratch, Operand::StaticArray( 1111 __ movsd(double_scratch, Operand::StaticArray(
1112 temp2, times_8, ExternalReference::math_exp_log_table())); 1112 temp2, times_8, ExternalReference::math_exp_log_table()));
1113 __ por(input, double_scratch); 1113 __ por(input, double_scratch);
1114 __ mulsd(result, input); 1114 __ mulsd(result, input);
1115 __ bind(&done); 1115 __ bind(&done);
1116 } 1116 }
1117 1117
1118 #undef __ 1118 #undef __
1119 1119
1120 static const int kNoCodeAgeSequenceLength = 5;
1121 1120
1122 static byte* GetNoCodeAgeSequence(uint32_t* length) { 1121 static byte* GetNoCodeAgeSequence(uint32_t* length) {
1123 static bool initialized = false; 1122 static bool initialized = false;
1124 static byte sequence[kNoCodeAgeSequenceLength]; 1123 static byte sequence[kNoCodeAgeSequenceLength];
1125 *length = kNoCodeAgeSequenceLength; 1124 *length = kNoCodeAgeSequenceLength;
1126 if (!initialized) { 1125 if (!initialized) {
1127 // The sequence of instructions that is patched out for aging code is the 1126 // The sequence of instructions that is patched out for aging code is the
1128 // following boilerplate stack-building prologue that is found both in 1127 // following boilerplate stack-building prologue that is found both in
1129 // FUNCTION and OPTIMIZED_FUNCTION code: 1128 // FUNCTION and OPTIMIZED_FUNCTION code:
1130 CodePatcher patcher(sequence, kNoCodeAgeSequenceLength); 1129 CodePatcher patcher(sequence, kNoCodeAgeSequenceLength);
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
1175 Code* stub = GetCodeAgeStub(isolate, age, parity); 1174 Code* stub = GetCodeAgeStub(isolate, age, parity);
1176 CodePatcher patcher(sequence, young_length); 1175 CodePatcher patcher(sequence, young_length);
1177 patcher.masm()->call(stub->instruction_start(), RelocInfo::NONE32); 1176 patcher.masm()->call(stub->instruction_start(), RelocInfo::NONE32);
1178 } 1177 }
1179 } 1178 }
1180 1179
1181 1180
1182 } } // namespace v8::internal 1181 } } // namespace v8::internal
1183 1182
1184 #endif // V8_TARGET_ARCH_IA32 1183 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/builtins-ia32.cc ('k') | src/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698