dev_compiler icon indicating copy to clipboard operation
dev_compiler copied to clipboard

Right shift is zero-fill in Dart

Open vsmenon opened this issue 9 years ago • 0 comments

DDC propagates the sign on a right shift. This appears to violate Dart semantics.

The following prints 1 on the VM / dart2js and -1 in DDC.

void main() {
  var x = 0x80000000;
  print(x >> 31);
}

vsmenon avatar Feb 09 '16 18:02 vsmenon