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

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

Issue 10050022: Fix lazy initialization of static fields (issue 2472). (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 8 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
« no previous file with comments | « runtime/vm/ast.cc ('k') | runtime/vm/parser.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1510 matching lines...) Expand 10 before | Expand all | Expand 10 after
1521 HEAP_OBJECT_IMPLEMENTATION(Function, Object); 1521 HEAP_OBJECT_IMPLEMENTATION(Function, Object);
1522 friend class Class; 1522 friend class Class;
1523 }; 1523 };
1524 1524
1525 1525
1526 class Field : public Object { 1526 class Field : public Object {
1527 public: 1527 public:
1528 RawString* name() const { return raw_ptr()->name_; } 1528 RawString* name() const { return raw_ptr()->name_; }
1529 bool is_static() const { return raw_ptr()->is_static_; } 1529 bool is_static() const { return raw_ptr()->is_static_; }
1530 bool is_final() const { return raw_ptr()->is_final_; } 1530 bool is_final() const { return raw_ptr()->is_final_; }
1531 // TODO(regis): Implement support for const fields. Until then, current final
1532 // fields are considered const.
1533 bool is_const() const { return raw_ptr()->is_final_; }
1531 1534
1532 inline intptr_t Offset() const; 1535 inline intptr_t Offset() const;
1533 inline void SetOffset(intptr_t value) const; 1536 inline void SetOffset(intptr_t value) const;
1534 1537
1535 RawInstance* value() const; 1538 RawInstance* value() const;
1536 void set_value(const Instance& value) const; 1539 void set_value(const Instance& value) const;
1537 1540
1538 RawClass* owner() const { return raw_ptr()->owner_; } 1541 RawClass* owner() const { return raw_ptr()->owner_; }
1539 void set_owner(const Class& value) const { 1542 void set_owner(const Class& value) const {
1540 StorePointer(&raw_ptr()->owner_, value.raw()); 1543 StorePointer(&raw_ptr()->owner_, value.raw());
(...skipping 2442 matching lines...) Expand 10 before | Expand all | Expand 10 after
3983 } 3986 }
3984 3987
3985 3988
3986 intptr_t Stackmap::SizeInBits() const { 3989 intptr_t Stackmap::SizeInBits() const {
3987 return (Smi::Value(raw_ptr()->bitmap_size_in_bytes_) * kBitsPerByte); 3990 return (Smi::Value(raw_ptr()->bitmap_size_in_bytes_) * kBitsPerByte);
3988 } 3991 }
3989 3992
3990 } // namespace dart 3993 } // namespace dart
3991 3994
3992 #endif // VM_OBJECT_H_ 3995 #endif // VM_OBJECT_H_
OLDNEW
« no previous file with comments | « runtime/vm/ast.cc ('k') | runtime/vm/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698