From e4809c8a9f514b2f1303a499d0e474102d309c94 Mon Sep 17 00:00:00 2001 From: "iposva@google.com" Date: Fri, 7 Oct 2011 08:44:46 +0000 Subject: [PATCH] - Revert r80: Too large an impact on running in debug mode. Review URL: https://chromereviews.googleplex.com/3558014 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@202 260f80e4-7a28-3924-810f-c04153c831b5 --- runtime/vm/object.h | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/runtime/vm/object.h b/runtime/vm/object.h index 01bc4069869..c050fc3551b 100644 --- a/runtime/vm/object.h +++ b/runtime/vm/object.h @@ -31,12 +31,10 @@ class LocalScope; public: /* NOLINT */ \ Raw##object* raw() const { return reinterpret_cast(raw_); } \ void operator=(Raw##object* value) { \ - NoGCScope no_gc; \ initializeHandle(this, value); \ } \ bool Is##object() const { return true; } \ void operator^=(RawObject* value) { \ - NoGCScope no_gc; \ initializeHandle(this, value); \ ASSERT(IsNull() || Is##object()); \ } \ @@ -44,13 +42,11 @@ class LocalScope; return Handle(object::null()); \ } \ static object& Handle(Raw##object* raw_ptr) { \ - NoGCScope no_gc; \ object* obj = reinterpret_cast(VMHandles::AllocateHandle()); \ initializeHandle(obj, raw_ptr); \ return *obj; \ } \ static object& CheckedHandle(RawObject* raw_ptr) { \ - NoGCScope no_gc; \ object* obj = reinterpret_cast(VMHandles::AllocateHandle()); \ initializeHandle(obj, raw_ptr); \ if (!obj->Is##object()) { \ @@ -62,13 +58,11 @@ class LocalScope; return ZoneHandle(object::null()); \ } \ static object& ZoneHandle(Raw##object* raw_ptr) { \ - NoGCScope no_gc; \ object* obj = reinterpret_cast(VMHandles::AllocateZoneHandle()); \ initializeHandle(obj, raw_ptr); \ return *obj; \ } \ static object& CheckedZoneHandle(RawObject* raw_ptr) { \ - NoGCScope no_gc; \ object* obj = reinterpret_cast(VMHandles::AllocateZoneHandle()); \ initializeHandle(obj, raw_ptr); \ if (!obj->Is##object()) { \ @@ -86,7 +80,6 @@ class LocalScope; private: /* NOLINT */ \ /* Initialize the handle based on the raw_ptr in the presence of null. */ \ static void initializeHandle(object* obj, RawObject* raw_ptr) { \ - NoGCScope no_gc; \ if (raw_ptr != Object::null()) { \ obj->SetRaw(raw_ptr); \ } else { \ @@ -150,10 +143,7 @@ class Object { virtual ~Object() { } RawObject* raw() const { return raw_; } - void operator=(RawObject* value) { - NoGCScope no_gc; - SetRaw(value); - } + void operator=(RawObject* value) { SetRaw(value); } inline RawClass* clazz() const; static intptr_t class_offset() { return OFFSET_OF(RawObject, class_); } @@ -189,7 +179,6 @@ CLASS_LIST_NO_OBJECT(DEFINE_CLASS_TESTER); } static Object& Handle(RawObject* raw_ptr) { - NoGCScope no_gc; Object* obj = reinterpret_cast(VMHandles::AllocateHandle()); obj->SetRaw(raw_ptr); return *obj; @@ -200,7 +189,6 @@ CLASS_LIST_NO_OBJECT(DEFINE_CLASS_TESTER); } static Object& ZoneHandle(RawObject* raw_ptr) { - NoGCScope no_gc; Object* obj = reinterpret_cast(VMHandles::AllocateZoneHandle()); obj->SetRaw(raw_ptr); return *obj; @@ -2728,7 +2716,6 @@ RawClass* Object::clazz() const { void Object::SetRaw(RawObject* value) { - NoGCScope no_gc; raw_ = value; uword raw_value = reinterpret_cast(value); if ((raw_value & kSmiTagMask) == kSmiTag) {