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 2095 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2106 } | 2106 } |
2107 | 2107 |
2108 bool IsCoreLibrary() const { | 2108 bool IsCoreLibrary() const { |
2109 return raw() == CoreLibrary(); | 2109 return raw() == CoreLibrary(); |
2110 } | 2110 } |
2111 | 2111 |
2112 static RawLibrary* LookupLibrary(const String& url); | 2112 static RawLibrary* LookupLibrary(const String& url); |
2113 static RawLibrary* GetLibrary(intptr_t index); | 2113 static RawLibrary* GetLibrary(intptr_t index); |
2114 static bool IsKeyUsed(intptr_t key); | 2114 static bool IsKeyUsed(intptr_t key); |
2115 | 2115 |
2116 static void InitASyncLibrary(Isolate* isolate); | |
2117 static void InitCoreLibrary(Isolate* isolate); | 2116 static void InitCoreLibrary(Isolate* isolate); |
2118 static void InitCollectionLibrary(Isolate* isolate); | |
2119 static void InitCollectionDevLibrary(Isolate* isolate); | |
2120 static void InitCryptoLibrary(Isolate* isolate); | |
2121 static void InitIsolateLibrary(Isolate* isolate); | |
2122 static void InitJsonLibrary(Isolate* isolate); | |
2123 static void InitMathLibrary(Isolate* isolate); | |
2124 static void InitMirrorsLibrary(Isolate* isolate); | |
2125 static void InitNativeWrappersLibrary(Isolate* isolate); | 2117 static void InitNativeWrappersLibrary(Isolate* isolate); |
2126 static void InitScalarlistLibrary(Isolate* isolate); | |
2127 static void InitUriLibrary(Isolate* isolate); | |
2128 static void InitUtfLibrary(Isolate* isolate); | |
2129 | 2118 |
2130 static RawLibrary* ASyncLibrary(); | 2119 static RawLibrary* AsyncLibrary(); |
2131 static RawLibrary* CoreLibrary(); | 2120 static RawLibrary* CoreLibrary(); |
2132 static RawLibrary* CollectionLibrary(); | 2121 static RawLibrary* CollectionLibrary(); |
2133 static RawLibrary* CollectionDevLibrary(); | 2122 static RawLibrary* CollectionDevLibrary(); |
2134 static RawLibrary* CryptoLibrary(); | 2123 static RawLibrary* CryptoLibrary(); |
2135 static RawLibrary* IsolateLibrary(); | 2124 static RawLibrary* IsolateLibrary(); |
2136 static RawLibrary* JsonLibrary(); | 2125 static RawLibrary* JsonLibrary(); |
2137 static RawLibrary* MathLibrary(); | 2126 static RawLibrary* MathLibrary(); |
2138 static RawLibrary* MirrorsLibrary(); | 2127 static RawLibrary* MirrorsLibrary(); |
2139 static RawLibrary* NativeWrappersLibrary(); | 2128 static RawLibrary* NativeWrappersLibrary(); |
2140 static RawLibrary* ScalarlistLibrary(); | 2129 static RawLibrary* ScalarlistLibrary(); |
(...skipping 17 matching lines...) Expand all Loading... |
2158 RawArray* loaded_scripts() const { return raw_ptr()->loaded_scripts_; } | 2147 RawArray* loaded_scripts() const { return raw_ptr()->loaded_scripts_; } |
2159 RawArray* dictionary() const { return raw_ptr()->dictionary_; } | 2148 RawArray* dictionary() const { return raw_ptr()->dictionary_; } |
2160 void InitClassDictionary() const; | 2149 void InitClassDictionary() const; |
2161 void InitImportList() const; | 2150 void InitImportList() const; |
2162 void GrowDictionary(const Array& dict, intptr_t dict_size) const; | 2151 void GrowDictionary(const Array& dict, intptr_t dict_size) const; |
2163 static RawLibrary* NewLibraryHelper(const String& url, | 2152 static RawLibrary* NewLibraryHelper(const String& url, |
2164 bool import_core_lib); | 2153 bool import_core_lib); |
2165 RawObject* LookupEntry(const String& name, intptr_t *index) const; | 2154 RawObject* LookupEntry(const String& name, intptr_t *index) const; |
2166 | 2155 |
2167 FINAL_HEAP_OBJECT_IMPLEMENTATION(Library, Object); | 2156 FINAL_HEAP_OBJECT_IMPLEMENTATION(Library, Object); |
| 2157 |
| 2158 friend class Object; |
2168 friend class Class; | 2159 friend class Class; |
2169 friend class Debugger; | 2160 friend class Debugger; |
2170 friend class DictionaryIterator; | 2161 friend class DictionaryIterator; |
2171 friend class Isolate; | 2162 friend class Isolate; |
2172 friend class Namespace; | 2163 friend class Namespace; |
2173 }; | 2164 }; |
2174 | 2165 |
2175 | 2166 |
2176 class LibraryPrefix : public Object { | 2167 class LibraryPrefix : public Object { |
2177 public: | 2168 public: |
(...skipping 4377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6555 | 6546 |
6556 | 6547 |
6557 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, | 6548 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, |
6558 intptr_t index) { | 6549 intptr_t index) { |
6559 return array.At((index * kEntryLength) + kTargetFunctionIndex); | 6550 return array.At((index * kEntryLength) + kTargetFunctionIndex); |
6560 } | 6551 } |
6561 | 6552 |
6562 } // namespace dart | 6553 } // namespace dart |
6563 | 6554 |
6564 #endif // VM_OBJECT_H_ | 6555 #endif // VM_OBJECT_H_ |
OLD | NEW |