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

Unified Diff: runtime/vm/object.h

Issue 8347008: Address review comments of previously submitted cl 8329005. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 9 years, 2 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/code_generator_ia32.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.h
===================================================================
--- runtime/vm/object.h (revision 522)
+++ runtime/vm/object.h (working copy)
@@ -426,6 +426,15 @@
void set_type_arguments_instance_field_offset(intptr_t value) const {
raw_ptr()->type_arguments_instance_field_offset_ = value;
}
+ bool HasTypeArguments() const {
+ if (is_finalized() || is_prefinalized()) {
+ // More efficient than calling NumTypeArguments().
+ return type_arguments_instance_field_offset() != kNoTypeArguments;
+ } else {
+ // No need to check NumTypeArguments() if class has type parameters.
+ return (NumTypeParameters() > 0) || (NumTypeArguments() > 0);
+ }
+ }
// The super type of this class, Object type if not explicitly specified.
RawType* super_type() const { return raw_ptr()->super_type_; }
« no previous file with comments | « runtime/vm/code_generator_ia32.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698