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 <limits> | 8 #include <limits> |
9 #include "include/dart_api.h" | 9 #include "include/dart_api.h" |
10 #include "platform/assert.h" | 10 #include "platform/assert.h" |
(...skipping 2496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2507 return static_cast<RawScript::Kind>(raw_ptr()->kind_); | 2507 return static_cast<RawScript::Kind>(raw_ptr()->kind_); |
2508 } | 2508 } |
2509 const char* GetKindAsCString() const; | 2509 const char* GetKindAsCString() const; |
2510 intptr_t line_offset() const { return raw_ptr()->line_offset_; } | 2510 intptr_t line_offset() const { return raw_ptr()->line_offset_; } |
2511 intptr_t col_offset() const { return raw_ptr()->col_offset_; } | 2511 intptr_t col_offset() const { return raw_ptr()->col_offset_; } |
2512 | 2512 |
2513 RawTokenStream* tokens() const { return raw_ptr()->tokens_; } | 2513 RawTokenStream* tokens() const { return raw_ptr()->tokens_; } |
2514 | 2514 |
2515 void Tokenize(const String& private_key) const; | 2515 void Tokenize(const String& private_key) const; |
2516 | 2516 |
2517 RawLibrary* FindLibrary() const; | |
2517 RawString* GetLine(intptr_t line_number) const; | 2518 RawString* GetLine(intptr_t line_number) const; |
2518 RawString* GetSnippet(intptr_t from_token_pos, | 2519 RawString* GetSnippet(intptr_t from_token_pos, |
2519 intptr_t to_token_pos) const; | 2520 intptr_t to_token_pos) const; |
2520 RawString* GetSnippet(intptr_t from_line, | 2521 RawString* GetSnippet(intptr_t from_line, |
2521 intptr_t from_column, | 2522 intptr_t from_column, |
2522 intptr_t to_line, | 2523 intptr_t to_line, |
2523 intptr_t to_column) const; | 2524 intptr_t to_column) const; |
2524 | 2525 |
2525 void SetLocationOffset(intptr_t line_offset, intptr_t col_offset) const; | 2526 void SetLocationOffset(intptr_t line_offset, intptr_t col_offset) const; |
2526 | 2527 |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2669 RawObject* LookupImportedObject(const String& name) const; | 2670 RawObject* LookupImportedObject(const String& name) const; |
2670 RawClass* LookupClass(const String& name) const; | 2671 RawClass* LookupClass(const String& name) const; |
2671 RawClass* LookupClassAllowPrivate(const String& name) const; | 2672 RawClass* LookupClassAllowPrivate(const String& name) const; |
2672 RawClass* LookupLocalClass(const String& name) const; | 2673 RawClass* LookupLocalClass(const String& name) const; |
2673 RawField* LookupFieldAllowPrivate(const String& name) const; | 2674 RawField* LookupFieldAllowPrivate(const String& name) const; |
2674 RawField* LookupLocalField(const String& name) const; | 2675 RawField* LookupLocalField(const String& name) const; |
2675 RawFunction* LookupFunctionAllowPrivate(const String& name) const; | 2676 RawFunction* LookupFunctionAllowPrivate(const String& name) const; |
2676 RawFunction* LookupLocalFunction(const String& name) const; | 2677 RawFunction* LookupLocalFunction(const String& name) const; |
2677 RawLibraryPrefix* LookupLocalLibraryPrefix(const String& name) const; | 2678 RawLibraryPrefix* LookupLocalLibraryPrefix(const String& name) const; |
2678 RawScript* LookupScript(const String& url) const; | 2679 RawScript* LookupScript(const String& url) const; |
2679 RawArray* LoadedScripts() const; | 2680 RawArray* LoadedScripts(bool cached = true) const; |
Michael Lippautz (Google)
2014/07/15 17:52:55
Make parameter explicit?
LoadedScripts() uses a c
| |
2680 | 2681 |
2681 // Resolve name in the scope of this library. First check the cache | 2682 // Resolve name in the scope of this library. First check the cache |
2682 // of already resolved names for this library. Then look in the | 2683 // of already resolved names for this library. Then look in the |
2683 // local dictionary for the unmangled name N, the getter name get:N | 2684 // local dictionary for the unmangled name N, the getter name get:N |
2684 // and setter name set:N. | 2685 // and setter name set:N. |
2685 // If the local dictionary contains no entry for these names, | 2686 // If the local dictionary contains no entry for these names, |
2686 // look in the scopes of all libraries that are imported | 2687 // look in the scopes of all libraries that are imported |
2687 // without a library prefix. | 2688 // without a library prefix. |
2688 RawObject* ResolveName(const String& name) const; | 2689 RawObject* ResolveName(const String& name) const; |
2689 | 2690 |
(...skipping 4487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
7177 | 7178 |
7178 | 7179 |
7179 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, | 7180 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, |
7180 intptr_t index) { | 7181 intptr_t index) { |
7181 return array.At((index * kEntryLength) + kTargetFunctionIndex); | 7182 return array.At((index * kEntryLength) + kTargetFunctionIndex); |
7182 } | 7183 } |
7183 | 7184 |
7184 } // namespace dart | 7185 } // namespace dart |
7185 | 7186 |
7186 #endif // VM_OBJECT_H_ | 7187 #endif // VM_OBJECT_H_ |
OLD | NEW |