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 1684 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1695 }; | 1695 }; |
1696 | 1696 |
1697 | 1697 |
1698 class Library : public Object { | 1698 class Library : public Object { |
1699 public: | 1699 public: |
1700 RawString* name() const { return raw_ptr()->name_; } | 1700 RawString* name() const { return raw_ptr()->name_; } |
1701 void SetName(const String& name) const; | 1701 void SetName(const String& name) const; |
1702 | 1702 |
1703 RawString* url() const { return raw_ptr()->url_; } | 1703 RawString* url() const { return raw_ptr()->url_; } |
1704 RawString* private_key() const { return raw_ptr()->private_key_; } | 1704 RawString* private_key() const { return raw_ptr()->private_key_; } |
1705 RawArray* import_map() const { return raw_ptr()->import_map_; } | |
1706 void set_import_map(const Array& map) const; | |
1707 bool LoadNotStarted() const { | 1705 bool LoadNotStarted() const { |
1708 return raw_ptr()->load_state_ == RawLibrary::kAllocated; | 1706 return raw_ptr()->load_state_ == RawLibrary::kAllocated; |
1709 } | 1707 } |
1710 bool LoadInProgress() const { | 1708 bool LoadInProgress() const { |
1711 return raw_ptr()->load_state_ == RawLibrary::kLoadInProgress; | 1709 return raw_ptr()->load_state_ == RawLibrary::kLoadInProgress; |
1712 } | 1710 } |
1713 void SetLoadInProgress() const; | 1711 void SetLoadInProgress() const; |
1714 bool Loaded() const { return raw_ptr()->load_state_ == RawLibrary::kLoaded; } | 1712 bool Loaded() const { return raw_ptr()->load_state_ == RawLibrary::kLoaded; } |
1715 void SetLoaded() const; | 1713 void SetLoaded() const; |
1716 bool LoadError() const { | 1714 bool LoadError() const { |
(...skipping 18 matching lines...) Expand all Loading... |
1735 RawField* LookupLocalField(const String& name) const; | 1733 RawField* LookupLocalField(const String& name) const; |
1736 RawFunction* LookupFunctionAllowPrivate(const String& name) const; | 1734 RawFunction* LookupFunctionAllowPrivate(const String& name) const; |
1737 RawFunction* LookupLocalFunction(const String& name) const; | 1735 RawFunction* LookupLocalFunction(const String& name) const; |
1738 RawLibraryPrefix* LookupLocalLibraryPrefix(const String& name) const; | 1736 RawLibraryPrefix* LookupLocalLibraryPrefix(const String& name) const; |
1739 RawScript* LookupScript(const String& url) const; | 1737 RawScript* LookupScript(const String& url) const; |
1740 RawArray* LoadedScripts() const; | 1738 RawArray* LoadedScripts() const; |
1741 | 1739 |
1742 void AddAnonymousClass(const Class& cls) const; | 1740 void AddAnonymousClass(const Class& cls) const; |
1743 | 1741 |
1744 // Library imports. | 1742 // Library imports. |
1745 RawString* LookupImportMap(const String& name) const; | |
1746 void AddImport(const Library& library) const; | 1743 void AddImport(const Library& library) const; |
1747 RawLibrary* LookupImport(const String& url) const; | 1744 RawLibrary* LookupImport(const String& url) const; |
1748 | 1745 |
1749 RawFunction* LookupFunctionInSource(const String& script_url, | 1746 RawFunction* LookupFunctionInSource(const String& script_url, |
1750 intptr_t line_number) const; | 1747 intptr_t line_number) const; |
1751 RawFunction* LookupFunctionInScript(const Script& script, | 1748 RawFunction* LookupFunctionInScript(const Script& script, |
1752 intptr_t token_index) const; | 1749 intptr_t token_index) const; |
1753 | 1750 |
1754 // Resolving native methods for script loaded in the library. | 1751 // Resolving native methods for script loaded in the library. |
1755 Dart_NativeEntryResolver native_entry_resolver() const { | 1752 Dart_NativeEntryResolver native_entry_resolver() const { |
(...skipping 3135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4891 } | 4888 } |
4892 | 4889 |
4893 | 4890 |
4894 intptr_t Stackmap::SizeInBits() const { | 4891 intptr_t Stackmap::SizeInBits() const { |
4895 return (Smi::Value(raw_ptr()->bitmap_size_in_bytes_) * kBitsPerByte); | 4892 return (Smi::Value(raw_ptr()->bitmap_size_in_bytes_) * kBitsPerByte); |
4896 } | 4893 } |
4897 | 4894 |
4898 } // namespace dart | 4895 } // namespace dart |
4899 | 4896 |
4900 #endif // VM_OBJECT_H_ | 4897 #endif // VM_OBJECT_H_ |
OLD | NEW |