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

Unified Diff: src/compiler/common-operator.cc

Issue 1921203002: Add new relocation type WASM_MEMORY_SIZE_REFERENCE, use relocatable pointers to update wasm memory … (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix mips/mips64 build 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
Index: src/compiler/common-operator.cc
diff --git a/src/compiler/common-operator.cc b/src/compiler/common-operator.cc
index 573e4661638a8f3811beefbe28a63c8a47c1d81f..c53448453d576a3a7330d242e8720147181a82ae 100644
--- a/src/compiler/common-operator.cc
+++ b/src/compiler/common-operator.cc
@@ -149,7 +149,8 @@ std::ostream& operator<<(std::ostream& os, ParameterInfo const& i) {
bool operator==(RelocatablePtrConstantInfo const& lhs,
RelocatablePtrConstantInfo const& rhs) {
- return lhs.rmode() == rhs.rmode() && lhs.value() == rhs.value();
+ return lhs.rmode() == rhs.rmode() && lhs.value() == rhs.value() &&
+ lhs.type() == rhs.type();
}
bool operator!=(RelocatablePtrConstantInfo const& lhs,
@@ -158,12 +159,12 @@ bool operator!=(RelocatablePtrConstantInfo const& lhs,
}
size_t hash_value(RelocatablePtrConstantInfo const& p) {
- return base::hash_combine(p.value(), p.rmode());
+ return base::hash_combine(p.value(), p.rmode(), p.type());
}
std::ostream& operator<<(std::ostream& os,
RelocatablePtrConstantInfo const& p) {
- return os << p.value() << "|" << p.rmode();
+ return os << p.value() << "|" << p.rmode() << "|" << p.type();
}
#define CACHED_OP_LIST(V) \
@@ -698,17 +699,18 @@ const Operator* CommonOperatorBuilder::RelocatableInt32Constant(
IrOpcode::kRelocatableInt32Constant, Operator::kPure, // opcode
"RelocatableInt32Constant", // name
0, 0, 0, 1, 0, 0, // counts
- RelocatablePtrConstantInfo(value, rmode)); // parameter
+ RelocatablePtrConstantInfo(static_cast<int32_t>(value),
titzer 2016/05/04 11:21:22 AFAICT, the static_cast here is unnecessary.
gdeepti 2016/05/04 20:14:52 Done.
+ rmode)); // parameter
}
const Operator* CommonOperatorBuilder::RelocatableInt64Constant(
int64_t value, RelocInfo::Mode rmode) {
- return new (zone()) Operator1<RelocatablePtrConstantInfo>( // --
- IrOpcode::kRelocatableInt64Constant, Operator::kPure, // opcode
- "RelocatableInt64Constant", // name
- 0, 0, 0, 1, 0, 0, // counts
- RelocatablePtrConstantInfo(static_cast<intptr_t>(value), // parameter
- rmode));
+ return new (zone()) Operator1<RelocatablePtrConstantInfo>( // --
+ IrOpcode::kRelocatableInt64Constant, Operator::kPure, // opcode
+ "RelocatableInt64Constant", // name
+ 0, 0, 0, 1, 0, 0, // counts
+ RelocatablePtrConstantInfo(static_cast<int64_t>(value),
titzer 2016/05/04 11:21:22 Here as well.
gdeepti 2016/05/04 20:14:52 Done.
+ rmode)); // parameter
}
const Operator* CommonOperatorBuilder::Select(MachineRepresentation rep,

Powered by Google App Engine
This is Rietveld 408576698