Index: runtime/vm/object.h |
=================================================================== |
--- runtime/vm/object.h (revision 24200) |
+++ runtime/vm/object.h (working copy) |
@@ -169,6 +169,7 @@ |
return raw()->ptr(); \ |
} \ |
SNAPSHOT_READER_SUPPORT(object) \ |
+ friend class Isolate; \ |
friend class StackFrame; \ |
// This macro is used to denote types that do not have a sub-type. |
@@ -190,6 +191,7 @@ |
return raw()->ptr(); \ |
} \ |
SNAPSHOT_READER_SUPPORT(object) \ |
+ friend class Isolate; \ |
friend class StackFrame; \ |
class Object { |
@@ -591,6 +593,7 @@ |
friend class TwoByteString; |
friend class ExternalOneByteString; |
friend class ExternalTwoByteString; |
+ friend class Isolate; |
DISALLOW_ALLOCATION(); |
DISALLOW_COPY_AND_ASSIGN(Object); |
@@ -2354,7 +2357,6 @@ |
friend class Class; |
friend class Debugger; |
friend class DictionaryIterator; |
- friend class Isolate; |
friend class Namespace; |
friend class Object; |
}; |
@@ -2390,7 +2392,6 @@ |
FINAL_HEAP_OBJECT_IMPLEMENTATION(LibraryPrefix, Object); |
friend class Class; |
- friend class Isolate; |
}; |
@@ -5812,20 +5813,22 @@ |
} |
-void Object::SetRaw(RawObject* value) { |
+inline void Object::SetRaw(RawObject* value) { |
Ivan Posva
2013/06/22 01:01:36
DART_FORCE_INLINE would be a good alternative here
siva
2013/07/18 20:39:23
Done.
|
// NOTE: The assignment "raw_ = value" should be the first statement in |
// this function. Also do not use 'value' in this function after the |
// assignment (use 'raw_' instead). |
raw_ = value; |
- if ((reinterpret_cast<uword>(raw_) & kSmiTagMask) == kSmiTag) { |
- set_vtable(Smi::handle_vtable_); |
- return; |
- } |
- intptr_t cid = raw_->GetClassId(); |
- if (cid >= kNumPredefinedCids) { |
+ cpp_vtable vtable_ptr; |
+ if ((reinterpret_cast<uword>(value) & kSmiTagMask) == kSmiTag) { |
+ vtable_ptr = Smi::handle_vtable_; |
Ivan Posva
2013/06/22 01:01:36
--verify_handles will fail below when being passed
siva
2013/07/18 20:39:23
Reverted this change as DART_FORCE_INLINE should m
|
+ } else { |
+ intptr_t cid = value->GetClassId(); |
+ if (cid >= kNumPredefinedCids) { |
cid = kInstanceCid; |
+ } |
+ vtable_ptr = builtin_vtables_[cid]; |
} |
- set_vtable(builtin_vtables_[cid]); |
+ set_vtable(vtable_ptr); |
#if defined(DEBUG) |
if (FLAG_verify_handles) { |
Isolate* isolate = Isolate::Current(); |