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/if_else.as
---
initializer:
  actions:
    - ConstantPool:
        - condition
        - x
        - y
        - doSomething
        - positive
        - negative
        - zero
        - undefined
        - single
        - both positive
        - "x positive, y negative"
        - "x positive, y zero"
        - otherCondition
        - doSomethingElse
        - doFinal
        - statement1
        - statement2
        - ambiguous else
    - Push:
        - Constant: 0
        - "True"
    - DefineLocal
    - Push:
        - Constant: 1
        - Integer: 1
    - DefineLocal
    - Push:
        - Constant: 2
        - Integer: -1
    - DefineLocal
    - Push:
        - Constant: 0
    - GetVariable
    - Not
    - If: loc0000
    - Push:
        - Integer: 0
        - Constant: 3
    - CallFunction
    - Pop
    - Push:
        - Constant: 1
    - GetVariable
    - Push:
        - Integer: 0
    - Greater
    - Not
    - If: loc0002
    - Push:
        - Constant: 4
    - Trace
    - Jump: loc0001
    - Push:
        - Constant: 5
    - Trace
    - Push:
        - Constant: 1
    - GetVariable
    - Push:
        - Integer: 0
    - Less2
    - Not
    - If: loc0004
    - Push:
        - Constant: 5
    - Trace
    - Jump: loc0003
    - Push:
        - Constant: 1
    - GetVariable
    - Push:
        - Integer: 0
    - Greater
    - Not
    - If: loc0006
    - Push:
        - Constant: 4
    - Trace
    - Jump: loc0005
    - Push:
        - Constant: 1
    - GetVariable
    - Push:
        - Integer: 0
    - Equals2
    - Not
    - If: loc0008
    - Push:
        - Constant: 6
    - Trace
    - Jump: loc0007
    - Push:
        - Constant: 7
    - Trace
    - Push:
        - Constant: 0
    - GetVariable
    - Not
    - If: loc0009
    - Push:
        - Constant: 0
    - GetVariable
    - Not
    - If: loc000b
    - Jump: loc000a
    - Push:
        - Constant: 0
    - GetVariable
    - Not
    - If: loc000d
    - Push:
        - Constant: 8
    - Trace
    - Jump: loc000c
    - Push:
        - Constant: 1
    - GetVariable
    - Push:
        - Integer: 0
    - Greater
    - Not
    - If: loc000e
    - Push:
        - Constant: 2
    - GetVariable
    - Push:
        - Integer: 0
    - Greater
    - Not
    - If: loc0010
    - Push:
        - Constant: 9
    - Trace
    - Jump: loc000f
    - Push:
        - Constant: 2
    - GetVariable
    - Push:
        - Integer: 0
    - Less2
    - Not
    - If: loc0012
    - Push:
        - Constant: 10
    - Trace
    - Jump: loc0011
    - Push:
        - Constant: 11
    - Trace
    - Push:
        - Constant: 0
    - GetVariable
    - Not
    - If: loc0014
    - Push:
        - Integer: 0
        - Constant: 3
    - CallFunction
    - Pop
    - Jump: loc0013
    - Push:
        - Constant: 12
    - GetVariable
    - Not
    - If: loc0016
    - Push:
        - Integer: 0
        - Constant: 13
    - CallFunction
    - Pop
    - Jump: loc0015
    - Push:
        - Integer: 0
        - Constant: 14
    - CallFunction
    - Pop
    - Push:
        - Constant: 0
    - GetVariable
    - Not
    - If: loc0017
    - Push:
        - Integer: 0
        - Constant: 15
    - CallFunction
    - Pop
    - Push:
        - Integer: 0
        - Constant: 16
    - CallFunction
    - Pop
    - Push:
        - Constant: 1
    - GetVariable
    - Not
    - If: loc0018
    - Push:
        - Constant: 2
    - GetVariable
    - Not
    - If: loc001a
    - Push:
        - Constant: 2
    - Trace
    - Jump: loc0019
    - Push:
        - Constant: 17
    - Trace
  label_positions:
    loc0000: 14
    loc0002: 23
    loc0001: 25
    loc0004: 34
    loc0006: 43
    loc0008: 52
    loc0007: 54
    loc0005: 54
    loc0003: 54
    loc0009: 58
    loc000b: 63
    loc000a: 63
    loc000d: 70
    loc000c: 70
    loc0010: 85
    loc0012: 94
    loc0011: 96
    loc000f: 96
    loc000e: 96
    loc0014: 104
    loc0016: 112
    loc0015: 115
    loc0013: 115
    loc0017: 122
    loc001a: 136
    loc0019: 138
    loc0018: 138
extra_modules: []
compile_options:
  swf_version: 15
  optimizations:
    fold_constants: true
    promote_variables_to_registers: true
custom_pcodes: []