Hack codegen: top-level statements
commite8ce185ee44c1ce49e9309bd91de1523c88faa75
authorAndrew Kennedy <akenn@fb.com>
Thu, 23 Mar 2017 18:14:41 +0000 (23 11:14 -0700)
committerHhvm Bot <hhvm-bot@users.noreply.github.com>
Thu, 23 Mar 2017 18:20:00 +0000 (23 11:20 -0700)
tree6876044e2e1a5412e149e9c068d693cb6dedfedf
parent3155f2deba477cf05d4b5af169884eaabcdf6036
Hack codegen: top-level statements

Summary:
Generate code for top-level statements. Instructions are emitted in the `.main` section.

Currently we don't emit the `DefCls` instruction in the correct place if top-level statements are interspersed with class definitions.
This will be fixed in a futrue diff.

Reviewed By: oulgen

Differential Revision: D4756438

fbshipit-source-id: 4d64fb8dadfef12590ae89c86c5886362f680f78
hphp/hack/src/hh_single_compile.ml
hphp/hack/src/hhbc/closure_convert.mli
hphp/hack/src/hhbc/hhas_main.ml [new file with mode: 0644]
hphp/hack/src/hhbc/hhas_program.ml
hphp/hack/src/hhbc/hhbc_hhas.ml
hphp/hack/src/parsing/parser_heap.ml