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

Side by Side Diff: runtime/vm/object.h

Issue 10832126: Store pointer instead of reference to LocalVariable in ast and flow graph. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 1339 matching lines...) Expand 10 before | Expand all | Expand 10 after
1350 NameVisibility name_visibility) const { 1350 NameVisibility name_visibility) const {
1351 const bool instantiate = true; 1351 const bool instantiate = true;
1352 return BuildSignature(instantiate, name_visibility, instantiator); 1352 return BuildSignature(instantiate, name_visibility, instantiator);
1353 } 1353 }
1354 1354
1355 // Returns true if the signature of this function is instantiated, i.e. if it 1355 // Returns true if the signature of this function is instantiated, i.e. if it
1356 // does not involve generic parameter types or generic result type. 1356 // does not involve generic parameter types or generic result type.
1357 bool HasInstantiatedSignature() const; 1357 bool HasInstantiatedSignature() const;
1358 1358
1359 RawClass* owner() const { return raw_ptr()->owner_; } 1359 RawClass* owner() const { return raw_ptr()->owner_; }
1360 void set_owner(const Class& value) const;
1361 1360
1362 RawAbstractType* result_type() const { return raw_ptr()->result_type_; } 1361 RawAbstractType* result_type() const { return raw_ptr()->result_type_; }
Ivan Posva 2012/08/03 20:10:26 This is a completely unrelated change. Please remo
regis 2012/08/06 22:31:49 As the title of this cl states, this is a follow u
1363 void set_result_type(const AbstractType& value) const; 1362 void set_result_type(const AbstractType& value) const;
1364 1363
1365 RawAbstractType* ParameterTypeAt(intptr_t index) const; 1364 RawAbstractType* ParameterTypeAt(intptr_t index) const;
1366 void SetParameterTypeAt(intptr_t index, const AbstractType& value) const; 1365 void SetParameterTypeAt(intptr_t index, const AbstractType& value) const;
1367 void set_parameter_types(const Array& value) const; 1366 void set_parameter_types(const Array& value) const;
1368 1367
1369 // Parameter names are valid for all valid parameter indices, and are not 1368 // Parameter names are valid for all valid parameter indices, and are not
1370 // limited to named optional parameters. 1369 // limited to named optional parameters.
1371 RawString* ParameterNameAt(intptr_t index) const; 1370 RawString* ParameterNameAt(intptr_t index) const;
1372 void SetParameterNameAt(intptr_t index, const String& value) const; 1371 void SetParameterNameAt(intptr_t index, const String& value) const;
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
1623 static const int kCtorPhaseBody = 1 << 1; 1622 static const int kCtorPhaseBody = 1 << 1;
1624 static const int kCtorPhaseAll = (kCtorPhaseInit | kCtorPhaseBody); 1623 static const int kCtorPhaseAll = (kCtorPhaseInit | kCtorPhaseBody);
1625 1624
1626 private: 1625 private:
1627 void set_name(const String& value) const; 1626 void set_name(const String& value) const;
1628 void set_kind(RawFunction::Kind value) const; 1627 void set_kind(RawFunction::Kind value) const;
1629 void set_is_static(bool is_static) const; 1628 void set_is_static(bool is_static) const;
1630 void set_is_const(bool is_const) const; 1629 void set_is_const(bool is_const) const;
1631 void set_is_external(bool value) const; 1630 void set_is_external(bool value) const;
1632 void set_parent_function(const Function& value) const; 1631 void set_parent_function(const Function& value) const;
1632 void set_owner(const Class& value) const;
1633 void set_token_pos(intptr_t value) const; 1633 void set_token_pos(intptr_t value) const;
1634 void set_implicit_closure_function(const Function& value) const; 1634 void set_implicit_closure_function(const Function& value) const;
1635 static RawFunction* New(); 1635 static RawFunction* New();
1636 1636
1637 RawString* BuildSignature(bool instantiate, 1637 RawString* BuildSignature(bool instantiate,
1638 NameVisibility name_visibility, 1638 NameVisibility name_visibility,
1639 const AbstractTypeArguments& instantiator) const; 1639 const AbstractTypeArguments& instantiator) const;
1640 1640
1641 // Check the subtype or 'more specific' relationship. 1641 // Check the subtype or 'more specific' relationship.
1642 bool TypeTest(TypeTestKind test_kind, 1642 bool TypeTest(TypeTestKind test_kind,
(...skipping 24 matching lines...) Expand all
1667 bool is_final() const { return raw_ptr()->is_final_; } 1667 bool is_final() const { return raw_ptr()->is_final_; }
1668 bool is_const() const { return raw_ptr()->is_const_; } 1668 bool is_const() const { return raw_ptr()->is_const_; }
1669 1669
1670 inline intptr_t Offset() const; 1670 inline intptr_t Offset() const;
1671 inline void SetOffset(intptr_t value) const; 1671 inline void SetOffset(intptr_t value) const;
1672 1672
1673 RawInstance* value() const; 1673 RawInstance* value() const;
1674 void set_value(const Instance& value) const; 1674 void set_value(const Instance& value) const;
1675 1675
1676 RawClass* owner() const { return raw_ptr()->owner_; } 1676 RawClass* owner() const { return raw_ptr()->owner_; }
1677 void set_owner(const Class& value) const {
1678 StorePointer(&raw_ptr()->owner_, value.raw());
1679 }
1680 1677
1681 RawAbstractType* type() const { return raw_ptr()->type_; } 1678 RawAbstractType* type() const { return raw_ptr()->type_; }
1682 void set_type(const AbstractType& value) const; 1679 void set_type(const AbstractType& value) const;
1683 1680
1684 static intptr_t InstanceSize() { 1681 static intptr_t InstanceSize() {
1685 return RoundedAllocationSize(sizeof(RawField)); 1682 return RoundedAllocationSize(sizeof(RawField));
1686 } 1683 }
1687 1684
1688 static RawField* New(const String& name, 1685 static RawField* New(const String& name,
1689 bool is_static, 1686 bool is_static,
(...skipping 25 matching lines...) Expand all
1715 void set_name(const String& value) const; 1712 void set_name(const String& value) const;
1716 void set_is_static(bool is_static) const { 1713 void set_is_static(bool is_static) const {
1717 raw_ptr()->is_static_ = is_static; 1714 raw_ptr()->is_static_ = is_static;
1718 } 1715 }
1719 void set_is_final(bool is_final) const { 1716 void set_is_final(bool is_final) const {
1720 raw_ptr()->is_final_ = is_final; 1717 raw_ptr()->is_final_ = is_final;
1721 } 1718 }
1722 void set_is_const(bool value) const { 1719 void set_is_const(bool value) const {
1723 raw_ptr()->is_const_ = value; 1720 raw_ptr()->is_const_ = value;
1724 } 1721 }
1722 void set_owner(const Class& value) const {
1723 StorePointer(&raw_ptr()->owner_, value.raw());
1724 }
1725 void set_token_pos(intptr_t token_pos) const { 1725 void set_token_pos(intptr_t token_pos) const {
1726 raw_ptr()->token_pos_ = token_pos; 1726 raw_ptr()->token_pos_ = token_pos;
1727 } 1727 }
1728 static RawField* New(); 1728 static RawField* New();
1729 1729
1730 HEAP_OBJECT_IMPLEMENTATION(Field, Object); 1730 HEAP_OBJECT_IMPLEMENTATION(Field, Object);
1731 friend class Class; 1731 friend class Class;
1732 }; 1732 };
1733 1733
1734 1734
(...skipping 3710 matching lines...) Expand 10 before | Expand all | Expand 10 after
5445 if (this->CharAt(i) != str.CharAt(begin_index + i)) { 5445 if (this->CharAt(i) != str.CharAt(begin_index + i)) {
5446 return false; 5446 return false;
5447 } 5447 }
5448 } 5448 }
5449 return true; 5449 return true;
5450 } 5450 }
5451 5451
5452 } // namespace dart 5452 } // namespace dart
5453 5453
5454 #endif // VM_OBJECT_H_ 5454 #endif // VM_OBJECT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698