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