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/full-codegen/ia32/full-codegen-ia32.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
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_IA32 5 #if V8_TARGET_ARCH_IA32
6 6
7 #include "src/code-factory.h" 7 #include "src/code-factory.h"
8 #include "src/code-stubs.h" 8 #include "src/code-stubs.h"
9 #include "src/codegen.h" 9 #include "src/codegen.h"
10 #include "src/debug/debug.h" 10 #include "src/debug/debug.h"
(...skipping 4142 matching lines...) Expand 10 before | Expand all | Expand 10 after
4153 // to string_length. 4153 // to string_length.
4154 __ mov(scratch, separator_operand); 4154 __ mov(scratch, separator_operand);
4155 __ mov(scratch, FieldOperand(scratch, SeqOneByteString::kLengthOffset)); 4155 __ mov(scratch, FieldOperand(scratch, SeqOneByteString::kLengthOffset));
4156 __ sub(string_length, scratch); // May be negative, temporarily. 4156 __ sub(string_length, scratch); // May be negative, temporarily.
4157 __ imul(scratch, array_length_operand); 4157 __ imul(scratch, array_length_operand);
4158 __ j(overflow, &bailout); 4158 __ j(overflow, &bailout);
4159 __ add(string_length, scratch); 4159 __ add(string_length, scratch);
4160 __ j(overflow, &bailout); 4160 __ j(overflow, &bailout);
4161 4161
4162 __ shr(string_length, 1); 4162 __ shr(string_length, 1);
4163
4164 // Bailout for large object allocations.
4165 __ cmp(string_length, Page::kMaxRegularHeapObjectSize);
4166 __ j(greater, &bailout);
4167
4163 // Live registers and stack values: 4168 // Live registers and stack values:
4164 // string_length 4169 // string_length
4165 // elements 4170 // elements
4166 __ AllocateOneByteString(result_pos, string_length, scratch, index, string, 4171 __ AllocateOneByteString(result_pos, string_length, scratch, index, string,
4167 &bailout); 4172 &bailout);
4168 __ mov(result_operand, result_pos); 4173 __ mov(result_operand, result_pos);
4169 __ lea(result_pos, FieldOperand(result_pos, SeqOneByteString::kHeaderSize)); 4174 __ lea(result_pos, FieldOperand(result_pos, SeqOneByteString::kHeaderSize));
4170 4175
4171 4176
4172 __ mov(string, separator_operand); 4177 __ mov(string, separator_operand);
(...skipping 984 matching lines...) Expand 10 before | Expand all | Expand 10 after
5157 Assembler::target_address_at(call_target_address, 5162 Assembler::target_address_at(call_target_address,
5158 unoptimized_code)); 5163 unoptimized_code));
5159 return OSR_AFTER_STACK_CHECK; 5164 return OSR_AFTER_STACK_CHECK;
5160 } 5165 }
5161 5166
5162 5167
5163 } // namespace internal 5168 } // namespace internal
5164 } // namespace v8 5169 } // namespace v8
5165 5170
5166 #endif // V8_TARGET_ARCH_IA32 5171 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/full-codegen/arm64/full-codegen-arm64.cc ('k') | src/full-codegen/mips/full-codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698