| 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 1666 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1677 }; | 1677 }; |
| 1678 | 1678 |
| 1679 | 1679 |
| 1680 class Library : public Object { | 1680 class Library : public Object { |
| 1681 public: | 1681 public: |
| 1682 RawString* name() const { return raw_ptr()->name_; } | 1682 RawString* name() const { return raw_ptr()->name_; } |
| 1683 void SetName(const String& name) const; | 1683 void SetName(const String& name) const; |
| 1684 | 1684 |
| 1685 RawString* url() const { return raw_ptr()->url_; } | 1685 RawString* url() const { return raw_ptr()->url_; } |
| 1686 RawString* private_key() const { return raw_ptr()->private_key_; } | 1686 RawString* private_key() const { return raw_ptr()->private_key_; } |
| 1687 RawArray* import_map() const { return raw_ptr()->import_map_; } |
| 1688 void set_import_map(const Array& map) const; |
| 1687 bool LoadNotStarted() const { | 1689 bool LoadNotStarted() const { |
| 1688 return raw_ptr()->load_state_ == RawLibrary::kAllocated; | 1690 return raw_ptr()->load_state_ == RawLibrary::kAllocated; |
| 1689 } | 1691 } |
| 1690 bool LoadInProgress() const { | 1692 bool LoadInProgress() const { |
| 1691 return raw_ptr()->load_state_ == RawLibrary::kLoadInProgress; | 1693 return raw_ptr()->load_state_ == RawLibrary::kLoadInProgress; |
| 1692 } | 1694 } |
| 1693 void SetLoadInProgress() const; | 1695 void SetLoadInProgress() const; |
| 1694 bool Loaded() const { return raw_ptr()->load_state_ == RawLibrary::kLoaded; } | 1696 bool Loaded() const { return raw_ptr()->load_state_ == RawLibrary::kLoaded; } |
| 1695 void SetLoaded() const; | 1697 void SetLoaded() const; |
| 1696 bool LoadError() const { | 1698 bool LoadError() const { |
| (...skipping 13 matching lines...) Expand all Loading... |
| 1710 RawObject* LookupObject(const String& name) const; | 1712 RawObject* LookupObject(const String& name) const; |
| 1711 RawClass* LookupClass(const String& name) const; | 1713 RawClass* LookupClass(const String& name) const; |
| 1712 RawObject* LookupLocalObject(const String& name) const; | 1714 RawObject* LookupLocalObject(const String& name) const; |
| 1713 RawClass* LookupLocalClass(const String& name) const; | 1715 RawClass* LookupLocalClass(const String& name) const; |
| 1714 RawScript* LookupScript(const String& url) const; | 1716 RawScript* LookupScript(const String& url) const; |
| 1715 RawArray* LoadedScripts() const; | 1717 RawArray* LoadedScripts() const; |
| 1716 | 1718 |
| 1717 void AddAnonymousClass(const Class& cls) const; | 1719 void AddAnonymousClass(const Class& cls) const; |
| 1718 | 1720 |
| 1719 // Library imports. | 1721 // Library imports. |
| 1722 RawString* LookupImportMap(const String& name) const; |
| 1720 void AddImport(const Library& library) const; | 1723 void AddImport(const Library& library) const; |
| 1721 RawLibrary* LookupImport(const String& url) const; | 1724 RawLibrary* LookupImport(const String& url) const; |
| 1722 | 1725 |
| 1723 RawFunction* LookupFunctionInSource(const String& script_url, | 1726 RawFunction* LookupFunctionInSource(const String& script_url, |
| 1724 intptr_t line_number) const; | 1727 intptr_t line_number) const; |
| 1725 RawFunction* LookupFunctionInScript(const Script& script, | 1728 RawFunction* LookupFunctionInScript(const Script& script, |
| 1726 intptr_t token_index) const; | 1729 intptr_t token_index) const; |
| 1727 | 1730 |
| 1728 // Resolving native methods for script loaded in the library. | 1731 // Resolving native methods for script loaded in the library. |
| 1729 Dart_NativeEntryResolver native_entry_resolver() const { | 1732 Dart_NativeEntryResolver native_entry_resolver() const { |
| (...skipping 1918 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3648 } | 3651 } |
| 3649 | 3652 |
| 3650 | 3653 |
| 3651 void Context::SetAt(intptr_t index, const Instance& value) const { | 3654 void Context::SetAt(intptr_t index, const Instance& value) const { |
| 3652 StorePointer(InstanceAddr(index), value.raw()); | 3655 StorePointer(InstanceAddr(index), value.raw()); |
| 3653 } | 3656 } |
| 3654 | 3657 |
| 3655 } // namespace dart | 3658 } // namespace dart |
| 3656 | 3659 |
| 3657 #endif // VM_OBJECT_H_ | 3660 #endif // VM_OBJECT_H_ |
| OLD | NEW |