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

Side by Side Diff: src/full-codegen/mips64/full-codegen-mips64.cc

Issue 1391373004: Bailout for large object allocations in full code EmitFastOneByteArrayJoin. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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
« no previous file with comments | « src/full-codegen/mips/full-codegen-mips.cc ('k') | src/full-codegen/ppc/full-codegen-ppc.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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #if V8_TARGET_ARCH_MIPS64 5 #if V8_TARGET_ARCH_MIPS64
6 6
7 // Note on Mips implementation: 7 // Note on Mips implementation:
8 // 8 //
9 // The result_register() for mips is the 'v0' register, which is defined 9 // The result_register() for mips is the 'v0' register, which is defined
10 // by the ABI to contain function return values. However, the first 10 // by the ABI to contain function return values. However, the first
(...skipping 4261 matching lines...) Expand 10 before | Expand all | Expand 10 after
4272 __ SmiUntag(scratch1); 4272 __ SmiUntag(scratch1);
4273 __ Dmul(scratch2, array_length, scratch1); 4273 __ Dmul(scratch2, array_length, scratch1);
4274 // Check for smi overflow. No overflow if higher 33 bits of 64-bit result are 4274 // Check for smi overflow. No overflow if higher 33 bits of 64-bit result are
4275 // zero. 4275 // zero.
4276 __ dsra32(scratch1, scratch2, 0); 4276 __ dsra32(scratch1, scratch2, 0);
4277 __ Branch(&bailout, ne, scratch2, Operand(zero_reg)); 4277 __ Branch(&bailout, ne, scratch2, Operand(zero_reg));
4278 __ SmiUntag(string_length); 4278 __ SmiUntag(string_length);
4279 __ AdduAndCheckForOverflow(string_length, string_length, scratch2, scratch3); 4279 __ AdduAndCheckForOverflow(string_length, string_length, scratch2, scratch3);
4280 __ BranchOnOverflow(&bailout, scratch3); 4280 __ BranchOnOverflow(&bailout, scratch3);
4281 4281
4282 // Bailout for large object allocations.
4283 __ Branch(&bailout, gt, string_length,
4284 Operand(Page::kMaxRegularHeapObjectSize));
4285
4282 // Get first element in the array to free up the elements register to be used 4286 // Get first element in the array to free up the elements register to be used
4283 // for the result. 4287 // for the result.
4284 __ Daddu(element, 4288 __ Daddu(element,
4285 elements, Operand(FixedArray::kHeaderSize - kHeapObjectTag)); 4289 elements, Operand(FixedArray::kHeaderSize - kHeapObjectTag));
4286 result = elements; // End of live range for elements. 4290 result = elements; // End of live range for elements.
4287 elements = no_reg; 4291 elements = no_reg;
4288 // Live values in registers: 4292 // Live values in registers:
4289 // element: First array element 4293 // element: First array element
4290 // separator: Separator string 4294 // separator: Separator string
4291 // string_length: Length of result string (not smi) 4295 // string_length: Length of result string (not smi)
(...skipping 970 matching lines...) Expand 10 before | Expand all | Expand 10 after
5262 reinterpret_cast<uint64_t>( 5266 reinterpret_cast<uint64_t>(
5263 isolate->builtins()->OsrAfterStackCheck()->entry())); 5267 isolate->builtins()->OsrAfterStackCheck()->entry()));
5264 return OSR_AFTER_STACK_CHECK; 5268 return OSR_AFTER_STACK_CHECK;
5265 } 5269 }
5266 5270
5267 5271
5268 } // namespace internal 5272 } // namespace internal
5269 } // namespace v8 5273 } // namespace v8
5270 5274
5271 #endif // V8_TARGET_ARCH_MIPS64 5275 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/full-codegen/mips/full-codegen-mips.cc ('k') | src/full-codegen/ppc/full-codegen-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698