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

Unified Diff: src/assembler.h

Issue 1477343002: Pass an isolate to RelocInfo (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updates Created 5 years, 1 month 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 | « src/arm64/assembler-arm64.cc ('k') | src/assembler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/assembler.h
diff --git a/src/assembler.h b/src/assembler.h
index 163fc3ca49202bab4e0c9ba2b84d8d6ec570ad2f..d5cc4ed216a756bc9f023700af2c2e4114a6992c 100644
--- a/src/assembler.h
+++ b/src/assembler.h
@@ -432,10 +432,13 @@ class RelocInfo {
STATIC_ASSERT(NUMBER_OF_MODES <= kBitsPerInt);
- RelocInfo() {}
+ explicit RelocInfo(Isolate* isolate) : isolate_(isolate) {
+ DCHECK_NOT_NULL(isolate);
+ }
- RelocInfo(byte* pc, Mode rmode, intptr_t data, Code* host)
- : pc_(pc), rmode_(rmode), data_(data), host_(host) {
+ RelocInfo(Isolate* isolate, byte* pc, Mode rmode, intptr_t data, Code* host)
+ : isolate_(isolate), pc_(pc), rmode_(rmode), data_(data), host_(host) {
+ DCHECK_NOT_NULL(isolate);
}
static inline bool IsRealRelocMode(Mode mode) {
@@ -518,6 +521,7 @@ class RelocInfo {
static inline int ModeMask(Mode mode) { return 1 << mode; }
// Accessors
+ Isolate* isolate() const { return isolate_; }
byte* pc() const { return pc_; }
void set_pc(byte* pc) { pc_ = pc; }
Mode rmode() const { return rmode_; }
@@ -658,6 +662,7 @@ class RelocInfo {
static const int kApplyMask; // Modes affected by apply. Depends on arch.
private:
+ Isolate* isolate_;
// On ARM, note that pc_ is the address of the constant pool entry
// to be relocated and not the address of the instruction
// referencing the constant pool entry (except when rmode_ ==
« no previous file with comments | « src/arm64/assembler-arm64.cc ('k') | src/assembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698