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

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: Cleanup 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
Index: runtime/vm/deopt_instructions.cc
diff --git a/runtime/vm/deopt_instructions.cc b/runtime/vm/deopt_instructions.cc
index 1839f7fae8a14eb760f594f2148744adb99bc4f8..7594a16f947944928dbd57a6c8c1e20c5d01d0fa 100644
--- a/runtime/vm/deopt_instructions.cc
+++ b/runtime/vm/deopt_instructions.cc
@@ -67,13 +67,19 @@ 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.
+ const intptr_t frame_size =
+#if defined(TARGET_ARCH_DBC)
+ (static_cast<intptr_t>(frame->sp()) -
Vyacheslav Egorov (Google) 2016/06/09 15:09:06 I don't think these casts are needed really, they
zra 2016/06/09 16:42:23 Done.
+ static_cast<intptr_t>(frame->fp())) / kWordSize;
+#else
+ (static_cast<intptr_t>(frame->fp()) -
+ static_cast<intptr_t>(frame->sp())) / kWordSize;
+#endif
+ ASSERT(frame_size >= 0);
+
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.

Powered by Google App Engine
This is Rietveld 408576698