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

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

Issue 10540040: Inline setters, getters, various cleanups & restructuring. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 6 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 1518 matching lines...) Expand 10 before | Expand all | Expand 10 after
1529 raw_ptr()->has_initializer_ = has_initializer; 1529 raw_ptr()->has_initializer_ = has_initializer;
1530 } 1530 }
1531 1531
1532 // Constructs getter and setter names for fields and vice versa. 1532 // Constructs getter and setter names for fields and vice versa.
1533 static RawString* GetterName(const String& field_name); 1533 static RawString* GetterName(const String& field_name);
1534 static RawString* GetterSymbol(const String& field_name); 1534 static RawString* GetterSymbol(const String& field_name);
1535 static RawString* SetterName(const String& field_name); 1535 static RawString* SetterName(const String& field_name);
1536 static RawString* SetterSymbol(const String& field_name); 1536 static RawString* SetterSymbol(const String& field_name);
1537 static RawString* NameFromGetter(const String& getter_name); 1537 static RawString* NameFromGetter(const String& getter_name);
1538 static RawString* NameFromSetter(const String& setter_name); 1538 static RawString* NameFromSetter(const String& setter_name);
1539 static bool IsGetterName(const String& function_name);
1540 static bool IsSetterName(const String& function_name);
1539 1541
1540 private: 1542 private:
1541 void set_name(const String& value) const; 1543 void set_name(const String& value) const;
1542 void set_is_static(bool is_static) const { 1544 void set_is_static(bool is_static) const {
1543 raw_ptr()->is_static_ = is_static; 1545 raw_ptr()->is_static_ = is_static;
1544 } 1546 }
1545 void set_is_final(bool is_final) const { 1547 void set_is_final(bool is_final) const {
1546 raw_ptr()->is_final_ = is_final; 1548 raw_ptr()->is_final_ = is_final;
1547 } 1549 }
1548 void set_token_index(intptr_t token_index) const { 1550 void set_token_index(intptr_t token_index) const {
(...skipping 3410 matching lines...) Expand 10 before | Expand all | Expand 10 after
4959 } 4961 }
4960 4962
4961 4963
4962 intptr_t Stackmap::SizeInBits() const { 4964 intptr_t Stackmap::SizeInBits() const {
4963 return (Smi::Value(raw_ptr()->bitmap_size_in_bytes_) * kBitsPerByte); 4965 return (Smi::Value(raw_ptr()->bitmap_size_in_bytes_) * kBitsPerByte);
4964 } 4966 }
4965 4967
4966 } // namespace dart 4968 } // namespace dart
4967 4969
4968 #endif // VM_OBJECT_H_ 4970 #endif // VM_OBJECT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698