| 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 1501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1512 }; | 1512 }; |
| 1513 | 1513 |
| 1514 | 1514 |
| 1515 class Library : public Object { | 1515 class Library : public Object { |
| 1516 public: | 1516 public: |
| 1517 RawString* name() const { return raw_ptr()->name_; } | 1517 RawString* name() const { return raw_ptr()->name_; } |
| 1518 void SetName(const String& name) const; | 1518 void SetName(const String& name) const; |
| 1519 | 1519 |
| 1520 RawString* url() const { return raw_ptr()->url_; } | 1520 RawString* url() const { return raw_ptr()->url_; } |
| 1521 RawString* private_key() const { return raw_ptr()->private_key_; } | 1521 RawString* private_key() const { return raw_ptr()->private_key_; } |
| 1522 bool LoadInProgress() const { |
| 1523 return raw_ptr()->load_state_ == RawLibrary::kLoadInProgress; |
| 1524 } |
| 1525 void SetLoadInProgress() const; |
| 1526 bool Loaded() const { return raw_ptr()->load_state_ == RawLibrary::kLoaded; } |
| 1527 void SetLoaded() const; |
| 1528 bool LoadError() const { |
| 1529 return raw_ptr()->load_state_ == RawLibrary::kLoadError; |
| 1530 } |
| 1531 void SetLoadError() const; |
| 1522 | 1532 |
| 1523 static intptr_t InstanceSize() { | 1533 static intptr_t InstanceSize() { |
| 1524 return RoundedAllocationSize(sizeof(RawLibrary)); | 1534 return RoundedAllocationSize(sizeof(RawLibrary)); |
| 1525 } | 1535 } |
| 1526 | 1536 |
| 1527 static RawLibrary* New(const String& url); | 1537 static RawLibrary* New(const String& url); |
| 1528 | 1538 |
| 1529 // Library scope name dictionary. | 1539 // Library scope name dictionary. |
| 1530 void AddClass(const Class& cls) const; | 1540 void AddClass(const Class& cls) const; |
| 1531 void AddObject(const Object& obj, const String& name) const; | 1541 void AddObject(const Object& obj, const String& name) const; |
| (...skipping 1480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3012 } | 3022 } |
| 3013 | 3023 |
| 3014 | 3024 |
| 3015 void Context::SetAt(intptr_t index, const Instance& value) const { | 3025 void Context::SetAt(intptr_t index, const Instance& value) const { |
| 3016 StorePointer(InstanceAddr(index), value.raw()); | 3026 StorePointer(InstanceAddr(index), value.raw()); |
| 3017 } | 3027 } |
| 3018 | 3028 |
| 3019 } // namespace dart | 3029 } // namespace dart |
| 3020 | 3030 |
| 3021 #endif // VM_OBJECT_H_ | 3031 #endif // VM_OBJECT_H_ |
| OLD | NEW |