| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef VM_OBJECT_H_ | 5 #ifndef VM_OBJECT_H_ |
| 6 #define VM_OBJECT_H_ | 6 #define VM_OBJECT_H_ |
| 7 | 7 |
| 8 #include "vm/assert.h" | 8 #include "vm/assert.h" |
| 9 #include "vm/dart.h" | 9 #include "vm/dart.h" |
| 10 #include "vm/globals.h" | 10 #include "vm/globals.h" |
| (...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 401 } | 401 } |
| 402 static intptr_t signature_function_offset() { | 402 static intptr_t signature_function_offset() { |
| 403 return OFFSET_OF(RawClass, signature_function_); | 403 return OFFSET_OF(RawClass, signature_function_); |
| 404 } | 404 } |
| 405 | 405 |
| 406 // Return the signature type of this signature class. | 406 // Return the signature type of this signature class. |
| 407 // For example, if this class represents a signature of the form | 407 // For example, if this class represents a signature of the form |
| 408 // '<T, R>(T, [b: B, c: C]) => R', then its signature type is a parameterized | 408 // '<T, R>(T, [b: B, c: C]) => R', then its signature type is a parameterized |
| 409 // type with this class as the type class and type parameters 'T' and 'R' | 409 // type with this class as the type class and type parameters 'T' and 'R' |
| 410 // as its type argument vector. | 410 // as its type argument vector. |
| 411 RawAbstractType* SignatureType() const; | 411 RawType* SignatureType() const; |
| 412 | 412 |
| 413 RawLibrary* library() const { return raw_ptr()->library_; } | 413 RawLibrary* library() const { return raw_ptr()->library_; } |
| 414 void set_library(const Library& value) const; | 414 void set_library(const Library& value) const; |
| 415 | 415 |
| 416 // The type parameters are specified as an array of Strings. | 416 // The type parameters are specified as an array of Strings. |
| 417 RawArray* type_parameters() const { return raw_ptr()->type_parameters_; } | 417 RawArray* type_parameters() const { return raw_ptr()->type_parameters_; } |
| 418 void set_type_parameters(const Array& value) const; | 418 void set_type_parameters(const Array& value) const; |
| 419 intptr_t NumTypeParameters() const; | 419 intptr_t NumTypeParameters() const; |
| 420 | 420 |
| 421 // Type parameters may optionally extend a Type (Dynamic if no extends). | 421 // Type parameters may optionally extend a Type (Dynamic if no extends). |
| (...skipping 16 matching lines...) Expand all Loading... |
| 438 static const intptr_t kNoTypeArguments = -1; | 438 static const intptr_t kNoTypeArguments = -1; |
| 439 intptr_t type_arguments_instance_field_offset() const { | 439 intptr_t type_arguments_instance_field_offset() const { |
| 440 ASSERT(is_finalized() || is_prefinalized()); | 440 ASSERT(is_finalized() || is_prefinalized()); |
| 441 return raw_ptr()->type_arguments_instance_field_offset_; | 441 return raw_ptr()->type_arguments_instance_field_offset_; |
| 442 } | 442 } |
| 443 void set_type_arguments_instance_field_offset(intptr_t value) const { | 443 void set_type_arguments_instance_field_offset(intptr_t value) const { |
| 444 raw_ptr()->type_arguments_instance_field_offset_ = value; | 444 raw_ptr()->type_arguments_instance_field_offset_ = value; |
| 445 } | 445 } |
| 446 | 446 |
| 447 // The super type of this class, Object type if not explicitly specified. | 447 // The super type of this class, Object type if not explicitly specified. |
| 448 RawAbstractType* super_type() const { return raw_ptr()->super_type_; } | 448 RawType* super_type() const { return raw_ptr()->super_type_; } |
| 449 void set_super_type(const AbstractType& value) const; | 449 void set_super_type(const Type& value) const; |
| 450 | 450 |
| 451 // Asserts that the class of the super type has been resolved. | 451 // Asserts that the class of the super type has been resolved. |
| 452 RawClass* SuperClass() const; | 452 RawClass* SuperClass() const; |
| 453 | 453 |
| 454 // Return true if this interface has a factory class. | 454 // Return true if this interface has a factory class. |
| 455 bool HasFactoryClass() const; | 455 bool HasFactoryClass() const; |
| 456 | 456 |
| 457 // Return true if the factory class of this interface is resolved. | 457 // Return true if the factory class of this interface is resolved. |
| 458 bool HasResolvedFactoryClass() const; | 458 bool HasResolvedFactoryClass() const; |
| 459 | 459 |
| 460 // Return the resolved factory class of this interface. | 460 // Return the resolved factory class of this interface. |
| 461 RawClass* FactoryClass() const; | 461 RawClass* FactoryClass() const; |
| 462 | 462 |
| 463 // Return the unresolved factory class of this interface. | 463 // Return the unresolved factory class of this interface. |
| 464 RawUnresolvedClass* UnresolvedFactoryClass() const; | 464 RawUnresolvedClass* UnresolvedFactoryClass() const; |
| 465 | 465 |
| 466 // Set the resolved or unresolved factory class of this interface. | 466 // Set the resolved or unresolved factory class of this interface. |
| 467 void set_factory_class(const Object& value) const; | 467 void set_factory_class(const Object& value) const; |
| 468 | 468 |
| 469 // Interfaces is an array of Types. | 469 // Interfaces is an array of Types. |
| 470 // TODO(srdjan): Return TypeArguments instead of Array? |
| 470 RawArray* interfaces() const { return raw_ptr()->interfaces_; } | 471 RawArray* interfaces() const { return raw_ptr()->interfaces_; } |
| 471 void set_interfaces(const Array& value) const; | 472 void set_interfaces(const Array& value) const; |
| 472 | 473 |
| 473 RawArray* functions_cache() const { return raw_ptr()->functions_cache_; } | 474 RawArray* functions_cache() const { return raw_ptr()->functions_cache_; } |
| 474 void set_functions_cache(const Array& value) const; | 475 void set_functions_cache(const Array& value) const; |
| 475 | 476 |
| 476 static intptr_t functions_cache_offset() { | 477 static intptr_t functions_cache_offset() { |
| 477 return OFFSET_OF(RawClass, functions_cache_); | 478 return OFFSET_OF(RawClass, functions_cache_); |
| 478 } | 479 } |
| 479 | 480 |
| (...skipping 2755 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3235 } | 3236 } |
| 3236 | 3237 |
| 3237 | 3238 |
| 3238 void Context::SetAt(intptr_t index, const Instance& value) const { | 3239 void Context::SetAt(intptr_t index, const Instance& value) const { |
| 3239 StorePointer(InstanceAddr(index), value.raw()); | 3240 StorePointer(InstanceAddr(index), value.raw()); |
| 3240 } | 3241 } |
| 3241 | 3242 |
| 3242 } // namespace dart | 3243 } // namespace dart |
| 3243 | 3244 |
| 3244 #endif // VM_OBJECT_H_ | 3245 #endif // VM_OBJECT_H_ |
| OLD | NEW |