Don't skip constant folding for small double values
commite86bd1cd92b1926fef98ea710d487d4a19a6f59e
authorMark Williams <mwilliams@fb.com>
Tue, 4 Apr 2017 03:12:11 +0000 (3 20:12 -0700)
committerHhvm Bot <hhvm-bot@users.noreply.github.com>
Tue, 4 Apr 2017 03:29:08 +0000 (3 20:29 -0700)
tree799f8b1a2d6477c6229b8814949d9c356f3837d6
parentc3719c02eeae8a13cc6dff589ff20b02424b68a8
Don't skip constant folding for small double values

Summary:
eval_const_divmod would skip folding if toInt(denominator) == 0; but
thats true for any double value between 0 and 1.

We don't need the check, because cellDiv will raise a warning (which
will be caught by eval_cell) in the case of divide by zero.

Reviewed By: ricklavoie

Differential Revision: D4821110

fbshipit-source-id: 83a4e99c6b9143581c023d32f901b3221b5f4547
hphp/hhbbc/type-ops.cpp