Add constant folding of all integer binops except exp
commita57f7f032c5142ba77ef6519cf6163307d0b6879
authorEric Lippert <ericlippert@fb.com>
Thu, 23 Mar 2017 21:11:25 +0000 (23 14:11 -0700)
committerHhvm Bot <hhvm-bot@users.noreply.github.com>
Thu, 23 Mar 2017 21:23:07 +0000 (23 14:23 -0700)
tree0d2ef18ee650df312488ce02618c2d2fcef52c75
parent3a3a3ad5036d6a2f2b4ffc0e577573f59ef1e887
Add constant folding of all integer binops except exp

Summary:
A first cut of constant folding on expressions involving only binary operators on integers is now done.

* Representation of booleans is still wrong
* the star-star exponentiation operator is not yet implemented; it has odd codegen.
* div by zero semantics are not yet implemented

Reviewed By: oulgen

Differential Revision: D4764383

fbshipit-source-id: ab2e142f42c585680bc01352ec30c47fa9662bc3
hphp/hack/src/hhbc/hhbc_from_nast.ml