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

AVM1 DefineFunction support #63

Merged
merged 44 commits into from
Oct 7, 2019
Merged

Commits on Oct 6, 2019

  1. swf: implement DefineText2

    Will Brindle authored and Herschel committed Oct 6, 2019
    Configuration menu
    Copy the full SHA
    b0f25c9 View commit details
    Browse the repository at this point in the history
  2. chore: follow naming conventions for functions

    Will Brindle authored and Herschel committed Oct 6, 2019
    Configuration menu
    Copy the full SHA
    acfe0cc View commit details
    Browse the repository at this point in the history
  3. chore: combine DefineText functions into 1 and paramterise

    Will Brindle authored and Herschel committed Oct 6, 2019
    Configuration menu
    Copy the full SHA
    06c81d6 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    693e791 View commit details
    Browse the repository at this point in the history
  5. Give AVM1 the notion of a stack frame.

    This necessitates the use of a copy of SWF data into the GC arena, along with unsafe (and possibly unsound) pointer manipulation to get the action reader to hold a GC pointer.
    kmeisthax authored and Herschel committed Oct 6, 2019
    Configuration menu
    Copy the full SHA
    617b493 View commit details
    Browse the repository at this point in the history
  6. Allow stack frames to hold SwfSlices, which are Rc already.

    Functions that manipulate the stack now run inside of `with_current_reader_mut`, which calls a given function with a Reader for the current stack frame. If the stack frame still exists after that code runs, we update it's PC with the Reader's position.
    kmeisthax authored and Herschel committed Oct 6, 2019
    Configuration menu
    Copy the full SHA
    728c3d1 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    83c832c View commit details
    Browse the repository at this point in the history
  8. Implement DefineFunction

    kmeisthax authored and Herschel committed Oct 6, 2019
    Configuration menu
    Copy the full SHA
    00b5d9e View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    edc37de View commit details
    Browse the repository at this point in the history
  10. Off-the-end execution should implicitly return undefined if there's a…

    …nother stack frame to run.
    kmeisthax authored and Herschel committed Oct 6, 2019
    Configuration menu
    Copy the full SHA
    13a8814 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    667b30f View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    f3d8390 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    3ab2eec View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    215d4f2 View commit details
    Browse the repository at this point in the history
  15. Execute actions in MovieClip scope

    kmeisthax authored and Herschel committed Oct 6, 2019
    Configuration menu
    Copy the full SHA
    ca1fb71 View commit details
    Browse the repository at this point in the history
  16. Move this into the activation object.

    Also, change the implicit `this` on functions to `active_clip` as per the `ActionContext` docstrings.
    kmeisthax authored and Herschel committed Oct 6, 2019
    Configuration menu
    Copy the full SHA
    9ede91d View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    90b0140 View commit details
    Browse the repository at this point in the history
  18. Implement arguments object.

    kmeisthax authored and Herschel committed Oct 6, 2019
    Configuration menu
    Copy the full SHA
    d757ce0 View commit details
    Browse the repository at this point in the history
  19. Implement closure scope

    kmeisthax authored and Herschel committed Oct 6, 2019
    Configuration menu
    Copy the full SHA
    22f75b7 View commit details
    Browse the repository at this point in the history
  20. Impl ActionEnumerate

    kmeisthax authored and Herschel committed Oct 6, 2019
    Configuration menu
    Copy the full SHA
    face06f View commit details
    Browse the repository at this point in the history
  21. Minor refactor/adjustment of GetVariable/SetVariable impl to explicit…

    …ly check for slashpaths
    kmeisthax authored and Herschel committed Oct 6, 2019
    Configuration menu
    Copy the full SHA
    7bf6e22 View commit details
    Browse the repository at this point in the history
  22. Implement ActionWith

    kmeisthax authored and Herschel committed Oct 6, 2019
    Configuration menu
    Copy the full SHA
    fc1ce76 View commit details
    Browse the repository at this point in the history
  23. Fix a number of bugs preventing the with-scope test from working at all:

    1. We no longer implicitly return Undefined unless we're specifically returning from a function (this also keeps actions from filling the stack with Undefined)
    2. With scopes are now always inserted behind the current set of locals rather than overriding them
    3. `ActionSubtract` now subtracts (instead of adds)
    kmeisthax authored and Herschel committed Oct 6, 2019
    Configuration menu
    Copy the full SHA
    9b81a92 View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    002dd99 View commit details
    Browse the repository at this point in the history
  25. Configuration menu
    Copy the full SHA
    17482b8 View commit details
    Browse the repository at this point in the history
  26. Configuration menu
    Copy the full SHA
    582b3a8 View commit details
    Browse the repository at this point in the history
  27. Configuration menu
    Copy the full SHA
    51a7b42 View commit details
    Browse the repository at this point in the history
  28. Implement GetMember

    kmeisthax authored and Herschel committed Oct 6, 2019
    Configuration menu
    Copy the full SHA
    697a02b View commit details
    Browse the repository at this point in the history
  29. Implement SetMember

    kmeisthax authored and Herschel committed Oct 6, 2019
    Configuration menu
    Copy the full SHA
    deecd85 View commit details
    Browse the repository at this point in the history
  30. Configuration menu
    Copy the full SHA
    171cb9f View commit details
    Browse the repository at this point in the history
  31. Fix ActionIf and ActionJump

    kmeisthax authored and Herschel committed Oct 6, 2019
    Configuration menu
    Copy the full SHA
    d822a35 View commit details
    Browse the repository at this point in the history
  32. Configuration menu
    Copy the full SHA
    ec1b5c4 View commit details
    Browse the repository at this point in the history
  33. Implement DefineFunction2

    kmeisthax authored and Herschel committed Oct 6, 2019
    Configuration menu
    Copy the full SHA
    a5865d7 View commit details
    Browse the repository at this point in the history
  34. Configuration menu
    Copy the full SHA
    91cbbb4 View commit details
    Browse the repository at this point in the history
  35. Removed unused function

    kmeisthax authored and Herschel committed Oct 6, 2019
    Configuration menu
    Copy the full SHA
    8734c03 View commit details
    Browse the repository at this point in the history
  36. Configuration menu
    Copy the full SHA
    cf5420e View commit details
    Browse the repository at this point in the history
  37. Refactor: Since function.rs handles calling conventions it should j…

    …ust hand the avm an activation object directly
    kmeisthax authored and Herschel committed Oct 6, 2019
    Configuration menu
    Copy the full SHA
    8ed09e2 View commit details
    Browse the repository at this point in the history
  38. Configuration menu
    Copy the full SHA
    06d0cf5 View commit details
    Browse the repository at this point in the history
  39. Since it is possible to have virtual properties in the scope chain, o…

    …verwriting them should trigger their setters.
    
    Define, since it's intended for setting locals only, always uses force-set and does not trigger setters.
    kmeisthax authored and Herschel committed Oct 6, 2019
    Configuration menu
    Copy the full SHA
    5873eef View commit details
    Browse the repository at this point in the history
  40. Fixes to make tests compile again

    kmeisthax authored and Herschel committed Oct 6, 2019
    Configuration menu
    Copy the full SHA
    588b2bb View commit details
    Browse the repository at this point in the history
  41. Fix tellTarget being broken by the introduction of scopes. We now cre…

    …ate a new scope chain based off the selected active clip.
    kmeisthax authored and Herschel committed Oct 6, 2019
    Configuration menu
    Copy the full SHA
    2d36585 View commit details
    Browse the repository at this point in the history
  42. chore: Fix clippy lints

     * Remove clone calls from Copy objects
     * Used Iterator::cloned() instead of manually cloning
     * Pass swf::Function into AvmFunction2::new()
     * Use action_clone_sprite
    Herschel committed Oct 6, 2019
    Configuration menu
    Copy the full SHA
    1c3e440 View commit details
    Browse the repository at this point in the history
  43. chore: cargo fmt

    Herschel committed Oct 6, 2019
    Configuration menu
    Copy the full SHA
    b6eba80 View commit details
    Browse the repository at this point in the history
  44. Configuration menu
    Copy the full SHA
    18a3494 View commit details
    Browse the repository at this point in the history