| 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 2380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2391 friend class Class; | 2391 friend class Class; |
| 2392 }; | 2392 }; |
| 2393 | 2393 |
| 2394 | 2394 |
| 2395 class Script : public Object { | 2395 class Script : public Object { |
| 2396 public: | 2396 public: |
| 2397 RawString* url() const { return raw_ptr()->url_; } | 2397 RawString* url() const { return raw_ptr()->url_; } |
| 2398 bool HasSource() const; | 2398 bool HasSource() const; |
| 2399 RawString* Source() const; | 2399 RawString* Source() const; |
| 2400 RawString* GenerateSource() const; // Generates source code from Tokenstream. | 2400 RawString* GenerateSource() const; // Generates source code from Tokenstream. |
| 2401 RawGrowableObjectArray* GenerateLineNumberArray() const; |
| 2401 RawScript::Kind kind() const { | 2402 RawScript::Kind kind() const { |
| 2402 return static_cast<RawScript::Kind>(raw_ptr()->kind_); | 2403 return static_cast<RawScript::Kind>(raw_ptr()->kind_); |
| 2403 } | 2404 } |
| 2404 const char* GetKindAsCString() const; | 2405 const char* GetKindAsCString() const; |
| 2405 intptr_t line_offset() const { return raw_ptr()->line_offset_; } | 2406 intptr_t line_offset() const { return raw_ptr()->line_offset_; } |
| 2406 intptr_t col_offset() const { return raw_ptr()->col_offset_; } | 2407 intptr_t col_offset() const { return raw_ptr()->col_offset_; } |
| 2407 | 2408 |
| 2408 RawTokenStream* tokens() const { return raw_ptr()->tokens_; } | 2409 RawTokenStream* tokens() const { return raw_ptr()->tokens_; } |
| 2409 | 2410 |
| 2410 void Tokenize(const String& private_key) const; | 2411 void Tokenize(const String& private_key) const; |
| (...skipping 4383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6794 | 6795 |
| 6795 | 6796 |
| 6796 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, | 6797 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, |
| 6797 intptr_t index) { | 6798 intptr_t index) { |
| 6798 return array.At((index * kEntryLength) + kTargetFunctionIndex); | 6799 return array.At((index * kEntryLength) + kTargetFunctionIndex); |
| 6799 } | 6800 } |
| 6800 | 6801 |
| 6801 } // namespace dart | 6802 } // namespace dart |
| 6802 | 6803 |
| 6803 #endif // VM_OBJECT_H_ | 6804 #endif // VM_OBJECT_H_ |
| OLD | NEW |