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

Unified Diff: runtime/vm/assembler.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
« no previous file with comments | « no previous file | runtime/vm/assembler_ia32.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/assembler.h
diff --git a/runtime/vm/assembler.h b/runtime/vm/assembler.h
index d8249ba4377fb4dc2645bd26d8c37a9ecfc8dde5..6ef8ae61c0af640748e2c8f3de6aeb2c4033523c 100644
--- a/runtime/vm/assembler.h
+++ b/runtime/vm/assembler.h
@@ -89,6 +89,11 @@ class AssemblerBuffer : public ValueObject {
cursor_ -= sizeof(T);
}
+ // Return address to code at |position| bytes.
+ uword Address(intptr_t position) {
+ return reinterpret_cast<uword>(contents_ + position);
+ }
+
template<typename T> T Load(intptr_t position) {
ASSERT(position >= 0 &&
position <= (Size() - static_cast<intptr_t>(sizeof(T))));
« no previous file with comments | « no previous file | runtime/vm/assembler_ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698