| 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 1425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1436 }; | 1436 }; |
| 1437 | 1437 |
| 1438 | 1438 |
| 1439 class Function : public Object { | 1439 class Function : public Object { |
| 1440 public: | 1440 public: |
| 1441 RawString* name() const { return raw_ptr()->name_; } | 1441 RawString* name() const { return raw_ptr()->name_; } |
| 1442 RawString* UserVisibleName() const; | 1442 RawString* UserVisibleName() const; |
| 1443 RawString* QualifiedUserVisibleName() const; | 1443 RawString* QualifiedUserVisibleName() const; |
| 1444 virtual RawString* DictionaryName() const { return name(); } | 1444 virtual RawString* DictionaryName() const { return name(); } |
| 1445 | 1445 |
| 1446 RawString* GetSource(); |
| 1447 |
| 1446 // Build a string of the form 'C<T, R>(T, {b: B, c: C}) => R' representing the | 1448 // Build a string of the form 'C<T, R>(T, {b: B, c: C}) => R' representing the |
| 1447 // internal signature of the given function. In this example, T and R are | 1449 // internal signature of the given function. In this example, T and R are |
| 1448 // type parameters of class C, the owner of the function. | 1450 // type parameters of class C, the owner of the function. |
| 1449 RawString* Signature() const { | 1451 RawString* Signature() const { |
| 1450 const bool instantiate = false; | 1452 const bool instantiate = false; |
| 1451 return BuildSignature(instantiate, kInternalName, TypeArguments::Handle()); | 1453 return BuildSignature(instantiate, kInternalName, TypeArguments::Handle()); |
| 1452 } | 1454 } |
| 1453 | 1455 |
| 1454 // Build a string of the form '(T, {b: B, c: C}) => R' representing the | 1456 // Build a string of the form '(T, {b: B, c: C}) => R' representing the |
| 1455 // user visible signature of the given function. In this example, T and R are | 1457 // user visible signature of the given function. In this example, T and R are |
| (...skipping 905 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2361 return static_cast<RawScript::Kind>(raw_ptr()->kind_); | 2363 return static_cast<RawScript::Kind>(raw_ptr()->kind_); |
| 2362 } | 2364 } |
| 2363 intptr_t line_offset() const { return raw_ptr()->line_offset_; } | 2365 intptr_t line_offset() const { return raw_ptr()->line_offset_; } |
| 2364 intptr_t col_offset() const { return raw_ptr()->col_offset_; } | 2366 intptr_t col_offset() const { return raw_ptr()->col_offset_; } |
| 2365 | 2367 |
| 2366 RawTokenStream* tokens() const { return raw_ptr()->tokens_; } | 2368 RawTokenStream* tokens() const { return raw_ptr()->tokens_; } |
| 2367 | 2369 |
| 2368 void Tokenize(const String& private_key) const; | 2370 void Tokenize(const String& private_key) const; |
| 2369 | 2371 |
| 2370 RawString* GetLine(intptr_t line_number) const; | 2372 RawString* GetLine(intptr_t line_number) const; |
| 2371 | 2373 RawString* GetSnippet(intptr_t from_token_pos, |
| 2374 intptr_t to_token_pos) const; |
| 2372 RawString* GetSnippet(intptr_t from_line, | 2375 RawString* GetSnippet(intptr_t from_line, |
| 2373 intptr_t from_column, | 2376 intptr_t from_column, |
| 2374 intptr_t to_line, | 2377 intptr_t to_line, |
| 2375 intptr_t to_column) const; | 2378 intptr_t to_column) const; |
| 2376 | 2379 |
| 2377 void SetLocationOffset(intptr_t line_offset, intptr_t col_offset) const; | 2380 void SetLocationOffset(intptr_t line_offset, intptr_t col_offset) const; |
| 2378 | 2381 |
| 2379 void GetTokenLocation(intptr_t token_pos, | 2382 void GetTokenLocation(intptr_t token_pos, |
| 2380 intptr_t* line, intptr_t* column) const; | 2383 intptr_t* line, intptr_t* column) const; |
| 2381 | 2384 |
| (...skipping 4005 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6387 | 6390 |
| 6388 | 6391 |
| 6389 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, | 6392 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, |
| 6390 intptr_t index) { | 6393 intptr_t index) { |
| 6391 return array.At((index * kEntryLength) + kTargetFunctionIndex); | 6394 return array.At((index * kEntryLength) + kTargetFunctionIndex); |
| 6392 } | 6395 } |
| 6393 | 6396 |
| 6394 } // namespace dart | 6397 } // namespace dart |
| 6395 | 6398 |
| 6396 #endif // VM_OBJECT_H_ | 6399 #endif // VM_OBJECT_H_ |
| OLD | NEW |