| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 "include/dart_api.h" | 8 #include "include/dart_api.h" |
| 9 #include "platform/assert.h" | 9 #include "platform/assert.h" |
| 10 #include "platform/utils.h" | 10 #include "platform/utils.h" |
| (...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 482 | 482 |
| 483 RawLibrary* library() const { return raw_ptr()->library_; } | 483 RawLibrary* library() const { return raw_ptr()->library_; } |
| 484 void set_library(const Library& value) const; | 484 void set_library(const Library& value) const; |
| 485 | 485 |
| 486 // The type parameters are specified as an array of TypeParameter. | 486 // The type parameters are specified as an array of TypeParameter. |
| 487 RawTypeArguments* type_parameters() const { | 487 RawTypeArguments* type_parameters() const { |
| 488 return raw_ptr()->type_parameters_; | 488 return raw_ptr()->type_parameters_; |
| 489 } | 489 } |
| 490 void set_type_parameters(const TypeArguments& value) const; | 490 void set_type_parameters(const TypeArguments& value) const; |
| 491 intptr_t NumTypeParameters() const; | 491 intptr_t NumTypeParameters() const; |
| 492 static intptr_t type_parameters_offset() { |
| 493 return OFFSET_OF(RawClass, type_parameters_); |
| 494 } |
| 492 | 495 |
| 493 // Type parameter bounds (implicitly Dynamic if not explicitly specified) as | 496 // Type parameter bounds (implicitly Dynamic if not explicitly specified) as |
| 494 // an array of AbstractType. | 497 // an array of AbstractType. |
| 495 RawTypeArguments* type_parameter_bounds() const { | 498 RawTypeArguments* type_parameter_bounds() const { |
| 496 return raw_ptr()->type_parameter_bounds_; | 499 return raw_ptr()->type_parameter_bounds_; |
| 497 } | 500 } |
| 498 void set_type_parameter_bounds(const TypeArguments& value) const; | 501 void set_type_parameter_bounds(const TypeArguments& value) const; |
| 499 | 502 |
| 500 // Return a TypeParameter if the type_name is a type parameter of this class. | 503 // Return a TypeParameter if the type_name is a type parameter of this class. |
| 501 // Return null otherwise. | 504 // Return null otherwise. |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 612 void InsertCanonicalConstant(intptr_t index, const Instance& constant) const; | 615 void InsertCanonicalConstant(intptr_t index, const Instance& constant) const; |
| 613 | 616 |
| 614 static intptr_t InstanceSize() { | 617 static intptr_t InstanceSize() { |
| 615 return RoundedAllocationSize(sizeof(RawClass)); | 618 return RoundedAllocationSize(sizeof(RawClass)); |
| 616 } | 619 } |
| 617 | 620 |
| 618 bool is_interface() const { | 621 bool is_interface() const { |
| 619 return raw_ptr()->is_interface_; | 622 return raw_ptr()->is_interface_; |
| 620 } | 623 } |
| 621 void set_is_interface() const; | 624 void set_is_interface() const; |
| 625 static intptr_t is_interface_offset() { |
| 626 return OFFSET_OF(RawClass, is_interface_); |
| 627 } |
| 622 | 628 |
| 623 bool is_finalized() const { | 629 bool is_finalized() const { |
| 624 return raw_ptr()->class_state_ == RawClass::kFinalized; | 630 return raw_ptr()->class_state_ == RawClass::kFinalized; |
| 625 } | 631 } |
| 626 void set_is_finalized() const; | 632 void set_is_finalized() const; |
| 627 | 633 |
| 628 bool is_prefinalized() const { | 634 bool is_prefinalized() const { |
| 629 return raw_ptr()->class_state_ == RawClass::kPreFinalized; | 635 return raw_ptr()->class_state_ == RawClass::kPreFinalized; |
| 630 } | 636 } |
| 631 | 637 |
| (...skipping 3276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3908 } | 3914 } |
| 3909 | 3915 |
| 3910 | 3916 |
| 3911 intptr_t Stackmap::SizeInBits() const { | 3917 intptr_t Stackmap::SizeInBits() const { |
| 3912 return (Smi::Value(raw_ptr()->bitmap_size_in_bytes_) * kBitsPerByte); | 3918 return (Smi::Value(raw_ptr()->bitmap_size_in_bytes_) * kBitsPerByte); |
| 3913 } | 3919 } |
| 3914 | 3920 |
| 3915 } // namespace dart | 3921 } // namespace dart |
| 3916 | 3922 |
| 3917 #endif // VM_OBJECT_H_ | 3923 #endif // VM_OBJECT_H_ |
| OLD | NEW |