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

Unified Diff: runtime/vm/deopt_instructions.cc

Issue 2039913006: DBC: Eager deoptimization and CheckSmi instruction. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Address comments Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/deopt_instructions.h ('k') | runtime/vm/flow_graph_compiler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/deopt_instructions.cc
diff --git a/runtime/vm/deopt_instructions.cc b/runtime/vm/deopt_instructions.cc
index 1839f7fae8a14eb760f594f2148744adb99bc4f8..ce668f4334b27b9c2a4a41dd03a5da0a0611b4f3 100644
--- a/runtime/vm/deopt_instructions.cc
+++ b/runtime/vm/deopt_instructions.cc
@@ -67,13 +67,17 @@ DeoptContext::DeoptContext(const StackFrame* frame,
// return-address. This section is copied as well, so that its contained
// values can be updated before returning to the deoptimized function.
// Note: on DBC stack grows upwards unlike on all other architectures.
+#if defined(TARGET_ARCH_DBC)
+ ASSERT(frame->sp() >= frame->fp());
+ const intptr_t frame_size = (frame->sp() - frame->fp()) / kWordSize;
+#else
+ ASSERT(frame->fp() >= frame->sp());
+ const intptr_t frame_size = (frame->fp() - frame->sp()) / kWordSize;
+#endif
+
source_frame_size_ =
+ kDartFrameFixedSize // For saved values below sp.
-#if !defined(TARGET_ARCH_DBC)
- + ((frame->fp() - frame->sp()) / kWordSize) // For frame size incl. sp.
-#else
- + ((frame->sp() - frame->fp()) / kWordSize) // For frame size incl. sp.
-#endif // !defined(TARGET_ARCH_DBC)
+ + frame_size // For frame size incl. sp.
+ 1 // For fp.
+ kParamEndSlotFromFp // For saved values above fp.
+ num_args_; // For arguments.
« no previous file with comments | « runtime/vm/deopt_instructions.h ('k') | runtime/vm/flow_graph_compiler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698