rascal 0.3.4

A parser and compiler for Flash ActionScript 2 files into SWFs
Documentation
---
source: crates/rascal/src/tests.rs
expression: result
input_file: samples/as2/regressions/ruffle_avm1_mouse_pos.as
---
initializer:
  actions:
    - ConstantPool:
        - ""
        - oldX
        - oldY
        - "_root "
        - " "
        - s133fpr15
        - s133fp
        - s42fp
        - fp
        - ip
        - zs
        - id
        - length
        - _name
        - _xmouse
        - _ymouse
        - dump
        - _xscale
        - _yscale
    - DefineFunction2:
        name: dump
        params: []
        actions:
          actions:
            - Push:
                - Constant: 0
                - Integer: 20
            - GetProperty
            - Push:
                - Constant: 1
            - GetVariable
            - Equals2
            - PushDuplicate
            - Not
            - If: loc0001
            - Pop
            - Push:
                - Constant: 0
                - Integer: 21
            - GetProperty
            - Push:
                - Constant: 2
            - GetVariable
            - Equals2
            - Not
            - If: loc0000
            - Push:
                - Undefined
            - Return
            - Push:
                - Constant: 1
                - Constant: 0
                - Integer: 20
            - GetProperty
            - SetVariable
            - Push:
                - Constant: 2
                - Constant: 0
                - Integer: 21
            - GetProperty
            - SetVariable
            - Push:
                - Constant: 3
                - Constant: 0
                - Integer: 20
            - GetProperty
            - Add2
            - Push:
                - Constant: 4
            - Add2
            - Push:
                - Constant: 0
                - Integer: 21
            - GetProperty
            - Add2
            - Trace
            - Push:
                - Constant: 5
            - GetVariable
            - Push:
                - Constant: 6
            - GetVariable
            - Push:
                - Constant: 7
            - GetVariable
            - Push:
                - Constant: 8
            - GetVariable
            - Push:
                - Constant: 9
            - GetVariable
            - Push:
                - Constant: 10
            - GetVariable
            - Push:
                - Constant: 11
            - GetVariable
            - Push:
                - Integer: 7
            - InitArray
            - StoreRegister: 1
            - Pop
            - Push:
                - Integer: 0
            - StoreRegister: 2
            - Pop
            - Push:
                - Register: 2
                - Register: 1
                - Constant: 12
            - GetMember
            - Less2
            - Not
            - If: loc0002
            - Push:
                - Register: 1
                - Register: 2
            - GetMember
            - StoreRegister: 3
            - Pop
            - Push:
                - Register: 3
                - Constant: 13
            - GetMember
            - Push:
                - Constant: 4
            - Add2
            - Push:
                - Register: 3
                - Constant: 14
            - GetMember
            - Add2
            - Push:
                - Constant: 4
            - Add2
            - Push:
                - Register: 3
                - Constant: 15
            - GetMember
            - Add2
            - Trace
            - Push:
                - Register: 2
            - Increment
            - StoreRegister: 2
            - Pop
            - Jump: loc0004
            - Push:
                - Constant: 0
            - Trace
          label_positions:
            loc0001: 14
            loc0000: 18
            loc0004: 54
            loc0003: 76
            loc0002: 81
        register_count: 4
        preload_this: false
        suppress_this: true
        preload_arguments: false
        suppress_arguments: true
        preload_super: false
        suppress_super: true
        preload_root: false
        preload_parent: false
        preload_global: false
    - DefineFunction:
        name: onEnterFrame
        params: []
        actions:
          actions:
            - Push:
                - Integer: 0
                - Constant: 16
            - CallFunction
            - Pop
          label_positions: {}
    - Push:
        - Constant: 10
    - GetVariable
    - Push:
        - Constant: 17
        - Constant: 10
    - GetVariable
    - Push:
        - Constant: 18
        - Integer: 0
    - StoreRegister: 0
    - SetMember
    - Push:
        - Register: 0
    - SetMember
    - Push:
        - Constant: 1
    - DefineLocal2
    - Push:
        - Constant: 2
    - DefineLocal2
  label_positions: {}
extra_modules: []
compile_options:
  swf_version: 15
  optimizations:
    fold_constants: true
    promote_variables_to_registers: true
custom_pcodes: []