The latter half of section 6.10 of the specification describes the conditions for valid heap indexing expressions. One of them is:
ValidateExpression succeeds for expr with type intish;
which should read
ValidateExpression succeeds for expr with a subtype of intish;
The following module, for example, is correctly accepted by OdinMonkey's validator:
(function(std, ffi, buff) {
"use asm"
var H32 = new std.Int32Array(buff)
function f(x, y) {
x = x|0
y = y|0
H32[x >> 2] = y
}
return f
})
Note that the indexing expression x in H32[x >> 2] has type int <: intish.
The specification does not appeal to expression subsumption elsewhere, so this ought to be made explicit as a matter of consistency.