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

Unified Diff: runtime/vm/debugger.cc

Issue 1858283002: Initial SIMDBC interpreter. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: cleanup Created 4 years, 8 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/debugger.cc
diff --git a/runtime/vm/debugger.cc b/runtime/vm/debugger.cc
index 27390069321f44d3c78c0328480ff75f9b99a2ea..d2ee9d1d7509bc98999e8efef966acf47ba8def9 100644
--- a/runtime/vm/debugger.cc
+++ b/runtime/vm/debugger.cc
@@ -231,7 +231,9 @@ void Breakpoint::PrintJSON(JSONStream* stream) {
void CodeBreakpoint::VisitObjectPointers(ObjectPointerVisitor* visitor) {
visitor->VisitPointer(reinterpret_cast<RawObject**>(&code_));
+#if !defined(TARGET_ARCH_DBC)
visitor->VisitPointer(reinterpret_cast<RawObject**>(&saved_value_));
+#endif
}
@@ -859,6 +861,11 @@ intptr_t ActivationFrame::NumLocalVariables() {
}
+DART_FORCE_INLINE static RawObject* GetVariableValue(uword addr) {
+ return *reinterpret_cast<RawObject**>(addr);
+}
+
+
RawObject* ActivationFrame::GetParameter(intptr_t index) {
intptr_t num_parameters = function().num_fixed_parameters();
ASSERT(0 <= index && index < num_parameters);
@@ -869,14 +876,9 @@ RawObject* ActivationFrame::GetParameter(intptr_t index) {
// can be in a number of places in the caller's frame depending on how many
// were actually supplied at the call site, but they are copied to a fixed
// place in the callee's frame.
- uword var_address = fp() + ((kFirstLocalSlotFromFp - index) * kWordSize);
- return reinterpret_cast<RawObject*>(
- *reinterpret_cast<uword*>(var_address));
+ return GetVariableValue(LocalVarAddress(fp(), -(index + 1)));
} else {
- uword var_address = fp() + (kParamEndSlotFromFp * kWordSize)
- + (reverse_index * kWordSize);
- return reinterpret_cast<RawObject*>(
- *reinterpret_cast<uword*>(var_address));
+ return GetVariableValue(ParamAddress(fp(), reverse_index));
}
}
@@ -889,9 +891,7 @@ RawObject* ActivationFrame::GetClosure() {
RawObject* ActivationFrame::GetStackVar(intptr_t slot_index) {
if (deopt_frame_.IsNull()) {
- uword var_address = fp() + slot_index * kWordSize;
- return reinterpret_cast<RawObject*>(
- *reinterpret_cast<uword*>(var_address));
+ return GetVariableValue(LocalVarAddress(fp(), slot_index));
} else {
return deopt_frame_.At(deopt_frame_offset_ + slot_index);
}
@@ -1169,7 +1169,12 @@ CodeBreakpoint::CodeBreakpoint(const Code& code,
bpt_location_(NULL),
next_(NULL),
breakpoint_kind_(kind),
- saved_value_(Code::null()) {
+#if !defined(TARGET_ARCH_DBC)
+ saved_value_(Code::null())
+#else
+ saved_value_(Bytecode::kTrap)
+#endif
+ {
ASSERT(!code.IsNull());
ASSERT(token_pos_.IsReal());
ASSERT(pc_ != 0);
@@ -2690,11 +2695,11 @@ RawError* Debugger::DebuggerStepCallback() {
if (stepping_fp_ != 0) {
// There is an "interesting frame" set. Only pause at appropriate
// locations in this frame.
- if (stepping_fp_ > frame->fp()) {
+ if (IsCalleeFrameOf(stepping_fp_, frame->fp())) {
// We are i n a callee of the frame we're interested in.
// Ignore this stepping break.
return Error::null();
- } else if (frame->fp() > stepping_fp_) {
+ } else if (IsCalleeFrameOf(frame->fp(), stepping_fp_)) {
// We returned from the "interesting frame", there can be no more
// stepping breaks for it. Pause at the next appropriate location
// and let the user set the "interesting" frame again.

Powered by Google App Engine
This is Rietveld 408576698