Fix packed arrays with boolean indices
commit1bb085e4f74782233ba886ebba8904837e178b27
authorJames Wu <jjwu@fb.com>
Tue, 6 Feb 2018 20:35:50 +0000 (6 12:35 -0800)
committerHhvm Bot <hhvm-bot@users.noreply.github.com>
Tue, 6 Feb 2018 20:49:53 +0000 (6 12:49 -0800)
treecb9e6691d0d31d8536459af2451e4b917f3efa79
parent0d668c1d8e547b64a012bef1f97dc4f1b310935c
Fix packed arrays with boolean indices

Summary:
arrays of the form

```
array(FALSE => "4");
```

should emit a packed array bytecode because false is equal to 0, making the array identical to a one dimensional packed array rather than a mixed array. This code handles this behavior.

Reviewed By: vassilmladenov

Differential Revision: D6906180

fbshipit-source-id: f3f94bf4f783d394e956d0176c88c7d8c801f72b
hphp/hack/src/hhbc/emit_expression.ml
hphp/test/hhcodegen_failing_tests_php_spec