| 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 2088 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2099 RawArray* LoadedScripts() const; | 2099 RawArray* LoadedScripts() const; |
| 2100 | 2100 |
| 2101 void AddAnonymousClass(const Class& cls) const; | 2101 void AddAnonymousClass(const Class& cls) const; |
| 2102 | 2102 |
| 2103 // Library imports. | 2103 // Library imports. |
| 2104 void AddImport(const Library& library) const; | 2104 void AddImport(const Library& library) const; |
| 2105 RawLibrary* LookupImport(const String& url) const; | 2105 RawLibrary* LookupImport(const String& url) const; |
| 2106 intptr_t num_imports() const { return raw_ptr()->num_imports_; } | 2106 intptr_t num_imports() const { return raw_ptr()->num_imports_; } |
| 2107 RawLibrary* ImportAt(intptr_t index) const; | 2107 RawLibrary* ImportAt(intptr_t index) const; |
| 2108 RawLibraryPrefix* ImportPrefixAt(intptr_t index) const; | 2108 RawLibraryPrefix* ImportPrefixAt(intptr_t index) const; |
| 2109 bool ImportsCorelib() const; |
| 2109 | 2110 |
| 2110 RawFunction* LookupFunctionInSource(const String& script_url, | 2111 RawFunction* LookupFunctionInSource(const String& script_url, |
| 2111 intptr_t line_number) const; | 2112 intptr_t line_number) const; |
| 2112 RawFunction* LookupFunctionInScript(const Script& script, | 2113 RawFunction* LookupFunctionInScript(const Script& script, |
| 2113 intptr_t token_pos) const; | 2114 intptr_t token_pos) const; |
| 2114 | 2115 |
| 2115 // Resolving native methods for script loaded in the library. | 2116 // Resolving native methods for script loaded in the library. |
| 2116 Dart_NativeEntryResolver native_entry_resolver() const { | 2117 Dart_NativeEntryResolver native_entry_resolver() const { |
| 2117 return raw_ptr()->native_entry_resolver_; | 2118 return raw_ptr()->native_entry_resolver_; |
| 2118 } | 2119 } |
| (...skipping 12 matching lines...) Expand all Loading... |
| 2131 | 2132 |
| 2132 void Register() const; | 2133 void Register() const; |
| 2133 | 2134 |
| 2134 bool IsDebuggable() const { | 2135 bool IsDebuggable() const { |
| 2135 return raw_ptr()->debuggable_; | 2136 return raw_ptr()->debuggable_; |
| 2136 } | 2137 } |
| 2137 void set_debuggable(bool value) const { | 2138 void set_debuggable(bool value) const { |
| 2138 raw_ptr()->debuggable_ = value; | 2139 raw_ptr()->debuggable_ = value; |
| 2139 } | 2140 } |
| 2140 | 2141 |
| 2142 bool IsCoreLibrary() const { |
| 2143 return raw() == CoreLibrary(); |
| 2144 } |
| 2145 |
| 2141 static RawLibrary* LookupLibrary(const String& url); | 2146 static RawLibrary* LookupLibrary(const String& url); |
| 2142 static RawLibrary* GetLibrary(intptr_t index); | 2147 static RawLibrary* GetLibrary(intptr_t index); |
| 2143 static bool IsKeyUsed(intptr_t key); | 2148 static bool IsKeyUsed(intptr_t key); |
| 2144 | 2149 |
| 2145 static void InitCoreLibrary(Isolate* isolate); | 2150 static void InitCoreLibrary(Isolate* isolate); |
| 2146 static void InitMathLibrary(Isolate* isolate); | 2151 static void InitMathLibrary(Isolate* isolate); |
| 2147 static void InitIsolateLibrary(Isolate* isolate); | 2152 static void InitIsolateLibrary(Isolate* isolate); |
| 2148 static void InitMirrorsLibrary(Isolate* isolate); | 2153 static void InitMirrorsLibrary(Isolate* isolate); |
| 2149 static void InitScalarlistLibrary(Isolate* isolate); | 2154 static void InitScalarlistLibrary(Isolate* isolate); |
| 2150 static void InitNativeWrappersLibrary(Isolate* isolate); | 2155 static void InitNativeWrappersLibrary(Isolate* isolate); |
| (...skipping 3494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5645 if (this->CharAt(i) != str.CharAt(begin_index + i)) { | 5650 if (this->CharAt(i) != str.CharAt(begin_index + i)) { |
| 5646 return false; | 5651 return false; |
| 5647 } | 5652 } |
| 5648 } | 5653 } |
| 5649 return true; | 5654 return true; |
| 5650 } | 5655 } |
| 5651 | 5656 |
| 5652 } // namespace dart | 5657 } // namespace dart |
| 5653 | 5658 |
| 5654 #endif // VM_OBJECT_H_ | 5659 #endif // VM_OBJECT_H_ |
| OLD | NEW |