Index: runtime/vm/assembler_macros_x64.cc |
diff --git a/runtime/vm/assembler_macros_x64.cc b/runtime/vm/assembler_macros_x64.cc |
index 3327c6d626f12797443ab3367cebf20748207405..b36e568e6d1c1629ddf3947999b5e3a64cbb7aa8 100644 |
--- a/runtime/vm/assembler_macros_x64.cc |
+++ b/runtime/vm/assembler_macros_x64.cc |
@@ -18,20 +18,12 @@ DECLARE_FLAG(bool, inline_alloc); |
// Static. |
void AssemblerMacros::TryAllocate(Assembler* assembler, |
const Class& cls, |
- Register class_reg, |
Label* failure, |
Register instance_reg) { |
#if defined(DEBUG) |
__ Untested("AssemblerMacros::TryAllocate"); |
- Label ok; |
- __ LoadObject(instance_reg, cls); |
- __ cmpq(instance_reg, class_reg); |
- __ j(EQUAL, &ok, Assembler::kNearJump); |
- __ Stop("AssemblerMacros::TryAllocate, wrong arguments"); |
- __ Bind(&ok); |
#endif |
ASSERT(failure != NULL); |
- ASSERT(class_reg != instance_reg); |
if (FLAG_inline_alloc) { |
Heap* heap = Isolate::Current()->heap(); |
const intptr_t instance_size = cls.instance_size(); |
@@ -48,9 +40,6 @@ void AssemblerMacros::TryAllocate(Assembler* assembler, |
__ movq(Address(TMP, 0), instance_reg); |
ASSERT(instance_size >= kHeapObjectTag); |
__ subq(instance_reg, Immediate(instance_size - kHeapObjectTag)); |
- __ StoreIntoObject(instance_reg, |
- FieldAddress(instance_reg, Instance::class_offset()), |
- class_reg); |
uword tags = 0; |
tags = RawObject::SizeTag::update(instance_size, tags); |
ASSERT(cls.id() != kIllegalObjectKind); |