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 3600 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3611 return raw_ptr()->compile_time_constants_; | 3611 return raw_ptr()->compile_time_constants_; |
3612 } | 3612 } |
3613 void set_compile_time_constants(const Array& value) const; | 3613 void set_compile_time_constants(const Array& value) const; |
3614 | 3614 |
3615 const uint8_t* kernel_data() { return raw_ptr()->kernel_data_; } | 3615 const uint8_t* kernel_data() { return raw_ptr()->kernel_data_; } |
3616 void set_kernel_data(const uint8_t* kernel_data) const; | 3616 void set_kernel_data(const uint8_t* kernel_data) const; |
3617 | 3617 |
3618 intptr_t kernel_data_size() { return raw_ptr()->kernel_data_size_; } | 3618 intptr_t kernel_data_size() { return raw_ptr()->kernel_data_size_; } |
3619 void set_kernel_data_size(const intptr_t kernel_data_size) const; | 3619 void set_kernel_data_size(const intptr_t kernel_data_size) const; |
3620 | 3620 |
| 3621 intptr_t kernel_script_index() { return raw_ptr()->kernel_script_index_; } |
| 3622 void set_kernel_script_index(const intptr_t kernel_script_index) const; |
| 3623 |
3621 RawTypedData* kernel_string_offsets() const { | 3624 RawTypedData* kernel_string_offsets() const { |
3622 return raw_ptr()->kernel_string_offsets_; | 3625 return raw_ptr()->kernel_string_offsets_; |
3623 } | 3626 } |
3624 void set_kernel_string_offsets(const TypedData& offsets) const; | 3627 void set_kernel_string_offsets(const TypedData& offsets) const; |
3625 | 3628 |
3626 RawTypedData* kernel_string_data() const { | 3629 RawTypedData* kernel_string_data() const { |
3627 return raw_ptr()->kernel_string_data_; | 3630 return raw_ptr()->kernel_string_data_; |
3628 } | 3631 } |
3629 void set_kernel_string_data(const TypedData& data) const; | 3632 void set_kernel_string_data(const TypedData& data) const; |
3630 | 3633 |
3631 RawTypedData* kernel_canonical_names() const { | 3634 RawTypedData* kernel_canonical_names() const { |
3632 return raw_ptr()->kernel_canonical_names_; | 3635 return raw_ptr()->kernel_canonical_names_; |
3633 } | 3636 } |
3634 void set_kernel_canonical_names(const TypedData& names) const; | 3637 void set_kernel_canonical_names(const TypedData& names) const; |
3635 | 3638 |
3636 RawTokenStream* tokens() const { | 3639 RawTokenStream* tokens() const { |
3637 ASSERT(kind() != RawScript::kKernelTag); | 3640 ASSERT(kind() != RawScript::kKernelTag); |
3638 return raw_ptr()->tokens_; | 3641 return raw_ptr()->tokens_; |
3639 } | 3642 } |
3640 | 3643 |
3641 void set_line_starts(const Array& value) const; | 3644 void set_line_starts(const Array& value) const; |
3642 | 3645 |
3643 void set_debug_positions(const Array& value) const; | 3646 void set_debug_positions(const Array& value) const; |
3644 | 3647 |
3645 void set_yield_positions(const Array& value) const; | 3648 void set_yield_positions(const Array& value) const; |
3646 | 3649 |
3647 RawArray* yield_positions() const { return raw_ptr()->yield_positions_; } | 3650 RawArray* yield_positions() const; |
3648 | 3651 |
3649 void Tokenize(const String& private_key, bool use_shared_tokens = true) const; | 3652 void Tokenize(const String& private_key, bool use_shared_tokens = true) const; |
3650 | 3653 |
3651 RawLibrary* FindLibrary() const; | 3654 RawLibrary* FindLibrary() const; |
3652 RawString* GetLine(intptr_t line_number, | 3655 RawString* GetLine(intptr_t line_number, |
3653 Heap::Space space = Heap::kNew) const; | 3656 Heap::Space space = Heap::kNew) const; |
3654 RawString* GetSnippet(TokenPosition from, TokenPosition to) const; | 3657 RawString* GetSnippet(TokenPosition from, TokenPosition to) const; |
3655 RawString* GetSnippet(intptr_t from_line, | 3658 RawString* GetSnippet(intptr_t from_line, |
3656 intptr_t from_column, | 3659 intptr_t from_column, |
3657 intptr_t to_line, | 3660 intptr_t to_line, |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3689 const String& source, | 3692 const String& source, |
3690 RawScript::Kind kind); | 3693 RawScript::Kind kind); |
3691 | 3694 |
3692 private: | 3695 private: |
3693 void set_url(const String& value) const; | 3696 void set_url(const String& value) const; |
3694 void set_resolved_url(const String& value) const; | 3697 void set_resolved_url(const String& value) const; |
3695 void set_source(const String& value) const; | 3698 void set_source(const String& value) const; |
3696 void set_kind(RawScript::Kind value) const; | 3699 void set_kind(RawScript::Kind value) const; |
3697 void set_load_timestamp(int64_t value) const; | 3700 void set_load_timestamp(int64_t value) const; |
3698 void set_tokens(const TokenStream& value) const; | 3701 void set_tokens(const TokenStream& value) const; |
3699 RawArray* line_starts() const { return raw_ptr()->line_starts_; } | 3702 RawArray* line_starts() const; |
3700 RawArray* debug_positions() const { return raw_ptr()->debug_positions_; } | 3703 RawArray* debug_positions() const; |
3701 | 3704 |
3702 static RawScript* New(); | 3705 static RawScript* New(); |
3703 | 3706 |
3704 FINAL_HEAP_OBJECT_IMPLEMENTATION(Script, Object); | 3707 FINAL_HEAP_OBJECT_IMPLEMENTATION(Script, Object); |
3705 friend class Class; | 3708 friend class Class; |
3706 friend class Precompiler; | 3709 friend class Precompiler; |
3707 }; | 3710 }; |
3708 | 3711 |
3709 | 3712 |
3710 class DictionaryIterator : public ValueObject { | 3713 class DictionaryIterator : public ValueObject { |
(...skipping 5347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9058 | 9061 |
9059 inline void TypeArguments::SetHash(intptr_t value) const { | 9062 inline void TypeArguments::SetHash(intptr_t value) const { |
9060 // This is only safe because we create a new Smi, which does not cause | 9063 // This is only safe because we create a new Smi, which does not cause |
9061 // heap allocation. | 9064 // heap allocation. |
9062 StoreSmi(&raw_ptr()->hash_, Smi::New(value)); | 9065 StoreSmi(&raw_ptr()->hash_, Smi::New(value)); |
9063 } | 9066 } |
9064 | 9067 |
9065 } // namespace dart | 9068 } // namespace dart |
9066 | 9069 |
9067 #endif // RUNTIME_VM_OBJECT_H_ | 9070 #endif // RUNTIME_VM_OBJECT_H_ |
OLD | NEW |