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 4676 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4687 bool HasBreakpoint() const; | 4687 bool HasBreakpoint() const; |
4688 | 4688 |
4689 RawPcDescriptors* pc_descriptors() const { | 4689 RawPcDescriptors* pc_descriptors() const { |
4690 return raw_ptr()->pc_descriptors_; | 4690 return raw_ptr()->pc_descriptors_; |
4691 } | 4691 } |
4692 void set_pc_descriptors(const PcDescriptors& descriptors) const { | 4692 void set_pc_descriptors(const PcDescriptors& descriptors) const { |
4693 ASSERT(descriptors.IsOld()); | 4693 ASSERT(descriptors.IsOld()); |
4694 StorePointer(&raw_ptr()->pc_descriptors_, descriptors.raw()); | 4694 StorePointer(&raw_ptr()->pc_descriptors_, descriptors.raw()); |
4695 } | 4695 } |
4696 | 4696 |
| 4697 RawArray* await_token_positions() const { |
| 4698 #if defined(DART_PRECOMPILED_RUNTIME) |
| 4699 return CodeSourceMap::null(); |
| 4700 #else |
| 4701 return raw_ptr()->await_token_positions_; |
| 4702 #endif |
| 4703 } |
| 4704 |
| 4705 void SetAwaitTokenPositions(const Array& await_token_positions) const; |
| 4706 |
4697 RawCodeSourceMap* code_source_map() const { | 4707 RawCodeSourceMap* code_source_map() const { |
4698 #if defined(DART_PRECOMPILED_RUNTIME) | 4708 #if defined(DART_PRECOMPILED_RUNTIME) |
4699 return CodeSourceMap::null(); | 4709 return CodeSourceMap::null(); |
4700 #else | 4710 #else |
4701 return raw_ptr()->code_source_map_; | 4711 return raw_ptr()->code_source_map_; |
4702 #endif | 4712 #endif |
4703 } | 4713 } |
4704 | 4714 |
4705 void set_code_source_map(const CodeSourceMap& code_source_map) const { | 4715 void set_code_source_map(const CodeSourceMap& code_source_map) const { |
4706 #if defined(DART_PRECOMPILED_RUNTIME) | 4716 #if defined(DART_PRECOMPILED_RUNTIME) |
(...skipping 3721 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8428 | 8438 |
8429 // Internal stacktrace object used in exceptions for printing stack traces. | 8439 // Internal stacktrace object used in exceptions for printing stack traces. |
8430 class StackTrace : public Instance { | 8440 class StackTrace : public Instance { |
8431 public: | 8441 public: |
8432 static const int kPreallocatedStackdepth = 30; | 8442 static const int kPreallocatedStackdepth = 30; |
8433 | 8443 |
8434 intptr_t Length() const; | 8444 intptr_t Length() const; |
8435 | 8445 |
8436 RawFunction* FunctionAtFrame(intptr_t frame_index) const; | 8446 RawFunction* FunctionAtFrame(intptr_t frame_index) const; |
8437 | 8447 |
| 8448 RawArray* code_array() const { return raw_ptr()->code_array_; } |
8438 RawCode* CodeAtFrame(intptr_t frame_index) const; | 8449 RawCode* CodeAtFrame(intptr_t frame_index) const; |
8439 void SetCodeAtFrame(intptr_t frame_index, const Code& code) const; | 8450 void SetCodeAtFrame(intptr_t frame_index, const Code& code) const; |
8440 | 8451 |
| 8452 RawArray* pc_offset_array() const { return raw_ptr()->pc_offset_array_; } |
8441 RawSmi* PcOffsetAtFrame(intptr_t frame_index) const; | 8453 RawSmi* PcOffsetAtFrame(intptr_t frame_index) const; |
8442 void SetPcOffsetAtFrame(intptr_t frame_index, const Smi& pc_offset) const; | 8454 void SetPcOffsetAtFrame(intptr_t frame_index, const Smi& pc_offset) const; |
8443 void set_expand_inlined(bool value) const; | 8455 void set_expand_inlined(bool value) const; |
8444 | 8456 |
8445 static intptr_t InstanceSize() { | 8457 static intptr_t InstanceSize() { |
8446 return RoundedAllocationSize(sizeof(RawStackTrace)); | 8458 return RoundedAllocationSize(sizeof(RawStackTrace)); |
8447 } | 8459 } |
8448 static RawStackTrace* New(const Array& code_array, | 8460 static RawStackTrace* New(const Array& code_array, |
8449 const Array& pc_offset_array, | 8461 const Array& pc_offset_array, |
8450 Heap::Space space = Heap::kNew); | 8462 Heap::Space space = Heap::kNew); |
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8938 | 8950 |
8939 inline void TypeArguments::SetHash(intptr_t value) const { | 8951 inline void TypeArguments::SetHash(intptr_t value) const { |
8940 // This is only safe because we create a new Smi, which does not cause | 8952 // This is only safe because we create a new Smi, which does not cause |
8941 // heap allocation. | 8953 // heap allocation. |
8942 StoreSmi(&raw_ptr()->hash_, Smi::New(value)); | 8954 StoreSmi(&raw_ptr()->hash_, Smi::New(value)); |
8943 } | 8955 } |
8944 | 8956 |
8945 } // namespace dart | 8957 } // namespace dart |
8946 | 8958 |
8947 #endif // RUNTIME_VM_OBJECT_H_ | 8959 #endif // RUNTIME_VM_OBJECT_H_ |
OLD | NEW |