| Index: src/compiler/machine-operator.cc
|
| diff --git a/src/compiler/machine-operator.cc b/src/compiler/machine-operator.cc
|
| index 81805d7b36296ec517e2ef1ec8bff73d764dba4c..32d2c4974120bd66c44c3f76f54f4808a4b90e78 100644
|
| --- a/src/compiler/machine-operator.cc
|
| +++ b/src/compiler/machine-operator.cc
|
| @@ -36,6 +36,7 @@ std::ostream& operator<<(std::ostream& os, StoreRepresentation rep) {
|
|
|
| LoadRepresentation LoadRepresentationOf(Operator const* op) {
|
| DCHECK(IrOpcode::kLoad == op->opcode() ||
|
| + IrOpcode::kProtectedLoad == op->opcode() ||
|
| IrOpcode::kAtomicLoad == op->opcode());
|
| return OpParameter<LoadRepresentation>(op);
|
| }
|
| @@ -500,9 +501,18 @@ struct MachineOperatorGlobalCache {
|
| Operator::kNoDeopt | Operator::kNoThrow | Operator::kNoWrite, \
|
| "CheckedLoad", 3, 1, 1, 1, 1, 0, MachineType::Type()) {} \
|
| }; \
|
| + struct ProtectedLoad##Type##Operator final \
|
| + : public Operator1<ProtectedLoadRepresentation> { \
|
| + ProtectedLoad##Type##Operator() \
|
| + : Operator1<ProtectedLoadRepresentation>( \
|
| + IrOpcode::kProtectedLoad, \
|
| + Operator::kNoDeopt | Operator::kNoThrow | Operator::kNoWrite, \
|
| + "ProtectedLoad", 4, 1, 1, 1, 1, 0, MachineType::Type()) {} \
|
| + }; \
|
| Load##Type##Operator kLoad##Type; \
|
| UnalignedLoad##Type##Operator kUnalignedLoad##Type; \
|
| - CheckedLoad##Type##Operator kCheckedLoad##Type;
|
| + CheckedLoad##Type##Operator kCheckedLoad##Type; \
|
| + ProtectedLoad##Type##Operator kProtectedLoad##Type;
|
| MACHINE_TYPE_LIST(LOAD)
|
| #undef LOAD
|
|
|
| @@ -697,6 +707,17 @@ const Operator* MachineOperatorBuilder::Load(LoadRepresentation rep) {
|
| return nullptr;
|
| }
|
|
|
| +const Operator* MachineOperatorBuilder::ProtectedLoad(LoadRepresentation rep) {
|
| +#define LOAD(Type) \
|
| + if (rep == MachineType::Type()) { \
|
| + return &cache_.kProtectedLoad##Type; \
|
| + }
|
| + MACHINE_TYPE_LIST(LOAD)
|
| +#undef LOAD
|
| + UNREACHABLE();
|
| + return nullptr;
|
| +}
|
| +
|
| const Operator* MachineOperatorBuilder::StackSlot(MachineRepresentation rep) {
|
| #define STACKSLOT(Type) \
|
| if (rep == MachineType::Type().representation()) { \
|
|
|