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; | |
1716 bool LoadNotStarted() const { | 1714 bool LoadNotStarted() const { |
1717 return raw_ptr()->load_state_ == RawLibrary::kAllocated; | 1715 return raw_ptr()->load_state_ == RawLibrary::kAllocated; |
1718 } | 1716 } |
1719 bool LoadInProgress() const { | 1717 bool LoadInProgress() const { |
1720 return raw_ptr()->load_state_ == RawLibrary::kLoadInProgress; | 1718 return raw_ptr()->load_state_ == RawLibrary::kLoadInProgress; |
1721 } | 1719 } |
1722 void SetLoadInProgress() const; | 1720 void SetLoadInProgress() const; |
1723 bool Loaded() const { return raw_ptr()->load_state_ == RawLibrary::kLoaded; } | 1721 bool Loaded() const { return raw_ptr()->load_state_ == RawLibrary::kLoaded; } |
1724 void SetLoaded() const; | 1722 void SetLoaded() const; |
1725 bool LoadError() const { | 1723 bool LoadError() const { |
(...skipping 18 matching lines...) Expand all Loading... |
1744 RawField* LookupLocalField(const String& name) const; | 1742 RawField* LookupLocalField(const String& name) const; |
1745 RawFunction* LookupFunctionAllowPrivate(const String& name) const; | 1743 RawFunction* LookupFunctionAllowPrivate(const String& name) const; |
1746 RawFunction* LookupLocalFunction(const String& name) const; | 1744 RawFunction* LookupLocalFunction(const String& name) const; |
1747 RawLibraryPrefix* LookupLocalLibraryPrefix(const String& name) const; | 1745 RawLibraryPrefix* LookupLocalLibraryPrefix(const String& name) const; |
1748 RawScript* LookupScript(const String& url) const; | 1746 RawScript* LookupScript(const String& url) const; |
1749 RawArray* LoadedScripts() const; | 1747 RawArray* LoadedScripts() const; |
1750 | 1748 |
1751 void AddAnonymousClass(const Class& cls) const; | 1749 void AddAnonymousClass(const Class& cls) const; |
1752 | 1750 |
1753 // Library imports. | 1751 // Library imports. |
1754 RawString* LookupImportMap(const String& name) const; | |
1755 void AddImport(const Library& library) const; | 1752 void AddImport(const Library& library) const; |
1756 RawLibrary* LookupImport(const String& url) const; | 1753 RawLibrary* LookupImport(const String& url) const; |
1757 | 1754 |
1758 RawFunction* LookupFunctionInSource(const String& script_url, | 1755 RawFunction* LookupFunctionInSource(const String& script_url, |
1759 intptr_t line_number) const; | 1756 intptr_t line_number) const; |
1760 RawFunction* LookupFunctionInScript(const Script& script, | 1757 RawFunction* LookupFunctionInScript(const Script& script, |
1761 intptr_t token_index) const; | 1758 intptr_t token_index) const; |
1762 | 1759 |
1763 // Resolving native methods for script loaded in the library. | 1760 // Resolving native methods for script loaded in the library. |
1764 Dart_NativeEntryResolver native_entry_resolver() const { | 1761 Dart_NativeEntryResolver native_entry_resolver() const { |
(...skipping 3151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4916 } | 4913 } |
4917 | 4914 |
4918 | 4915 |
4919 intptr_t Stackmap::SizeInBits() const { | 4916 intptr_t Stackmap::SizeInBits() const { |
4920 return (Smi::Value(raw_ptr()->bitmap_size_in_bytes_) * kBitsPerByte); | 4917 return (Smi::Value(raw_ptr()->bitmap_size_in_bytes_) * kBitsPerByte); |
4921 } | 4918 } |
4922 | 4919 |
4923 } // namespace dart | 4920 } // namespace dart |
4924 | 4921 |
4925 #endif // VM_OBJECT_H_ | 4922 #endif // VM_OBJECT_H_ |
OLD | NEW |