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

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

Issue 2380403003: Lazy deopt without code patching. (Closed)
Patch Set: remove tracing register assignment 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/isolate.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 4900 matching lines...) Expand 10 before | Expand all | Expand 10 after
4911 static RawCode* LookupCode(uword pc); 4911 static RawCode* LookupCode(uword pc);
4912 static RawCode* LookupCodeInVmIsolate(uword pc); 4912 static RawCode* LookupCodeInVmIsolate(uword pc);
4913 static RawCode* FindCode(uword pc, int64_t timestamp); 4913 static RawCode* FindCode(uword pc, int64_t timestamp);
4914 4914
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 {
4922 kInvalidPc = -1
4923 };
4924
4925 uword GetLazyDeoptReturnPc() const;
4926 uword GetLazyDeoptThrowPc() const;
4927
4928 // Find pc, return 0 if not found. 4921 // Find pc, return 0 if not found.
4929 uword GetPcForDeoptId(intptr_t deopt_id, RawPcDescriptors::Kind kind) const; 4922 uword GetPcForDeoptId(intptr_t deopt_id, RawPcDescriptors::Kind kind) const;
4930 intptr_t GetDeoptIdForOsr(uword pc) const; 4923 intptr_t GetDeoptIdForOsr(uword pc) const;
4931 4924
4932 const char* Name() const; 4925 const char* Name() const;
4933 const char* QualifiedName() const; 4926 const char* QualifiedName() const;
4934 4927
4935 int64_t compile_timestamp() const { 4928 int64_t compile_timestamp() const {
4936 #if defined(DART_PRECOMPILED_RUNTIME) 4929 #if defined(DART_PRECOMPILED_RUNTIME)
4937 return 0; 4930 return 0;
4938 #else 4931 #else
4939 return raw_ptr()->compile_timestamp_; 4932 return raw_ptr()->compile_timestamp_;
4940 #endif 4933 #endif
4941 } 4934 }
4942 4935
4943 intptr_t lazy_deopt_return_pc_offset() const {
4944 #if defined(DART_PRECOMPILED_RUNTIME)
4945 return 0;
4946 #else
4947 return raw_ptr()->lazy_deopt_return_pc_offset_;
4948 #endif
4949 }
4950 void set_lazy_deopt_return_pc_offset(intptr_t pc) const {
4951 #if defined(DART_PRECOMPILED_RUNTIME)
4952 UNREACHABLE();
4953 #else
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);
4969 #endif
4970 }
4971
4972 bool IsAllocationStubCode() const; 4936 bool IsAllocationStubCode() const;
4973 bool IsStubCode() const; 4937 bool IsStubCode() const;
4974 bool IsFunctionCode() const; 4938 bool IsFunctionCode() const;
4975 4939
4976 void DisableDartCode() const; 4940 void DisableDartCode() const;
4977 4941
4978 void DisableStubCode() const; 4942 void DisableStubCode() const;
4979 4943
4980 void Enable() const { 4944 void Enable() const {
4981 if (!IsDisabled()) return; 4945 if (!IsDisabled()) return;
(...skipping 4032 matching lines...) Expand 10 before | Expand all | Expand 10 after
9014 8978
9015 inline void TypeArguments::SetHash(intptr_t value) const { 8979 inline void TypeArguments::SetHash(intptr_t value) const {
9016 // This is only safe because we create a new Smi, which does not cause 8980 // This is only safe because we create a new Smi, which does not cause
9017 // heap allocation. 8981 // heap allocation.
9018 StoreSmi(&raw_ptr()->hash_, Smi::New(value)); 8982 StoreSmi(&raw_ptr()->hash_, Smi::New(value));
9019 } 8983 }
9020 8984
9021 } // namespace dart 8985 } // namespace dart
9022 8986
9023 #endif // VM_OBJECT_H_ 8987 #endif // VM_OBJECT_H_
OLDNEW
« no previous file with comments | « runtime/vm/isolate.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698