Chromium Code Reviews| Index: runtime/vm/object.cc |
| diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc |
| index 2456ed6b1defb6ad7f97bc4650d3a575828b11ee..dafcd644cdb6cb877c506199b31fe177ad34e14a 100644 |
| --- a/runtime/vm/object.cc |
| +++ b/runtime/vm/object.cc |
| @@ -153,6 +153,7 @@ RawClass* Object::context_class_ = reinterpret_cast<RawClass*>(RAW_NULL); |
| RawClass* Object::context_scope_class_ = reinterpret_cast<RawClass*>(RAW_NULL); |
| RawClass* Object::singletargetcache_class_ = |
| reinterpret_cast<RawClass*>(RAW_NULL); |
| +RawClass* Object::unlinkedcall_class_ = reinterpret_cast<RawClass*>(RAW_NULL); |
| RawClass* Object::icdata_class_ = reinterpret_cast<RawClass*>(RAW_NULL); |
| RawClass* Object::megamorphic_cache_class_ = |
| reinterpret_cast<RawClass*>(RAW_NULL); |
| @@ -656,6 +657,9 @@ void Object::InitOnce(Isolate* isolate) { |
| cls = Class::New<SingleTargetCache>(); |
| singletargetcache_class_ = cls.raw(); |
| + cls = Class::New<UnlinkedCall>(); |
| + unlinkedcall_class_ = cls.raw(); |
| + |
| cls = Class::New<ICData>(); |
| icdata_class_ = cls.raw(); |
| @@ -998,6 +1002,7 @@ void Object::FinalizeVMIsolate(Isolate* isolate) { |
| SET_CLASS_NAME(context, Context); |
| SET_CLASS_NAME(context_scope, ContextScope); |
| SET_CLASS_NAME(singletargetcache, SingleTargetCache); |
| + SET_CLASS_NAME(unlinkedcall, UnlinkedCall); |
| SET_CLASS_NAME(icdata, ICData); |
| SET_CLASS_NAME(megamorphic_cache, MegamorphicCache); |
| SET_CLASS_NAME(subtypetestcache, SubtypeTestCache); |
| @@ -12600,6 +12605,35 @@ RawSingleTargetCache* SingleTargetCache::New() { |
| } |
| +void UnlinkedCall::set_target_name(const String& value) const { |
| + StorePointer(&raw_ptr()->target_name_, value.raw()); |
| +} |
| + |
| + |
| +void UnlinkedCall::set_args_descriptor(const Array& value) const { |
| + StorePointer(&raw_ptr()->args_descriptor_, value.raw()); |
| +} |
| + |
| + |
| +const char* UnlinkedCall::ToCString() const { |
| + return "UnlinkedCall"; |
| +} |
| + |
| + |
| +RawUnlinkedCall* UnlinkedCall::New() { |
|
Florian Schneider
2016/09/23 17:57:59
Since there is no initializing code, this could be
rmacnak
2016/09/26 17:32:53
Done.
|
| + UnlinkedCall& result = UnlinkedCall::Handle(); |
| + { |
| + // IC data objects are long living objects, allocate them in old generation. |
| + RawObject* raw = Object::Allocate(UnlinkedCall::kClassId, |
| + UnlinkedCall::InstanceSize(), |
| + Heap::kOld); |
| + NoSafepointScope no_safepoint; |
| + result ^= raw; |
| + } |
| + return result.raw(); |
| +} |
| + |
| + |
| void ICData::ResetSwitchable(Zone* zone) const { |
| ASSERT(NumArgsTested() == 1); |
| set_ic_data_array(Array::Handle(zone, CachedEmptyICDataArray(1))); |