Add support for while loops and locals
commit95dba13db9512076c892f25203e5e6ffce08d6b5
authorJoseph Griego <jgriego@fb.com>
Thu, 13 Jul 2017 17:01:13 +0000 (13 10:01 -0700)
committerHhvm Bot <hhvm-bot@users.noreply.github.com>
Thu, 13 Jul 2017 19:20:09 +0000 (13 12:20 -0700)
tree0fbbed332570ac119f5cdef33cea1434242d6137
parent0f76237b718eda80d506b953773f8dc88266650c
Add support for while loops and locals

Summary:
What it says on the tin, mostly. Adds support for local variables to
the compiler, and while and do/while loops. There should be reasonable spots to
add fancier lvalue types (`$a['index']` expressions, e.g.) and fancier loops
and control structures, `switch`, `break`, `continue`, `foreach`, etc.

Reviewed By: swtaarrs

Differential Revision: D5370707

fbshipit-source-id: ff2c23cd8810a842fe2beeed47dc46b62fcd054d
hphp/php7/bytecode.h
hphp/php7/compiler.cpp
hphp/php7/compiler.h
hphp/php7/hhas.cpp
hphp/php7/unit.h
hphp/test/php7-emitter/assignment.php [new file with mode: 0644]
hphp/test/php7-emitter/assignment.php.expect [new file with mode: 0644]
hphp/test/php7-emitter/while.php [new file with mode: 0644]
hphp/test/php7-emitter/while.php.expect [new file with mode: 0644]