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

Unified Diff: runtime/vm/object.cc

Issue 136753012: Refactor unboxed fields in preparation of reusable SIMD boxes (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 11 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') | no next file » | 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 705432359fd6c69e77ac47798387c0acb18ed3d5..1962e0ba7390ac1457d89ac36d1e409a15e34bc1 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -6293,6 +6293,19 @@ void Field::set_guarded_list_length(intptr_t list_length) const {
}
+bool Field::IsUnboxedField() const {
+ // TODO(johnmccutchan): Add kFloat32x4Cid here.
+ return is_unboxing_candidate() && !is_final() && !is_nullable() &&
+ ((guarded_cid() == kDoubleCid));
+}
+
+
+bool Field::IsPotentialUnboxedField() const {
+ return is_unboxing_candidate() &&
+ (IsUnboxedField() || (!is_final() && (guarded_cid() == kIllegalCid)));
+}
+
+
const char* Field::ToCString() const {
if (IsNull()) {
return "Field::null";
« no previous file with comments | « runtime/vm/object.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698