Skip to content

Add include OpCode #65

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 26, 2019
Merged

Add include OpCode #65

merged 4 commits into from
Apr 26, 2019

Conversation

driusan
Copy link
Collaborator

@driusan driusan commented Apr 25, 2019

This adds an OpCode to emit when encontering a PHPCfg\Expr\Include_
in compile.

Support for it isn't included in the JIT, or AOT, but at least
it allows bin/print.php to handle files that have an include
statement without throwing an exception while trying to generate the
OpCodes.

Fixes #62.

driusan added 2 commits April 25, 2019 19:31
This adds an OpCode to emit when encontering a PHPCfg\Expr\Include_
in compile.

Support for it isn't included in the VM, JIT, or AOT, but at least
it allows bin/print.php to handle files that have an include
statement without throwing an exception while trying to generate the
OpCodes.

Fixes ircmaxell#62.
There is no reason to use runtime->run to spawn a new VM when including a file, so instead push a frame onto the existing one.

Co-Authored-By: driusan <driusan@gmail.com>
The break is unreachable.

Co-Authored-By: driusan <driusan@gmail.com>
Copy link
Owner

@ircmaxell ircmaxell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ircmaxell ircmaxell merged commit 27fec29 into ircmaxell:master Apr 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can't print CFG of code including "include" expression
2 participants