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

Unified Diff: runtime/vm/assembler_macros_ia32.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_ia32.cc
diff --git a/runtime/vm/assembler_macros_ia32.cc b/runtime/vm/assembler_macros_ia32.cc
index 6c4c134a01e3d3b3cfceb1947ad39aeabe630686..6e57e89aeabf3d50bd715325b97f7cc6f9f48c96 100644
--- a/runtime/vm/assembler_macros_ia32.cc
+++ b/runtime/vm/assembler_macros_ia32.cc
@@ -18,19 +18,9 @@ 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)
- Label ok;
- __ LoadObject(instance_reg, cls);
- __ cmpl(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();
@@ -44,9 +34,6 @@ void AssemblerMacros::TryAllocate(Assembler* assembler,
__ movl(Address::Absolute(heap->TopAddress()), instance_reg);
ASSERT(instance_size >= kHeapObjectTag);
__ subl(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);

Powered by Google App Engine
This is Rietveld 408576698