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

Unified Diff: runtime/vm/snapshot.cc

Issue 167683002: Simplify type argument instantiation cache lookup by introducing an array (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 10 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/snapshot.cc
===================================================================
--- runtime/vm/snapshot.cc (revision 32709)
+++ runtime/vm/snapshot.cc (working copy)
@@ -759,6 +759,9 @@
if (object_id == kEmptyArrayObject) {
return Object::empty_array().raw();
}
+ if (object_id == kZeroArrayObject) {
+ return Object::zero_array().raw();
+ }
if (object_id == kDynamicType) {
return Object::dynamic_type();
}
@@ -958,6 +961,12 @@
return;
}
+ // Check if it is a singleton zero array object.
+ if (rawobj == Object::zero_array().raw()) {
+ WriteVMIsolateObject(kZeroArrayObject);
+ return;
+ }
+
// Check if it is a singleton dyanmic Type object.
if (rawobj == Object::dynamic_type()) {
WriteVMIsolateObject(kDynamicType);

Powered by Google App Engine
This is Rietveld 408576698