Back out bug 1410429 because dependency hasn't been landed yet; r=me

This commit is contained in:
Benjamin Bouvier 2017-10-30 14:28:26 +01:00
parent cd6edeac02
commit 5fdcca21ad
2 changed files with 0 additions and 19 deletions

View File

@ -756,7 +756,6 @@ class MemoryAccessDesc
bool isPlainAsmJS() const { return !hasTrap(); }
void clearOffset() { offset_ = 0; }
void setOffset(uint32_t offset) { offset_ = offset; }
};
// Summarizes a global access for a mutable (in asm.js) or immutable value (in

View File

@ -777,24 +777,6 @@ class FunctionCompiler
void checkOffsetAndBounds(MemoryAccessDesc* access, MDefinition** base)
{
// Fold a constant base into the offset (so the base is 0 in which case
// the codegen is optimized), if it doesn't wrap or trigger an
// MWasmAddOffset.
if ((*base)->isConstant()) {
uint32_t basePtr = (*base)->toConstant()->toInt32();
uint32_t offset = access->offset();
static_assert(OffsetGuardLimit < UINT32_MAX,
"checking for overflow against OffsetGuardLimit is enough.");
if (offset < OffsetGuardLimit && basePtr < OffsetGuardLimit - offset) {
auto* ins = MConstant::New(alloc(), Int32Value(0), MIRType::Int32);
curBlock_->add(ins);
*base = ins;
access->setOffset(access->offset() + basePtr);
}
}
// If the offset is bigger than the guard region, a separate instruction
// is necessary to add the offset to the base and check for overflow.
if (access->offset() >= OffsetGuardLimit || !JitOptions.wasmFoldOffsets) {