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

Unified Diff: runtime/vm/assembler_macros_x64.cc

Issue 10521004: Eliminate RawObject::class_ field entirely. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
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);
« no previous file with comments | « runtime/vm/assembler_macros_x64.h ('k') | runtime/vm/freelist.h » ('j') | runtime/vm/freelist.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698