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

Unified Diff: runtime/vm/instructions_ia32.h

Issue 1150633002: Track prologue offset of Code and use for more precise return addresses (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 7 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/instructions_ia32.h
diff --git a/runtime/vm/instructions_ia32.h b/runtime/vm/instructions_ia32.h
index 7f9f1885b8c4f5825a091c5996aa93c4c28ef03d..683668d0fd47e6da335ae5cff34dd815c5e50908 100644
--- a/runtime/vm/instructions_ia32.h
+++ b/runtime/vm/instructions_ia32.h
@@ -106,6 +106,30 @@ class ReturnPattern : public InstructionPattern {
static const int kLengthInBytes = 1;
};
+
srdjan 2015/05/21 16:06:33 Please add tests for these two new patterns, best
Cutch 2015/05/22 01:11:14 Done.
+class ProloguePattern : public InstructionPattern {
+ public:
+ explicit ProloguePattern(uword pc) : InstructionPattern(pc) {}
+
+ virtual const int* pattern() const;
srdjan 2015/05/21 16:06:33 I wonder why we are using int instead of intptr_t
Cutch 2015/05/22 01:11:14 Acknowledged.
+ virtual int pattern_length_in_bytes() const { return kLengthInBytes; }
+
+ private:
+ static const int kLengthInBytes = 3;
+};
+
+
+class SetFramePointerPattern : public InstructionPattern {
+ public:
+ explicit SetFramePointerPattern(uword pc) : InstructionPattern(pc) {}
+
+ virtual const int* pattern() const;
+ virtual int pattern_length_in_bytes() const { return kLengthInBytes; }
+
+ private:
+ static const int kLengthInBytes = 2;
+};
+
} // namespace dart
#endif // VM_INSTRUCTIONS_IA32_H_

Powered by Google App Engine
This is Rietveld 408576698