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

Unified Diff: src/assembler.h

Issue 203583007: Support weak heap references in the ConstantPool to support IsWeakObjectInOptimizedCode objects. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 9 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: src/assembler.h
diff --git a/src/assembler.h b/src/assembler.h
index 5a00d44ea2c0fa6c2e2000049f45e50aed78802c..7075a33959ac6b3b5ae555821963f7948f6ff458 100644
--- a/src/assembler.h
+++ b/src/assembler.h
@@ -305,12 +305,21 @@ class RelocInfo BASE_EMBEDDED {
LAST_STANDARD_NONCOMPACT_ENUM = INTERNAL_REFERENCE
};
+ enum WeakMode {
+ NOT_WEAK,
+ WEAK_IN_OPTIMIZED_CODE
+ };
RelocInfo() {}
RelocInfo(byte* pc, Mode rmode, intptr_t data, Code* host)
: pc_(pc), rmode_(rmode), data_(data), host_(host) {
}
+
+ RelocInfo(byte* pc, Mode rmode, WeakMode weak_mode, intptr_t data)
+ : pc_(pc), rmode_(rmode), data_(data), weak_mode_(weak_mode) {
+ }
+
RelocInfo(byte* pc, double data64)
: pc_(pc), rmode_(NONE64), data64_(data64), host_(NULL) {
}
@@ -395,6 +404,7 @@ class RelocInfo BASE_EMBEDDED {
}
Code* host() const { return host_; }
void set_host(Code* host) { host_ = host; }
+ WeakMode weak_mode() const { return weak_mode_; }
// Apply a relocation by delta bytes
INLINE(void apply(intptr_t delta));
@@ -519,7 +529,10 @@ class RelocInfo BASE_EMBEDDED {
intptr_t data_;
double data64_;
};
- Code* host_;
+ union {
+ Code* host_;
+ WeakMode weak_mode_;
+ };
// External-reference pointers are also split across instruction-pairs
// on some platforms, but are accessed via indirect pointers. This location
// provides a place for that pointer to exist naturally. Its address
« no previous file with comments | « src/arm/assembler-arm.cc ('k') | src/factory.h » ('j') | src/objects-visiting-inl.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698