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

Side by Side Diff: src/ppc/builtins-ppc.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 | « src/objects-printer.cc ('k') | src/x64/builtins-x64.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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_PPC 5 #if V8_TARGET_ARCH_PPC
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 401 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 // r7: JSObject (tagged) 412 // r7: JSObject (tagged)
413 // r8: First in-object property of JSObject (not tagged) 413 // r8: First in-object property of JSObject (not tagged)
414 __ LoadRoot(r9, Heap::kUndefinedValueRootIndex); 414 __ LoadRoot(r9, 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 MemOperand bit_field3 = FieldMemOperand(r5, Map::kBitField3Offset); 419 MemOperand bit_field3 = FieldMemOperand(r5, Map::kBitField3Offset);
420 // Check if slack tracking is enabled. 420 // Check if slack tracking is enabled.
421 __ lwz(r3, bit_field3); 421 __ lwz(r3, bit_field3);
422 __ DecodeField<Map::Counter>(r11, r3); 422 __ DecodeField<Map::ConstructionCounter>(r11, r3);
423 // r11: slack tracking counter 423 // r11: slack tracking counter
424 __ cmpi(r11, Operand(Map::kSlackTrackingCounterEnd)); 424 __ cmpi(r11, Operand(Map::kSlackTrackingCounterEnd));
425 __ blt(&no_inobject_slack_tracking); 425 __ blt(&no_inobject_slack_tracking);
426 // Decrease generous allocation count. 426 // Decrease generous allocation count.
427 __ Add(r3, r3, -(1 << Map::Counter::kShift), r0); 427 __ Add(r3, r3, -(1 << Map::ConstructionCounter::kShift), r0);
428 __ stw(r3, bit_field3); 428 __ stw(r3, bit_field3);
429 429
430 // Allocate object with a slack. 430 // Allocate object with a slack.
431 __ lbz(r3, FieldMemOperand(r5, Map::kUnusedPropertyFieldsOffset)); 431 __ lbz(r3, FieldMemOperand(r5, Map::kUnusedPropertyFieldsOffset));
432 __ ShiftLeftImm(r3, r3, Operand(kPointerSizeLog2)); 432 __ ShiftLeftImm(r3, r3, Operand(kPointerSizeLog2));
433 __ sub(r3, r10, r3); 433 __ sub(r3, r10, r3);
434 // r3: offset of first field after pre-allocated fields 434 // r3: offset of first field after pre-allocated fields
435 if (FLAG_debug_code) { 435 if (FLAG_debug_code) {
436 __ cmp(r8, r3); 436 __ cmp(r8, r3);
437 __ Assert(le, kUnexpectedNumberOfPreAllocatedPropertyFields); 437 __ Assert(le, kUnexpectedNumberOfPreAllocatedPropertyFields);
(...skipping 1527 matching lines...) Expand 10 before | Expand all | Expand 10 after
1965 __ bkpt(0); 1965 __ bkpt(0);
1966 } 1966 }
1967 } 1967 }
1968 1968
1969 1969
1970 #undef __ 1970 #undef __
1971 } // namespace internal 1971 } // namespace internal
1972 } // namespace v8 1972 } // namespace v8
1973 1973
1974 #endif // V8_TARGET_ARCH_PPC 1974 #endif // V8_TARGET_ARCH_PPC
OLDNEW
« no previous file with comments | « src/objects-printer.cc ('k') | src/x64/builtins-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698