- 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
This commit is contained in:
iposva@google.com
2011-10-07 08:44:46 +00:00
parent c2b5e488da
commit e4809c8a9f
+1 -14
View File
@@ -31,12 +31,10 @@ class LocalScope;
public: /* NOLINT */ \
Raw##object* raw() const { return reinterpret_cast<Raw##object*>(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<object*>(VMHandles::AllocateHandle()); \
initializeHandle(obj, raw_ptr); \
return *obj; \
} \
static object& CheckedHandle(RawObject* raw_ptr) { \
NoGCScope no_gc; \
object* obj = reinterpret_cast<object*>(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<object*>(VMHandles::AllocateZoneHandle()); \
initializeHandle(obj, raw_ptr); \
return *obj; \
} \
static object& CheckedZoneHandle(RawObject* raw_ptr) { \
NoGCScope no_gc; \
object* obj = reinterpret_cast<object*>(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<Object*>(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<Object*>(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<uword>(value);
if ((raw_value & kSmiTagMask) == kSmiTag) {