| 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 1165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1176 RawFunction* LookupStaticFunction(const String& name) const; | 1176 RawFunction* LookupStaticFunction(const String& name) const; |
| 1177 RawFunction* LookupStaticFunctionAllowPrivate(const String& name) const; | 1177 RawFunction* LookupStaticFunctionAllowPrivate(const String& name) const; |
| 1178 RawFunction* LookupConstructor(const String& name) const; | 1178 RawFunction* LookupConstructor(const String& name) const; |
| 1179 RawFunction* LookupConstructorAllowPrivate(const String& name) const; | 1179 RawFunction* LookupConstructorAllowPrivate(const String& name) const; |
| 1180 RawFunction* LookupFactory(const String& name) const; | 1180 RawFunction* LookupFactory(const String& name) const; |
| 1181 RawFunction* LookupFactoryAllowPrivate(const String& name) const; | 1181 RawFunction* LookupFactoryAllowPrivate(const String& name) const; |
| 1182 RawFunction* LookupFunction(const String& name) const; | 1182 RawFunction* LookupFunction(const String& name) const; |
| 1183 RawFunction* LookupFunctionAllowPrivate(const String& name) const; | 1183 RawFunction* LookupFunctionAllowPrivate(const String& name) const; |
| 1184 RawFunction* LookupGetterFunction(const String& name) const; | 1184 RawFunction* LookupGetterFunction(const String& name) const; |
| 1185 RawFunction* LookupSetterFunction(const String& name) const; | 1185 RawFunction* LookupSetterFunction(const String& name) const; |
| 1186 RawFunction* LookupFunctionAtToken(intptr_t token_pos) const; | |
| 1187 RawField* LookupInstanceField(const String& name) const; | 1186 RawField* LookupInstanceField(const String& name) const; |
| 1188 RawField* LookupStaticField(const String& name) const; | 1187 RawField* LookupStaticField(const String& name) const; |
| 1189 RawField* LookupField(const String& name) const; | 1188 RawField* LookupField(const String& name) const; |
| 1190 | 1189 |
| 1191 RawLibraryPrefix* LookupLibraryPrefix(const String& name) const; | 1190 RawLibraryPrefix* LookupLibraryPrefix(const String& name) const; |
| 1192 | 1191 |
| 1193 void InsertCanonicalConstant(intptr_t index, const Instance& constant) const; | 1192 void InsertCanonicalConstant(intptr_t index, const Instance& constant) const; |
| 1194 | 1193 |
| 1195 intptr_t FindCanonicalTypeIndex(const Type& needle) const; | 1194 intptr_t FindCanonicalTypeIndex(const Type& needle) const; |
| 1196 RawType* CanonicalTypeFromIndex(intptr_t idx) const; | 1195 RawType* CanonicalTypeFromIndex(intptr_t idx) const; |
| (...skipping 2252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3449 | 3448 |
| 3450 // Library imports. | 3449 // Library imports. |
| 3451 RawArray* imports() const { return raw_ptr()->imports_; } | 3450 RawArray* imports() const { return raw_ptr()->imports_; } |
| 3452 RawArray* exports() const { return raw_ptr()->exports_; } | 3451 RawArray* exports() const { return raw_ptr()->exports_; } |
| 3453 void AddImport(const Namespace& ns) const; | 3452 void AddImport(const Namespace& ns) const; |
| 3454 intptr_t num_imports() const { return raw_ptr()->num_imports_; } | 3453 intptr_t num_imports() const { return raw_ptr()->num_imports_; } |
| 3455 RawNamespace* ImportAt(intptr_t index) const; | 3454 RawNamespace* ImportAt(intptr_t index) const; |
| 3456 RawLibrary* ImportLibraryAt(intptr_t index) const; | 3455 RawLibrary* ImportLibraryAt(intptr_t index) const; |
| 3457 bool ImportsCorelib() const; | 3456 bool ImportsCorelib() const; |
| 3458 | 3457 |
| 3459 RawFunction* LookupFunctionInScript(const Script& script, | |
| 3460 intptr_t token_pos) const; | |
| 3461 | |
| 3462 // Resolving native methods for script loaded in the library. | 3458 // Resolving native methods for script loaded in the library. |
| 3463 Dart_NativeEntryResolver native_entry_resolver() const { | 3459 Dart_NativeEntryResolver native_entry_resolver() const { |
| 3464 return raw_ptr()->native_entry_resolver_; | 3460 return raw_ptr()->native_entry_resolver_; |
| 3465 } | 3461 } |
| 3466 void set_native_entry_resolver(Dart_NativeEntryResolver value) const { | 3462 void set_native_entry_resolver(Dart_NativeEntryResolver value) const { |
| 3467 StoreNonPointer(&raw_ptr()->native_entry_resolver_, value); | 3463 StoreNonPointer(&raw_ptr()->native_entry_resolver_, value); |
| 3468 } | 3464 } |
| 3469 Dart_NativeEntrySymbol native_entry_symbol_resolver() const { | 3465 Dart_NativeEntrySymbol native_entry_symbol_resolver() const { |
| 3470 return raw_ptr()->native_entry_symbol_resolver_; | 3466 return raw_ptr()->native_entry_symbol_resolver_; |
| 3471 } | 3467 } |
| (...skipping 4764 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8236 | 8232 |
| 8237 | 8233 |
| 8238 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, | 8234 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, |
| 8239 intptr_t index) { | 8235 intptr_t index) { |
| 8240 return array.At((index * kEntryLength) + kTargetFunctionIndex); | 8236 return array.At((index * kEntryLength) + kTargetFunctionIndex); |
| 8241 } | 8237 } |
| 8242 | 8238 |
| 8243 } // namespace dart | 8239 } // namespace dart |
| 8244 | 8240 |
| 8245 #endif // VM_OBJECT_H_ | 8241 #endif // VM_OBJECT_H_ |
| OLD | NEW |