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