Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(128)

Side by Side Diff: runtime/vm/object.h

Issue 2374273002: Fix a throw returning to a frame marked for lazy deopt that captures the stacktrace. (Closed)
Patch Set: . Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « runtime/vm/flow_graph_compiler_x64.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 VM_OBJECT_H_ 5 #ifndef VM_OBJECT_H_
6 #define VM_OBJECT_H_ 6 #define 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 4904 matching lines...) Expand 10 before | Expand all | Expand 10 after
4915 int32_t GetPointerOffsetAt(int index) const { 4915 int32_t GetPointerOffsetAt(int index) const {
4916 NoSafepointScope no_safepoint; 4916 NoSafepointScope no_safepoint;
4917 return *PointerOffsetAddrAt(index); 4917 return *PointerOffsetAddrAt(index);
4918 } 4918 }
4919 TokenPosition GetTokenIndexOfPC(uword pc) const; 4919 TokenPosition GetTokenIndexOfPC(uword pc) const;
4920 4920
4921 enum { 4921 enum {
4922 kInvalidPc = -1 4922 kInvalidPc = -1
4923 }; 4923 };
4924 4924
4925 uword GetLazyDeoptPc() const; 4925 uword GetLazyDeoptReturnPc() const;
4926 uword GetLazyDeoptThrowPc() const;
4926 4927
4927 // Find pc, return 0 if not found. 4928 // Find pc, return 0 if not found.
4928 uword GetPcForDeoptId(intptr_t deopt_id, RawPcDescriptors::Kind kind) const; 4929 uword GetPcForDeoptId(intptr_t deopt_id, RawPcDescriptors::Kind kind) const;
4929 intptr_t GetDeoptIdForOsr(uword pc) const; 4930 intptr_t GetDeoptIdForOsr(uword pc) const;
4930 4931
4931 const char* Name() const; 4932 const char* Name() const;
4932 const char* QualifiedName() const; 4933 const char* QualifiedName() const;
4933 4934
4934 int64_t compile_timestamp() const { 4935 int64_t compile_timestamp() const {
4935 #if defined(DART_PRECOMPILED_RUNTIME) 4936 #if defined(DART_PRECOMPILED_RUNTIME)
4936 return 0; 4937 return 0;
4937 #else 4938 #else
4938 return raw_ptr()->compile_timestamp_; 4939 return raw_ptr()->compile_timestamp_;
4939 #endif 4940 #endif
4940 } 4941 }
4941 4942
4942 intptr_t lazy_deopt_pc_offset() const { 4943 intptr_t lazy_deopt_return_pc_offset() const {
4943 #if defined(DART_PRECOMPILED_RUNTIME) 4944 #if defined(DART_PRECOMPILED_RUNTIME)
4944 return 0; 4945 return 0;
4945 #else 4946 #else
4946 return raw_ptr()->lazy_deopt_pc_offset_; 4947 return raw_ptr()->lazy_deopt_return_pc_offset_;
4947 #endif 4948 #endif
4948 } 4949 }
4949 void set_lazy_deopt_pc_offset(intptr_t pc) const { 4950 void set_lazy_deopt_return_pc_offset(intptr_t pc) const {
4950 #if defined(DART_PRECOMPILED_RUNTIME) 4951 #if defined(DART_PRECOMPILED_RUNTIME)
4951 UNREACHABLE(); 4952 UNREACHABLE();
4952 #else 4953 #else
4953 StoreNonPointer(&raw_ptr()->lazy_deopt_pc_offset_, pc); 4954 StoreNonPointer(&raw_ptr()->lazy_deopt_return_pc_offset_, pc);
4955 #endif
4956 }
4957 intptr_t lazy_deopt_throw_pc_offset() const {
4958 #if defined(DART_PRECOMPILED_RUNTIME)
4959 return 0;
4960 #else
4961 return raw_ptr()->lazy_deopt_throw_pc_offset_;
4962 #endif
4963 }
4964 void set_lazy_deopt_throw_pc_offset(intptr_t pc) const {
4965 #if defined(DART_PRECOMPILED_RUNTIME)
4966 UNREACHABLE();
4967 #else
4968 StoreNonPointer(&raw_ptr()->lazy_deopt_throw_pc_offset_, pc);
4954 #endif 4969 #endif
4955 } 4970 }
4956 4971
4957 bool IsAllocationStubCode() const; 4972 bool IsAllocationStubCode() const;
4958 bool IsStubCode() const; 4973 bool IsStubCode() const;
4959 bool IsFunctionCode() const; 4974 bool IsFunctionCode() const;
4960 4975
4961 void DisableDartCode() const; 4976 void DisableDartCode() const;
4962 4977
4963 void DisableStubCode() const; 4978 void DisableStubCode() const;
(...skipping 4035 matching lines...) Expand 10 before | Expand all | Expand 10 after
8999 9014
9000 inline void TypeArguments::SetHash(intptr_t value) const { 9015 inline void TypeArguments::SetHash(intptr_t value) const {
9001 // This is only safe because we create a new Smi, which does not cause 9016 // This is only safe because we create a new Smi, which does not cause
9002 // heap allocation. 9017 // heap allocation.
9003 StoreSmi(&raw_ptr()->hash_, Smi::New(value)); 9018 StoreSmi(&raw_ptr()->hash_, Smi::New(value));
9004 } 9019 }
9005 9020
9006 } // namespace dart 9021 } // namespace dart
9007 9022
9008 #endif // VM_OBJECT_H_ 9023 #endif // VM_OBJECT_H_
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_compiler_x64.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698