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

Side by Side Diff: src/ia32/builtins-ia32.cc

Issue 1459083003: Fix object initialization when slack tracking for it's map is still enabled. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@toon
Patch Set: Fixed second nit in all platforms Created 5 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
« no previous file with comments | « src/crankshaft/arm64/lithium-codegen-arm64.cc ('k') | src/ia32/macro-assembler-ia32.h » ('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_IA32 5 #if V8_TARGET_ARCH_IA32
6 6
7 #include "src/code-factory.h" 7 #include "src/code-factory.h"
8 #include "src/codegen.h" 8 #include "src/codegen.h"
9 #include "src/deoptimizer.h" 9 #include "src/deoptimizer.h"
10 #include "src/full-codegen/full-codegen.h" 10 #include "src/full-codegen/full-codegen.h"
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 __ mov(edx, factory->undefined_value()); 234 __ mov(edx, factory->undefined_value());
235 __ lea(ecx, Operand(ebx, JSObject::kHeaderSize)); 235 __ lea(ecx, Operand(ebx, JSObject::kHeaderSize));
236 if (!is_api_function) { 236 if (!is_api_function) {
237 Label no_inobject_slack_tracking; 237 Label no_inobject_slack_tracking;
238 238
239 // Check if slack tracking is enabled. 239 // Check if slack tracking is enabled.
240 __ cmp(esi, Map::kSlackTrackingCounterEnd); 240 __ cmp(esi, Map::kSlackTrackingCounterEnd);
241 __ j(less, &no_inobject_slack_tracking); 241 __ j(less, &no_inobject_slack_tracking);
242 242
243 // Allocate object with a slack. 243 // Allocate object with a slack.
244 __ movzx_b( 244 __ movzx_b(esi, FieldOperand(eax, Map::kUnusedPropertyFieldsOffset));
245 esi, 245 __ neg(esi);
246 FieldOperand( 246 __ lea(esi, Operand(edi, esi, times_pointer_size, 0));
247 eax,
248 Map::kInObjectPropertiesOrConstructorFunctionIndexOffset));
249 __ movzx_b(eax, FieldOperand(eax, Map::kUnusedPropertyFieldsOffset));
250 __ sub(esi, eax);
251 __ lea(esi,
252 Operand(ebx, esi, times_pointer_size, JSObject::kHeaderSize));
253 // esi: offset of first field after pre-allocated fields 247 // esi: offset of first field after pre-allocated fields
254 if (FLAG_debug_code) { 248 if (FLAG_debug_code) {
255 __ cmp(esi, edi); 249 __ cmp(ecx, esi);
256 __ Assert(less_equal, 250 __ Assert(less_equal,
257 kUnexpectedNumberOfPreAllocatedPropertyFields); 251 kUnexpectedNumberOfPreAllocatedPropertyFields);
258 } 252 }
259 __ InitializeFieldsWithFiller(ecx, esi, edx); 253 __ InitializeFieldsWithFiller(ecx, esi, edx);
260 __ mov(edx, factory->one_pointer_filler_map()); 254 __ mov(edx, factory->one_pointer_filler_map());
261 // Fill the remaining fields with one pointer filler map. 255 // Fill the remaining fields with one pointer filler map.
262 256
263 __ bind(&no_inobject_slack_tracking); 257 __ bind(&no_inobject_slack_tracking);
264 } 258 }
265 259
(...skipping 1590 matching lines...) Expand 10 before | Expand all | Expand 10 after
1856 1850
1857 __ bind(&ok); 1851 __ bind(&ok);
1858 __ ret(0); 1852 __ ret(0);
1859 } 1853 }
1860 1854
1861 #undef __ 1855 #undef __
1862 } // namespace internal 1856 } // namespace internal
1863 } // namespace v8 1857 } // namespace v8
1864 1858
1865 #endif // V8_TARGET_ARCH_IA32 1859 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/crankshaft/arm64/lithium-codegen-arm64.cc ('k') | src/ia32/macro-assembler-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698