From 5fdcca21adff72efa099f64ebe05d81f65374937 Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Mon, 30 Oct 2017 14:28:26 +0100 Subject: [PATCH] Back out bug 1410429 because dependency hasn't been landed yet; r=me --- js/src/jit/shared/Assembler-shared.h | 1 - js/src/wasm/WasmIonCompile.cpp | 18 ------------------ 2 files changed, 19 deletions(-) diff --git a/js/src/jit/shared/Assembler-shared.h b/js/src/jit/shared/Assembler-shared.h index 1649279855b4..bc370bd7f839 100644 --- a/js/src/jit/shared/Assembler-shared.h +++ b/js/src/jit/shared/Assembler-shared.h @@ -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 diff --git a/js/src/wasm/WasmIonCompile.cpp b/js/src/wasm/WasmIonCompile.cpp index 37a1ebc7605a..5f191b5b04da 100644 --- a/js/src/wasm/WasmIonCompile.cpp +++ b/js/src/wasm/WasmIonCompile.cpp @@ -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) {