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

Unified Diff: src/compiler/instruction.h

Issue 1759383003: [compiler] Add relocatable pointer constants for wasm memory references. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix uninitialized variable causing msan failure 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
« no previous file with comments | « src/compiler/ia32/instruction-selector-ia32.cc ('k') | src/compiler/instruction.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/instruction.h
diff --git a/src/compiler/instruction.h b/src/compiler/instruction.h
index 7f64dce978bd6bc9c2f6631c7f569ab37db7fe96..bc6a241419103273b96c5ed8b3b9145fddb62af5 100644
--- a/src/compiler/instruction.h
+++ b/src/compiler/instruction.h
@@ -947,9 +947,12 @@ class Constant final {
explicit Constant(Handle<HeapObject> obj)
: type_(kHeapObject), value_(bit_cast<intptr_t>(obj)) {}
explicit Constant(RpoNumber rpo) : type_(kRpoNumber), value_(rpo.ToInt()) {}
+ explicit Constant(RelocatablePtrConstantInfo info);
Type type() const { return type_; }
+ RelocInfo::Mode rmode() const { return rmode_; }
+
int32_t ToInt32() const {
DCHECK(type() == kInt32 || type() == kInt64);
const int32_t value = static_cast<int32_t>(value_);
@@ -992,6 +995,11 @@ class Constant final {
private:
Type type_;
int64_t value_;
+#if V8_TARGET_ARCH_32_BIT
+ RelocInfo::Mode rmode_ = RelocInfo::NONE32;
+#else
+ RelocInfo::Mode rmode_ = RelocInfo::NONE64;
+#endif
};
« no previous file with comments | « src/compiler/ia32/instruction-selector-ia32.cc ('k') | src/compiler/instruction.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698