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

Unified Diff: runtime/vm/stack_frame.h

Issue 1858283002: Initial SIMDBC interpreter. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: address comments 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/stack_frame.h
diff --git a/runtime/vm/stack_frame.h b/runtime/vm/stack_frame.h
index 2d1b12c2f2e7967c0c53c01026d4d88cc9e125e6..1a1d7383f02e45d9f80147eeddd413e859935a2d 100644
--- a/runtime/vm/stack_frame.h
+++ b/runtime/vm/stack_frame.h
@@ -19,6 +19,8 @@
#include "vm/stack_frame_arm64.h"
#elif defined(TARGET_ARCH_MIPS)
#include "vm/stack_frame_mips.h"
+#elif defined(TARGET_ARCH_DBC)
+#include "vm/stack_frame_dbc.h"
#else
#error Unknown architecture.
#endif
@@ -101,10 +103,12 @@ class StackFrame : public ValueObject {
uword GetCallerSp() const {
return fp() + (kCallerSpSlotFromFp * kWordSize);
}
+
uword GetCallerFp() const {
return *(reinterpret_cast<uword*>(
- fp() + (kSavedCallerFpSlotFromFp * kWordSize)));
+ fp() + (kSavedCallerFpSlotFromFp * kWordSize)));
}
+
uword GetCallerPc() const {
return *(reinterpret_cast<uword*>(
fp() + (kSavedCallerPcSlotFromFp * kWordSize)));
@@ -188,10 +192,12 @@ class StackFrameIterator : public ValueObject {
StackFrameIterator(uword last_fp, bool validate,
Thread* thread = Thread::Current());
+#if !defined(TARGET_ARCH_DBC)
// Iterator for iterating over all frames from the current frame (given by its
// fp, sp, and pc) to the first EntryFrame.
StackFrameIterator(uword fp, uword sp, uword pc, bool validate,
Thread* thread = Thread::Current());
+#endif
// Checks if a next frame exists.
bool HasNextFrame() const { return frames_.fp_ != 0; }
@@ -272,6 +278,8 @@ class DartFrameIterator : public ValueObject {
DartFrameIterator(uword last_fp,
Thread* thread = Thread::Current())
: frames_(last_fp, StackFrameIterator::kDontValidateFrames, thread) { }
+
+#if !defined(TARGET_ARCH_DBC)
DartFrameIterator(uword fp,
uword sp,
uword pc,
@@ -279,6 +287,8 @@ class DartFrameIterator : public ValueObject {
: frames_(fp, sp, pc,
StackFrameIterator::kDontValidateFrames, thread) {
}
+#endif
+
// Get next dart frame.
StackFrame* NextFrame() {
StackFrame* frame = frames_.NextFrame();
@@ -336,6 +346,22 @@ class InlinedFunctionsIterator : public ValueObject {
DISALLOW_COPY_AND_ASSIGN(InlinedFunctionsIterator);
};
+#if !defined(TARGET_ARCH_DBC)
+DART_FORCE_INLINE static uword LocalVarAddress(uword fp, intptr_t index) {
+ return fp + ((kFirstLocalSlotFromFp - index) * kWordSize);
+}
+
+
+DART_FORCE_INLINE static uword ParamAddress(uword fp, intptr_t reverse_index) {
+ return fp + (kParamEndSlotFromFp * kWordSize) + (reverse_index * kWordSize);
+}
+
+
+DART_FORCE_INLINE static bool IsCalleeFrameOf(uword fp, uword other_fp) {
+ return other_fp < fp;
+}
+#endif
+
} // namespace dart
#endif // VM_STACK_FRAME_H_

Powered by Google App Engine
This is Rietveld 408576698