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

Unified Diff: src/compiler/common-operator.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/common-node-cache.cc ('k') | src/compiler/common-operator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/common-operator.h
diff --git a/src/compiler/common-operator.h b/src/compiler/common-operator.h
index 7c59f47c34a8c212bfa615ef28f054122bfefdf0..39646e984528c3b55d3677950ad99decfaa52659 100644
--- a/src/compiler/common-operator.h
+++ b/src/compiler/common-operator.h
@@ -5,6 +5,7 @@
#ifndef V8_COMPILER_COMMON_OPERATOR_H_
#define V8_COMPILER_COMMON_OPERATOR_H_
+#include "src/assembler.h"
#include "src/compiler/frame-states.h"
#include "src/machine-type.h"
#include "src/zone-containers.h"
@@ -13,7 +14,6 @@ namespace v8 {
namespace internal {
// Forward declarations.
-class ExternalReference;
class Type;
namespace compiler {
@@ -114,6 +114,25 @@ std::ostream& operator<<(std::ostream&, ParameterInfo const&);
int ParameterIndexOf(const Operator* const);
const ParameterInfo& ParameterInfoOf(const Operator* const);
+class RelocatablePtrConstantInfo final {
+ public:
+ RelocatablePtrConstantInfo(intptr_t value, RelocInfo::Mode rmode)
+ : value_(value), rmode_(rmode) {}
+
+ intptr_t value() const { return value_; }
+ RelocInfo::Mode rmode() const { return rmode_; }
+
+ private:
+ intptr_t value_;
+ RelocInfo::Mode rmode_;
+};
+
+bool operator==(RelocatablePtrConstantInfo const& lhs,
+ RelocatablePtrConstantInfo const& rhs);
+bool operator!=(RelocatablePtrConstantInfo const& lhs,
+ RelocatablePtrConstantInfo const& rhs);
+std::ostream& operator<<(std::ostream&, RelocatablePtrConstantInfo const&);
+size_t hash_value(RelocatablePtrConstantInfo const& p);
// Interface for building common operators that can be used at any level of IR,
// including JavaScript, mid-level, and low-level.
@@ -155,6 +174,11 @@ class CommonOperatorBuilder final : public ZoneObject {
const Operator* NumberConstant(volatile double);
const Operator* HeapConstant(const Handle<HeapObject>&);
+ const Operator* RelocatableInt32Constant(int32_t value,
+ RelocInfo::Mode rmode);
+ const Operator* RelocatableInt64Constant(int64_t value,
+ RelocInfo::Mode rmode);
+
const Operator* Select(MachineRepresentation, BranchHint = BranchHint::kNone);
const Operator* Phi(MachineRepresentation representation,
int value_input_count);
« no previous file with comments | « src/compiler/common-node-cache.cc ('k') | src/compiler/common-operator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698