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

Side by Side Diff: runtime/vm/assembler_arm.cc

Issue 2953753002: Revert "Inline instance object hash code into object header on 64 bit." (Closed)
Patch Set: Created 3 years, 6 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 | « runtime/lib/object_patch.dart ('k') | runtime/vm/assembler_arm64.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 (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/globals.h" // NOLINT 5 #include "vm/globals.h" // NOLINT
6 #if defined(TARGET_ARCH_ARM) 6 #if defined(TARGET_ARCH_ARM)
7 7
8 #include "vm/assembler.h" 8 #include "vm/assembler.h"
9 #include "vm/cpu.h" 9 #include "vm/cpu.h"
10 #include "vm/longjump.h" 10 #include "vm/longjump.h"
(...skipping 3453 matching lines...) Expand 10 before | Expand all | Expand 10 after
3464 3464
3465 // Successfully allocated the object, now update top to point to 3465 // Successfully allocated the object, now update top to point to
3466 // next object start and store the class in the class field of object. 3466 // next object start and store the class in the class field of object.
3467 str(instance_reg, Address(temp_reg, Heap::TopOffset(space))); 3467 str(instance_reg, Address(temp_reg, Heap::TopOffset(space)));
3468 3468
3469 NOT_IN_PRODUCT(LoadAllocationStatsAddress(temp_reg, cls.id())); 3469 NOT_IN_PRODUCT(LoadAllocationStatsAddress(temp_reg, cls.id()));
3470 3470
3471 ASSERT(instance_size >= kHeapObjectTag); 3471 ASSERT(instance_size >= kHeapObjectTag);
3472 AddImmediate(instance_reg, -instance_size + kHeapObjectTag); 3472 AddImmediate(instance_reg, -instance_size + kHeapObjectTag);
3473 3473
3474 uint32_t tags = 0; 3474 uword tags = 0;
3475 tags = RawObject::SizeTag::update(instance_size, tags); 3475 tags = RawObject::SizeTag::update(instance_size, tags);
3476 ASSERT(cls.id() != kIllegalCid); 3476 ASSERT(cls.id() != kIllegalCid);
3477 tags = RawObject::ClassIdTag::update(cls.id(), tags); 3477 tags = RawObject::ClassIdTag::update(cls.id(), tags);
3478 LoadImmediate(IP, tags); 3478 LoadImmediate(IP, tags);
3479 str(IP, FieldAddress(instance_reg, Object::tags_offset())); 3479 str(IP, FieldAddress(instance_reg, Object::tags_offset()));
3480 3480
3481 NOT_IN_PRODUCT(IncrementAllocationStats(temp_reg, cls.id(), space)); 3481 NOT_IN_PRODUCT(IncrementAllocationStats(temp_reg, cls.id(), space));
3482 } else { 3482 } else {
3483 b(failure); 3483 b(failure);
3484 } 3484 }
(...skipping 28 matching lines...) Expand all
3513 3513
3514 NOT_IN_PRODUCT(LoadAllocationStatsAddress(temp2, cid)); 3514 NOT_IN_PRODUCT(LoadAllocationStatsAddress(temp2, cid));
3515 3515
3516 // Successfully allocated the object(s), now update top to point to 3516 // Successfully allocated the object(s), now update top to point to
3517 // next object start and initialize the object. 3517 // next object start and initialize the object.
3518 str(end_address, Address(temp1, Heap::TopOffset(space))); 3518 str(end_address, Address(temp1, Heap::TopOffset(space)));
3519 add(instance, instance, Operand(kHeapObjectTag)); 3519 add(instance, instance, Operand(kHeapObjectTag));
3520 3520
3521 // Initialize the tags. 3521 // Initialize the tags.
3522 // instance: new object start as a tagged pointer. 3522 // instance: new object start as a tagged pointer.
3523 uint32_t tags = 0; 3523 uword tags = 0;
3524 tags = RawObject::ClassIdTag::update(cid, tags); 3524 tags = RawObject::ClassIdTag::update(cid, tags);
3525 tags = RawObject::SizeTag::update(instance_size, tags); 3525 tags = RawObject::SizeTag::update(instance_size, tags);
3526 LoadImmediate(temp1, tags); 3526 LoadImmediate(temp1, tags);
3527 str(temp1, FieldAddress(instance, Array::tags_offset())); // Store tags. 3527 str(temp1, FieldAddress(instance, Array::tags_offset())); // Store tags.
3528 3528
3529 LoadImmediate(temp1, instance_size); 3529 LoadImmediate(temp1, instance_size);
3530 NOT_IN_PRODUCT(IncrementAllocationStatsWithSize(temp2, temp1, space)); 3530 NOT_IN_PRODUCT(IncrementAllocationStatsWithSize(temp2, temp1, space));
3531 } else { 3531 } else {
3532 b(failure); 3532 b(failure);
3533 } 3533 }
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
3728 3728
3729 3729
3730 const char* Assembler::FpuRegisterName(FpuRegister reg) { 3730 const char* Assembler::FpuRegisterName(FpuRegister reg) {
3731 ASSERT((0 <= reg) && (reg < kNumberOfFpuRegisters)); 3731 ASSERT((0 <= reg) && (reg < kNumberOfFpuRegisters));
3732 return fpu_reg_names[reg]; 3732 return fpu_reg_names[reg];
3733 } 3733 }
3734 3734
3735 } // namespace dart 3735 } // namespace dart
3736 3736
3737 #endif // defined TARGET_ARCH_ARM 3737 #endif // defined TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « runtime/lib/object_patch.dart ('k') | runtime/vm/assembler_arm64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698