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