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 RUNTIME_VM_OBJECT_H_ | 5 #ifndef RUNTIME_VM_OBJECT_H_ |
6 #define RUNTIME_VM_OBJECT_H_ | 6 #define RUNTIME_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 3539 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3550 } | 3550 } |
3551 void set_compile_time_constants(const Array& value) const; | 3551 void set_compile_time_constants(const Array& value) const; |
3552 | 3552 |
3553 RawTokenStream* tokens() const { | 3553 RawTokenStream* tokens() const { |
3554 ASSERT(kind() != RawScript::kKernelTag); | 3554 ASSERT(kind() != RawScript::kKernelTag); |
3555 return raw_ptr()->tokens_; | 3555 return raw_ptr()->tokens_; |
3556 } | 3556 } |
3557 | 3557 |
3558 void set_line_starts(const Array& value) const; | 3558 void set_line_starts(const Array& value) const; |
3559 | 3559 |
| 3560 void set_debug_positions(const Array& value) const; |
| 3561 |
| 3562 void set_yield_positions(const Array& value) const; |
| 3563 |
| 3564 RawArray* yield_positions() const { return raw_ptr()->yield_positions_; } |
| 3565 |
3560 void Tokenize(const String& private_key, bool use_shared_tokens = true) const; | 3566 void Tokenize(const String& private_key, bool use_shared_tokens = true) const; |
3561 | 3567 |
3562 RawLibrary* FindLibrary() const; | 3568 RawLibrary* FindLibrary() const; |
3563 RawString* GetLine(intptr_t line_number, | 3569 RawString* GetLine(intptr_t line_number, |
3564 Heap::Space space = Heap::kNew) const; | 3570 Heap::Space space = Heap::kNew) const; |
3565 RawString* GetSnippet(TokenPosition from, TokenPosition to) const; | 3571 RawString* GetSnippet(TokenPosition from, TokenPosition to) const; |
3566 RawString* GetSnippet(intptr_t from_line, | 3572 RawString* GetSnippet(intptr_t from_line, |
3567 intptr_t from_column, | 3573 intptr_t from_column, |
3568 intptr_t to_line, | 3574 intptr_t to_line, |
3569 intptr_t to_column) const; | 3575 intptr_t to_column) const; |
(...skipping 30 matching lines...) Expand all Loading... |
3600 RawScript::Kind kind); | 3606 RawScript::Kind kind); |
3601 | 3607 |
3602 private: | 3608 private: |
3603 void set_url(const String& value) const; | 3609 void set_url(const String& value) const; |
3604 void set_resolved_url(const String& value) const; | 3610 void set_resolved_url(const String& value) const; |
3605 void set_source(const String& value) const; | 3611 void set_source(const String& value) const; |
3606 void set_kind(RawScript::Kind value) const; | 3612 void set_kind(RawScript::Kind value) const; |
3607 void set_load_timestamp(int64_t value) const; | 3613 void set_load_timestamp(int64_t value) const; |
3608 void set_tokens(const TokenStream& value) const; | 3614 void set_tokens(const TokenStream& value) const; |
3609 RawArray* line_starts() const { return raw_ptr()->line_starts_; } | 3615 RawArray* line_starts() const { return raw_ptr()->line_starts_; } |
| 3616 RawArray* debug_positions() const { return raw_ptr()->debug_positions_; } |
3610 | 3617 |
3611 static RawScript* New(); | 3618 static RawScript* New(); |
3612 | 3619 |
3613 FINAL_HEAP_OBJECT_IMPLEMENTATION(Script, Object); | 3620 FINAL_HEAP_OBJECT_IMPLEMENTATION(Script, Object); |
3614 friend class Class; | 3621 friend class Class; |
3615 friend class Precompiler; | 3622 friend class Precompiler; |
3616 }; | 3623 }; |
3617 | 3624 |
3618 | 3625 |
3619 class DictionaryIterator : public ValueObject { | 3626 class DictionaryIterator : public ValueObject { |
(...skipping 5329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8949 | 8956 |
8950 inline void TypeArguments::SetHash(intptr_t value) const { | 8957 inline void TypeArguments::SetHash(intptr_t value) const { |
8951 // This is only safe because we create a new Smi, which does not cause | 8958 // This is only safe because we create a new Smi, which does not cause |
8952 // heap allocation. | 8959 // heap allocation. |
8953 StoreSmi(&raw_ptr()->hash_, Smi::New(value)); | 8960 StoreSmi(&raw_ptr()->hash_, Smi::New(value)); |
8954 } | 8961 } |
8955 | 8962 |
8956 } // namespace dart | 8963 } // namespace dart |
8957 | 8964 |
8958 #endif // RUNTIME_VM_OBJECT_H_ | 8965 #endif // RUNTIME_VM_OBJECT_H_ |
OLD | NEW |