Shift bits to the left. Like >>>, this operator ignores the sign and fills left bits with zeros.
ShiftExpression : ShiftExpression >>> AdditiveExpression
function evaluate(ShiftExpression >>> AdditiveExpression) {
var lref = evaluate(ShiftExpression);
var lval = GetValue(lref);
var rref = evaluate(AdditiveExpression);
var rval = GetValue(rref);
var lnum = ToUint32(lval);
var rnum = ToUint32(rval);
var shiftCount = rnum & 0x1F;
return lnum >>> shiftCount; // result is an unsigned (!) 32bit int
}
Note that the left bits are always filled with zeros, unlike >> which uses the sign to fill. See 11.7 for more examples.
This operator can mimic the ToUint32() operation by n>>>0.