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

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
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)));
« no previous file with comments | « runtime/vm/object.h ('k') | runtime/vm/object_service.cc » ('j') | runtime/vm/stub_code_arm.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698