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 4495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4506 public: | 4506 public: |
4507 static const intptr_t kInvalidPcOffset = 0; | 4507 static const intptr_t kInvalidPcOffset = 0; |
4508 | 4508 |
4509 intptr_t num_entries() const; | 4509 intptr_t num_entries() const; |
4510 | 4510 |
4511 void GetHandlerInfo(intptr_t try_index, ExceptionHandlerInfo* info) const; | 4511 void GetHandlerInfo(intptr_t try_index, ExceptionHandlerInfo* info) const; |
4512 | 4512 |
4513 uword HandlerPCOffset(intptr_t try_index) const; | 4513 uword HandlerPCOffset(intptr_t try_index) const; |
4514 intptr_t OuterTryIndex(intptr_t try_index) const; | 4514 intptr_t OuterTryIndex(intptr_t try_index) const; |
4515 bool NeedsStackTrace(intptr_t try_index) const; | 4515 bool NeedsStackTrace(intptr_t try_index) const; |
| 4516 bool IsGenerated(intptr_t try_index) const; |
4516 | 4517 |
4517 void SetHandlerInfo(intptr_t try_index, | 4518 void SetHandlerInfo(intptr_t try_index, |
4518 intptr_t outer_try_index, | 4519 intptr_t outer_try_index, |
4519 uword handler_pc_offset, | 4520 uword handler_pc_offset, |
4520 bool needs_stacktrace, | 4521 bool needs_stacktrace, |
4521 bool has_catch_all) const; | 4522 bool has_catch_all, |
| 4523 TokenPosition token_pos, |
| 4524 bool is_generated) const; |
4522 | 4525 |
4523 RawArray* GetHandledTypes(intptr_t try_index) const; | 4526 RawArray* GetHandledTypes(intptr_t try_index) const; |
4524 void SetHandledTypes(intptr_t try_index, const Array& handled_types) const; | 4527 void SetHandledTypes(intptr_t try_index, const Array& handled_types) const; |
4525 bool HasCatchAll(intptr_t try_index) const; | 4528 bool HasCatchAll(intptr_t try_index) const; |
4526 | 4529 |
4527 static intptr_t InstanceSize() { | 4530 static intptr_t InstanceSize() { |
4528 ASSERT(sizeof(RawExceptionHandlers) == | 4531 ASSERT(sizeof(RawExceptionHandlers) == |
4529 OFFSET_OF_RETURNED_VALUE(RawExceptionHandlers, data)); | 4532 OFFSET_OF_RETURNED_VALUE(RawExceptionHandlers, data)); |
4530 return 0; | 4533 return 0; |
4531 } | 4534 } |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4675 | 4678 |
4676 RawCodeSourceMap* code_source_map() const { | 4679 RawCodeSourceMap* code_source_map() const { |
4677 return raw_ptr()->code_source_map_; | 4680 return raw_ptr()->code_source_map_; |
4678 } | 4681 } |
4679 | 4682 |
4680 void set_code_source_map(const CodeSourceMap& code_source_map) const { | 4683 void set_code_source_map(const CodeSourceMap& code_source_map) const { |
4681 ASSERT(code_source_map.IsOld()); | 4684 ASSERT(code_source_map.IsOld()); |
4682 StorePointer(&raw_ptr()->code_source_map_, code_source_map.raw()); | 4685 StorePointer(&raw_ptr()->code_source_map_, code_source_map.raw()); |
4683 } | 4686 } |
4684 | 4687 |
| 4688 RawArray* await_token_positions() const { |
| 4689 #if defined(DART_PRECOMPILED_RUNTIME) |
| 4690 return Array::null(); |
| 4691 #else |
| 4692 return raw_ptr()->await_token_positions_; |
| 4693 #endif |
| 4694 } |
| 4695 |
| 4696 void SetAwaitTokenPositions(const Array& await_token_positions) const; |
| 4697 |
4685 // Used during reloading (see object_reload.cc). Calls Reset on all ICDatas | 4698 // Used during reloading (see object_reload.cc). Calls Reset on all ICDatas |
4686 // that are embedded inside the Code object. | 4699 // that are embedded inside the Code object. |
4687 void ResetICDatas(Zone* zone) const; | 4700 void ResetICDatas(Zone* zone) const; |
4688 | 4701 |
4689 // Array of DeoptInfo objects. | 4702 // Array of DeoptInfo objects. |
4690 RawArray* deopt_info_array() const { | 4703 RawArray* deopt_info_array() const { |
4691 #if defined(DART_PRECOMPILED_RUNTIME) | 4704 #if defined(DART_PRECOMPILED_RUNTIME) |
4692 UNREACHABLE(); | 4705 UNREACHABLE(); |
4693 return NULL; | 4706 return NULL; |
4694 #else | 4707 #else |
(...skipping 4216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8911 | 8924 |
8912 inline void TypeArguments::SetHash(intptr_t value) const { | 8925 inline void TypeArguments::SetHash(intptr_t value) const { |
8913 // This is only safe because we create a new Smi, which does not cause | 8926 // This is only safe because we create a new Smi, which does not cause |
8914 // heap allocation. | 8927 // heap allocation. |
8915 StoreSmi(&raw_ptr()->hash_, Smi::New(value)); | 8928 StoreSmi(&raw_ptr()->hash_, Smi::New(value)); |
8916 } | 8929 } |
8917 | 8930 |
8918 } // namespace dart | 8931 } // namespace dart |
8919 | 8932 |
8920 #endif // RUNTIME_VM_OBJECT_H_ | 8933 #endif // RUNTIME_VM_OBJECT_H_ |
OLD | NEW |