summaryrefslogtreecommitdiff
path: root/js/src/jit
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-10-31 17:30:52 +0100
committerwolfbeast <mcwerewolf@gmail.com>2018-10-31 17:30:52 +0100
commit1cfcf17a10898f8c429021c4f78bd9ae61935c52 (patch)
tree42b7dc1b5534c99baae9be5d01493d56098481b7 /js/src/jit
parent2c045d9c55674156b3881efb1cfa9bff41809105 (diff)
downloaduxp-1cfcf17a10898f8c429021c4f78bd9ae61935c52.tar.gz
Don't mark MGetFirstDollarIndex as movable.
Diffstat (limited to 'js/src/jit')
-rw-r--r--js/src/jit/MIR.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/js/src/jit/MIR.h b/js/src/jit/MIR.h
index 6ec05af764..b2e84322f9 100644
--- a/js/src/jit/MIR.h
+++ b/js/src/jit/MIR.h
@@ -8272,7 +8272,10 @@ class MGetFirstDollarIndex
: MUnaryInstruction(str)
{
setResultType(MIRType::Int32);
- setMovable();
+
+ // Codegen assumes string length > 0 but that's not guaranteed in RegExp.
+ // Don't allow LICM to move this.
+ MOZ_ASSERT(!isMovable());
}
public: