Chromium Code Reviews| Index: runtime/vm/object.h |
| =================================================================== |
| --- runtime/vm/object.h (revision 1473) |
| +++ runtime/vm/object.h (working copy) |
| @@ -245,6 +245,14 @@ |
| static RawClass* GetSingletonClass(int index); |
| static const char* GetSingletonClassName(int index); |
| + static RawClass* CreateAndRegisterCoreInterface(const char* cname, |
| + const Script& script, |
| + const Library& core_lib); |
| + static void RegisterCoreImplClass(const Class& cls, |
| + const char* cname, |
| + const Script& impl_script, |
| + const Library& core_impl_lib); |
| + |
| static void Init(Isolate* isolate); |
| static void InitFromSnapshot(Isolate* isolate); |
| static void InitOnce(); |
| @@ -410,7 +418,8 @@ |
| void set_type_parameters(const Array& value) const; |
| intptr_t NumTypeParameters() const; |
| - // Type parameters may optionally extend a Type (DynamicType if no extends). |
| + // Type parameters may optionally extend a Type (Dynamic if no extends). |
| + // TODO(regis): Should it be Object instead of Dynamic? |
| RawTypeArray* type_parameter_extends() const { |
| return raw_ptr()->type_parameter_extends_; |
| } |
| @@ -420,8 +429,12 @@ |
| // Return null otherwise. |
| RawTypeParameter* LookupTypeParameter(const String& type_name) const; |
| + // The type argument vector is flatten and includes the type arguments of |
|
srdjan
2011/11/11 21:32:04
flattened
regis
2011/11/11 21:37:38
Done.
|
| + // the super class. |
| + bool HasTypeArguments() const; |
| + intptr_t NumTypeArguments() const; |
| + |
| // If this class is parameterized, each instance has a type_arguments field. |
| - intptr_t NumTypeArguments() const; |
| static const intptr_t kNoTypeArguments = -1; |
| intptr_t type_arguments_instance_field_offset() const { |
| ASSERT(is_finalized() || is_prefinalized()); |
| @@ -430,15 +443,6 @@ |
| 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_; } |