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 1693 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1704 }; | 1704 }; |
1705 | 1705 |
1706 | 1706 |
1707 class Library : public Object { | 1707 class Library : public Object { |
1708 public: | 1708 public: |
1709 RawString* name() const { return raw_ptr()->name_; } | 1709 RawString* name() const { return raw_ptr()->name_; } |
1710 void SetName(const String& name) const; | 1710 void SetName(const String& name) const; |
1711 | 1711 |
1712 RawString* url() const { return raw_ptr()->url_; } | 1712 RawString* url() const { return raw_ptr()->url_; } |
1713 RawString* private_key() const { return raw_ptr()->private_key_; } | 1713 RawString* private_key() const { return raw_ptr()->private_key_; } |
| 1714 RawArray* import_map() const { return raw_ptr()->import_map_; } |
| 1715 void set_import_map(const Array& map) const; |
1714 bool LoadNotStarted() const { | 1716 bool LoadNotStarted() const { |
1715 return raw_ptr()->load_state_ == RawLibrary::kAllocated; | 1717 return raw_ptr()->load_state_ == RawLibrary::kAllocated; |
1716 } | 1718 } |
1717 bool LoadInProgress() const { | 1719 bool LoadInProgress() const { |
1718 return raw_ptr()->load_state_ == RawLibrary::kLoadInProgress; | 1720 return raw_ptr()->load_state_ == RawLibrary::kLoadInProgress; |
1719 } | 1721 } |
1720 void SetLoadInProgress() const; | 1722 void SetLoadInProgress() const; |
1721 bool Loaded() const { return raw_ptr()->load_state_ == RawLibrary::kLoaded; } | 1723 bool Loaded() const { return raw_ptr()->load_state_ == RawLibrary::kLoaded; } |
1722 void SetLoaded() const; | 1724 void SetLoaded() const; |
1723 bool LoadError() const { | 1725 bool LoadError() const { |
(...skipping 18 matching lines...) Expand all Loading... |
1742 RawField* LookupLocalField(const String& name) const; | 1744 RawField* LookupLocalField(const String& name) const; |
1743 RawFunction* LookupFunctionAllowPrivate(const String& name) const; | 1745 RawFunction* LookupFunctionAllowPrivate(const String& name) const; |
1744 RawFunction* LookupLocalFunction(const String& name) const; | 1746 RawFunction* LookupLocalFunction(const String& name) const; |
1745 RawLibraryPrefix* LookupLocalLibraryPrefix(const String& name) const; | 1747 RawLibraryPrefix* LookupLocalLibraryPrefix(const String& name) const; |
1746 RawScript* LookupScript(const String& url) const; | 1748 RawScript* LookupScript(const String& url) const; |
1747 RawArray* LoadedScripts() const; | 1749 RawArray* LoadedScripts() const; |
1748 | 1750 |
1749 void AddAnonymousClass(const Class& cls) const; | 1751 void AddAnonymousClass(const Class& cls) const; |
1750 | 1752 |
1751 // Library imports. | 1753 // Library imports. |
| 1754 RawString* LookupImportMap(const String& name) const; |
1752 void AddImport(const Library& library) const; | 1755 void AddImport(const Library& library) const; |
1753 RawLibrary* LookupImport(const String& url) const; | 1756 RawLibrary* LookupImport(const String& url) const; |
1754 | 1757 |
1755 RawFunction* LookupFunctionInSource(const String& script_url, | 1758 RawFunction* LookupFunctionInSource(const String& script_url, |
1756 intptr_t line_number) const; | 1759 intptr_t line_number) const; |
1757 RawFunction* LookupFunctionInScript(const Script& script, | 1760 RawFunction* LookupFunctionInScript(const Script& script, |
1758 intptr_t token_index) const; | 1761 intptr_t token_index) const; |
1759 | 1762 |
1760 // Resolving native methods for script loaded in the library. | 1763 // Resolving native methods for script loaded in the library. |
1761 Dart_NativeEntryResolver native_entry_resolver() const { | 1764 Dart_NativeEntryResolver native_entry_resolver() const { |
(...skipping 3184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4946 } | 4949 } |
4947 | 4950 |
4948 | 4951 |
4949 intptr_t Stackmap::SizeInBits() const { | 4952 intptr_t Stackmap::SizeInBits() const { |
4950 return (Smi::Value(raw_ptr()->bitmap_size_in_bytes_) * kBitsPerByte); | 4953 return (Smi::Value(raw_ptr()->bitmap_size_in_bytes_) * kBitsPerByte); |
4951 } | 4954 } |
4952 | 4955 |
4953 } // namespace dart | 4956 } // namespace dart |
4954 | 4957 |
4955 #endif // VM_OBJECT_H_ | 4958 #endif // VM_OBJECT_H_ |
OLD | NEW |