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

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

Issue 1506683004: Free one bit in Map by removing unused retaining counter. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years 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 | « no previous file | src/arm64/builtins-arm64.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_ARM 5 #if V8_TARGET_ARCH_ARM
6 6
7 #include "src/codegen.h" 7 #include "src/codegen.h"
8 #include "src/debug/debug.h" 8 #include "src/debug/debug.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 402 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 // r5: First in-object property of JSObject (not tagged) 413 // r5: First in-object property of JSObject (not tagged)
414 __ LoadRoot(r6, Heap::kUndefinedValueRootIndex); 414 __ LoadRoot(r6, Heap::kUndefinedValueRootIndex);
415 415
416 if (!is_api_function) { 416 if (!is_api_function) {
417 Label no_inobject_slack_tracking; 417 Label no_inobject_slack_tracking;
418 418
419 // Check if slack tracking is enabled. 419 // Check if slack tracking is enabled.
420 MemOperand bit_field3 = FieldMemOperand(r2, Map::kBitField3Offset); 420 MemOperand bit_field3 = FieldMemOperand(r2, Map::kBitField3Offset);
421 // Check if slack tracking is enabled. 421 // Check if slack tracking is enabled.
422 __ ldr(r0, bit_field3); 422 __ ldr(r0, bit_field3);
423 __ DecodeField<Map::Counter>(ip, r0); 423 __ DecodeField<Map::ConstructionCounter>(ip, r0);
424 // ip: slack tracking counter 424 // ip: slack tracking counter
425 __ cmp(ip, Operand(Map::kSlackTrackingCounterEnd)); 425 __ cmp(ip, Operand(Map::kSlackTrackingCounterEnd));
426 __ b(lt, &no_inobject_slack_tracking); 426 __ b(lt, &no_inobject_slack_tracking);
427 __ push(ip); // Save allocation count value. 427 __ push(ip); // Save allocation count value.
428 // Decrease generous allocation count. 428 // Decrease generous allocation count.
429 __ sub(r0, r0, Operand(1 << Map::Counter::kShift)); 429 __ sub(r0, r0, Operand(1 << Map::ConstructionCounter::kShift));
430 __ str(r0, bit_field3); 430 __ str(r0, bit_field3);
431 431
432 // Allocate object with a slack. 432 // Allocate object with a slack.
433 __ ldr(r0, FieldMemOperand(r2, Map::kInstanceAttributesOffset)); 433 __ ldr(r0, FieldMemOperand(r2, Map::kInstanceAttributesOffset));
434 __ Ubfx(r0, r0, Map::kUnusedPropertyFieldsByte * kBitsPerByte, 434 __ Ubfx(r0, r0, Map::kUnusedPropertyFieldsByte * kBitsPerByte,
435 kBitsPerByte); 435 kBitsPerByte);
436 __ sub(r0, r9, Operand(r0, LSL, kPointerSizeLog2)); 436 __ sub(r0, r9, Operand(r0, LSL, kPointerSizeLog2));
437 // r0: offset of first field after pre-allocated fields 437 // r0: offset of first field after pre-allocated fields
438 if (FLAG_debug_code) { 438 if (FLAG_debug_code) {
439 __ cmp(r5, r0); 439 __ cmp(r5, r0);
(...skipping 1497 matching lines...) Expand 10 before | Expand all | Expand 10 after
1937 } 1937 }
1938 } 1938 }
1939 1939
1940 1940
1941 #undef __ 1941 #undef __
1942 1942
1943 } // namespace internal 1943 } // namespace internal
1944 } // namespace v8 1944 } // namespace v8
1945 1945
1946 #endif // V8_TARGET_ARCH_ARM 1946 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/arm64/builtins-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698