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

Unified Diff: runtime/vm/object.cc

Issue 2357313003: AOT: Add a separate switchable call state for unlinked calls. (Closed)
Patch Set: . Created 4 years, 3 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
« no previous file with comments | « runtime/vm/object.h ('k') | runtime/vm/object_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.cc
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index dc8ceee5b3050eb6b6e5b8569126b4192df8f4e8..a368c52bdb2f1d0cc1725961cad6cc3099b3d3b2 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);
@@ -12648,6 +12653,29 @@ 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() {
+ RawObject* raw = Object::Allocate(UnlinkedCall::kClassId,
+ UnlinkedCall::InstanceSize(),
+ Heap::kOld);
+ return reinterpret_cast<RawUnlinkedCall*>(raw);
+}
+
+
void ICData::ResetSwitchable(Zone* zone) const {
ASSERT(NumArgsTested() == 1);
set_ic_data_array(Array::Handle(zone, CachedEmptyICDataArray(1)));
« no previous file with comments | « runtime/vm/object.h ('k') | runtime/vm/object_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698