Skip to content
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

Add steppable/interruptible interpreter #79

Open
wants to merge 17 commits into
base: master
Choose a base branch
from

Commits on Mar 26, 2019

  1. Publicify Stop enum

    It's a secret tool we'll use later on.
    6J7KZg2f authored Mar 26, 2019
    Configuration menu
    Copy the full SHA
    aa6ebaa View commit details
    Browse the repository at this point in the history
  2. Initial commit

    Add IterativeInterp, a modified version of Interp that can be stepped through execution, preventing infinite loops.
    6J7KZg2f authored Mar 26, 2019
    Configuration menu
    Copy the full SHA
    92f61aa View commit details
    Browse the repository at this point in the history
  3. Gut readme

    Just using the readme to explain what this fork is.
    6J7KZg2f authored Mar 26, 2019
    Configuration menu
    Copy the full SHA
    cc6358c View commit details
    Browse the repository at this point in the history
  4. Update README.md

    6J7KZg2f authored Mar 26, 2019
    Configuration menu
    Copy the full SHA
    6325569 View commit details
    Browse the repository at this point in the history
  5. Update README.md

    6J7KZg2f authored Mar 26, 2019
    Configuration menu
    Copy the full SHA
    978d6bd View commit details
    Browse the repository at this point in the history

Commits on Mar 27, 2019

  1. Fix package

    6J7KZg2f authored Mar 27, 2019
    Configuration menu
    Copy the full SHA
    caa6bb4 View commit details
    Browse the repository at this point in the history
  2. Add StackFrame type

    Forgot about this little thinger...
    6J7KZg2f authored Mar 27, 2019
    Configuration menu
    Copy the full SHA
    3a37eba View commit details
    Browse the repository at this point in the history
  3. Put debug traces behind hs_verbose haxedef

    Should quiet things down a bit
    6J7KZg2f authored Mar 27, 2019
    Configuration menu
    Copy the full SHA
    e08b1ed View commit details
    Browse the repository at this point in the history

Commits on Apr 10, 2019

  1. Configuration menu
    Copy the full SHA
    7501e00 View commit details
    Browse the repository at this point in the history

Commits on Apr 24, 2019

  1. Fix assign() to support stack-based local vars

    `assign()`  (usually triggered by `EBinop("="...`) was not searching through the stack to find local vars outside of the immediate block's scope. It now does so. 
    
    Also identified a few areas that used the same search method and merged them into a single inlined function, `find_local(id:String):Dynamic`. 
    
    There are only minor differences between `find_local` and `resolve`, and they could potentially be merged with some adjustments to `assign`, `increment`, etc.
    6J7KZg2f authored Apr 24, 2019
    Configuration menu
    Copy the full SHA
    68cf69d View commit details
    Browse the repository at this point in the history
  2. Move readme elsewhere

    6J7KZg2f authored Apr 24, 2019
    Configuration menu
    Copy the full SHA
    fae43ba View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    6ffa140 View commit details
    Browse the repository at this point in the history

Commits on Apr 26, 2019

  1. Fix consecutive block ends crashing interp bug

    Two codeblocks ending consecutively with no expression in between 
    eg
    ```
    if(foo){
        if(bar){
            trace('hello');
        }
        //no expression here would trigger the bug
    }
    ```
    Would crash the script. The fetch phase will now, on encountering the end of a block, continue bubbling up through stack frames until it either finds one that will continue or returns a value and ends the script.
    6J7KZg2f authored Apr 26, 2019
    Configuration menu
    Copy the full SHA
    8a9bd90 View commit details
    Browse the repository at this point in the history

Commits on May 7, 2019

  1. Make compatible with hscriptPos + fix locals bug

    Now fully compatible with -DhscriptPos. Internally-generated expressions simply show "Internal" source and zero for all line/position telemetry. 
    
    Fixed a bug where pushing a new frame to the stack wasn't updating locals.
    6J7KZg2f authored May 7, 2019
    Configuration menu
    Copy the full SHA
    e114ebd View commit details
    Browse the repository at this point in the history
  2. Add exprify function (iterative hscriptPos compat)

    Tools.exprify(e:Expr/ExprDef):Expr is basically the equivalent of Tools.mk for runtime-generated (ie, has no position in source hscript) exprs. It allows hscript.IterativeInterp to be compatible with -DhscriptPos.
    6J7KZg2f authored May 7, 2019
    Configuration menu
    Copy the full SHA
    73d2831 View commit details
    Browse the repository at this point in the history

Commits on May 9, 2019

  1. Support for loops & complex array decs

    Added support for for loop syntax; for loops exist in their own stack frame and can be interrupted as with other loops.
    
    Array declarations now support function calls as members.
    
    Improved PosInfo for internal expressions.
    6J7KZg2f authored May 9, 2019
    Configuration menu
    Copy the full SHA
    8bc6104 View commit details
    Browse the repository at this point in the history

Commits on May 31, 2019

  1. Fix continue support;

    `continue` now works as expected in while, dowhile, and for loops.
    6J7KZg2f authored May 31, 2019
    Configuration menu
    Copy the full SHA
    3ef1ed9 View commit details
    Browse the repository at this point in the history