| 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 1828 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1839 HEAP_OBJECT_IMPLEMENTATION(TokenStream, Object); | 1839 HEAP_OBJECT_IMPLEMENTATION(TokenStream, Object); |
| 1840 friend class Class; | 1840 friend class Class; |
| 1841 }; | 1841 }; |
| 1842 | 1842 |
| 1843 | 1843 |
| 1844 class Script : public Object { | 1844 class Script : public Object { |
| 1845 public: | 1845 public: |
| 1846 RawString* url() const { return raw_ptr()->url_; } | 1846 RawString* url() const { return raw_ptr()->url_; } |
| 1847 bool HasSource() const; | 1847 bool HasSource() const; |
| 1848 RawString* Source() const; | 1848 RawString* Source() const; |
| 1849 RawScript::Kind kind() const { return raw_ptr()->kind_; } | 1849 RawScript::Kind kind() const { |
| 1850 return static_cast<RawScript::Kind>(raw_ptr()->kind_); |
| 1851 } |
| 1852 intptr_t line_offset() const { return raw_ptr()->line_offset_; } |
| 1853 intptr_t col_offset() const { return raw_ptr()->col_offset_; } |
| 1850 | 1854 |
| 1851 RawTokenStream* tokens() const { return raw_ptr()->tokens_; } | 1855 RawTokenStream* tokens() const { return raw_ptr()->tokens_; } |
| 1852 | 1856 |
| 1853 void Tokenize(const String& private_key) const; | 1857 void Tokenize(const String& private_key) const; |
| 1854 | 1858 |
| 1855 RawString* GetLine(intptr_t line_number) const; | 1859 RawString* GetLine(intptr_t line_number) const; |
| 1856 | 1860 |
| 1857 RawString* GetSnippet(intptr_t from_line, | 1861 RawString* GetSnippet(intptr_t from_line, |
| 1858 intptr_t from_column, | 1862 intptr_t from_column, |
| 1859 intptr_t to_line, | 1863 intptr_t to_line, |
| 1860 intptr_t to_column) const; | 1864 intptr_t to_column) const; |
| 1861 | 1865 |
| 1866 void SetLocationOffset(intptr_t line_offset, intptr_t col_offset) const; |
| 1867 |
| 1862 void GetTokenLocation(intptr_t token_pos, | 1868 void GetTokenLocation(intptr_t token_pos, |
| 1863 intptr_t* line, intptr_t* column) const; | 1869 intptr_t* line, intptr_t* column) const; |
| 1864 | 1870 |
| 1865 void TokenRangeAtLine(intptr_t line_number, | 1871 void TokenRangeAtLine(intptr_t line_number, |
| 1866 intptr_t* first_token_index, | 1872 intptr_t* first_token_index, |
| 1867 intptr_t* last_token_index) const; | 1873 intptr_t* last_token_index) const; |
| 1868 | 1874 |
| 1869 static intptr_t InstanceSize() { | 1875 static intptr_t InstanceSize() { |
| 1870 return RoundedAllocationSize(sizeof(RawScript)); | 1876 return RoundedAllocationSize(sizeof(RawScript)); |
| 1871 } | 1877 } |
| (...skipping 4372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6244 | 6250 |
| 6245 | 6251 |
| 6246 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, | 6252 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, |
| 6247 intptr_t index) { | 6253 intptr_t index) { |
| 6248 return array.At((index * kEntryLength) + kTargetFunctionIndex); | 6254 return array.At((index * kEntryLength) + kTargetFunctionIndex); |
| 6249 } | 6255 } |
| 6250 | 6256 |
| 6251 } // namespace dart | 6257 } // namespace dart |
| 6252 | 6258 |
| 6253 #endif // VM_OBJECT_H_ | 6259 #endif // VM_OBJECT_H_ |
| OLD | NEW |