---
source: crates/rascal/src/tests.rs
expression: result
input_file: samples/as2/for_loop.as
---
initializer:
actions:
- ConstantPool:
- for_classic
- i
- for_no_init
- j
- start
- end
- for_no_condition
- k
- for_no_update
- n
- for_all_omitted
- count
- loop
- done
- for_in_object
- obj
- a
- b
- key
- "="
- for_in_array
- arr
- idx
- for_multiple_clauses
- ","
- for_continue_break
- x
- for_nested
- outer
- inner
- for_existing_var
- z
- for_single_statement_body
- q
- Push:
- Constant: 0
- Trace
- Push:
- Constant: 1
- Integer: 0
- DefineLocal
- Push:
- Constant: 1
- GetVariable
- Push:
- Integer: 3
- Less2
- Not
- If: loc0000
- Push:
- Constant: 1
- GetVariable
- Trace
- Push:
- Constant: 1
- Constant: 1
- GetVariable
- Increment
- SetVariable
- Jump: loc0002
- Push:
- Constant: 2
- Trace
- Push:
- Constant: 3
- Integer: 3
- DefineLocal
- Push:
- Constant: 4
- Trace
- Push:
- Constant: 3
- GetVariable
- Push:
- Integer: 6
- Less2
- Not
- If: loc0003
- Push:
- Constant: 3
- GetVariable
- Trace
- Push:
- Constant: 3
- Constant: 3
- GetVariable
- Increment
- SetVariable
- Jump: loc0005
- Push:
- Constant: 5
- Trace
- Push:
- Constant: 6
- Trace
- Push:
- Constant: 7
- Integer: 0
- DefineLocal
- Push:
- Constant: 7
- GetVariable
- Trace
- Push:
- Constant: 7
- GetVariable
- Push:
- Integer: 3
- Less2
- Not
- Not
- If: loc0009
- Jump: loc0006
- Push:
- Constant: 7
- Constant: 7
- GetVariable
- Increment
- SetVariable
- Jump: loc0008
- Push:
- Constant: 8
- Trace
- Push:
- Constant: 9
- Integer: 0
- DefineLocal
- Push:
- Constant: 9
- GetVariable
- Push:
- Integer: 3
- Less2
- Not
- If: loc000a
- Push:
- Constant: 9
- GetVariable
- Trace
- Push:
- Constant: 9
- Constant: 9
- GetVariable
- Increment
- SetVariable
- Jump: loc000c
- Push:
- Constant: 10
- Trace
- Push:
- Constant: 11
- Integer: 0
- DefineLocal
- Push:
- Constant: 12
- Trace
- Push:
- Constant: 11
- Constant: 11
- GetVariable
- Increment
- SetVariable
- Push:
- Constant: 11
- GetVariable
- Push:
- Integer: 3
- Equals2
- Not
- If: loc0010
- Jump: loc000d
- Jump: loc000f
- Push:
- Constant: 13
- Trace
- Push:
- Constant: 14
- Trace
- Push:
- Constant: 15
- Integer: 0
- InitObject
- DefineLocal
- Push:
- Constant: 15
- GetVariable
- Push:
- Constant: 16
- Integer: 10
- SetMember
- Push:
- Constant: 15
- GetVariable
- Push:
- Constant: 17
- Integer: 20
- SetMember
- Push:
- Constant: 15
- GetVariable
- Enumerate2
- StoreRegister: 0
- Push:
- "Null"
- Equals2
- If: loc0011
- Push:
- Constant: 18
- Register: 0
- DefineLocal
- Push:
- Constant: 18
- GetVariable
- Push:
- Constant: 19
- Add2
- Push:
- Constant: 15
- GetVariable
- Push:
- Constant: 18
- GetVariable
- GetMember
- Add2
- Trace
- Jump: loc0012
- Push:
- Constant: 20
- Trace
- Push:
- Constant: 21
- Integer: 7
- Integer: 6
- Integer: 5
- Integer: 3
- InitArray
- DefineLocal
- Push:
- Constant: 22
- DefineLocal2
- Push:
- Constant: 21
- GetVariable
- Enumerate2
- StoreRegister: 0
- Push:
- "Null"
- Equals2
- If: loc0013
- Push:
- Constant: 22
- Register: 0
- SetVariable
- Push:
- Constant: 22
- GetVariable
- Push:
- Constant: 19
- Add2
- Push:
- Constant: 21
- GetVariable
- Push:
- Constant: 22
- GetVariable
- GetMember
- Add2
- Trace
- Jump: loc0014
- Push:
- Constant: 23
- Trace
- Push:
- Constant: 16
- Integer: 0
- DefineLocal
- Push:
- Constant: 17
- Integer: 3
- DefineLocal
- Push:
- Constant: 16
- GetVariable
- Push:
- Constant: 17
- GetVariable
- Less2
- Not
- If: loc0015
- Push:
- Constant: 16
- GetVariable
- Push:
- Constant: 24
- Add2
- Push:
- Constant: 17
- GetVariable
- Add2
- Trace
- Push:
- Constant: 16
- Constant: 16
- GetVariable
- Increment
- SetVariable
- Push:
- Constant: 17
- Constant: 17
- GetVariable
- Decrement
- SetVariable
- Jump: loc0017
- Push:
- Constant: 25
- Trace
- Push:
- Constant: 26
- Integer: 0
- DefineLocal
- Push:
- Constant: 26
- GetVariable
- Push:
- Integer: 10
- Less2
- Not
- If: loc0018
- Push:
- Constant: 26
- GetVariable
- Push:
- Integer: 5
- Equals2
- Not
- If: loc001b
- Jump: loc0018
- Push:
- Constant: 26
- GetVariable
- Push:
- Integer: 2
- Modulo
- Push:
- Integer: 1
- Equals2
- Not
- If: loc001c
- Jump: loc0019
- Push:
- Constant: 26
- GetVariable
- Trace
- Push:
- Constant: 26
- Constant: 26
- GetVariable
- Increment
- SetVariable
- Jump: loc001a
- Push:
- Constant: 27
- Trace
- Push:
- Constant: 28
- Integer: 0
- DefineLocal
- Push:
- Constant: 28
- GetVariable
- Push:
- Integer: 2
- Less2
- Not
- If: loc001d
- Push:
- Constant: 29
- Integer: 0
- DefineLocal
- Push:
- Constant: 29
- GetVariable
- Push:
- Integer: 2
- Less2
- Not
- If: loc0020
- Push:
- Constant: 28
- GetVariable
- Push:
- Constant: 24
- Add2
- Push:
- Constant: 29
- GetVariable
- Add2
- Trace
- Push:
- Constant: 29
- Constant: 29
- GetVariable
- Increment
- SetVariable
- Jump: loc0022
- Push:
- Constant: 28
- Constant: 28
- GetVariable
- Increment
- SetVariable
- Jump: loc001f
- Push:
- Constant: 30
- Trace
- Push:
- Constant: 31
- DefineLocal2
- Push:
- Constant: 31
- Integer: 1
- SetVariable
- Push:
- Constant: 31
- GetVariable
- Push:
- Integer: 3
- Greater
- Not
- Not
- If: loc0023
- Push:
- Constant: 31
- GetVariable
- Trace
- Push:
- Constant: 31
- Constant: 31
- GetVariable
- Increment
- SetVariable
- Jump: loc0025
- Push:
- Constant: 32
- Trace
- Push:
- Constant: 33
- Integer: 0
- DefineLocal
- Push:
- Constant: 33
- GetVariable
- Push:
- Integer: 3
- Less2
- Not
- If: loc0026
- Push:
- Constant: 33
- GetVariable
- Trace
- Push:
- Constant: 33
- Constant: 33
- GetVariable
- Increment
- SetVariable
- Jump: loc0028
label_positions:
loc0002: 5
loc0001: 14
loc0000: 19
loc0005: 25
loc0004: 34
loc0003: 39
loc0008: 45
loc0009: 56
loc0007: 56
loc0006: 61
loc000c: 65
loc000b: 78
loc000a: 79
loc000f: 83
loc0010: 96
loc000e: 96
loc000d: 97
loc0012: 115
loc0011: 133
loc0014: 143
loc0013: 161
loc0017: 167
loc0016: 182
loc0015: 191
loc001a: 195
loc001b: 208
loc001c: 217
loc0019: 220
loc0018: 225
loc001f: 229
loc0022: 237
loc0021: 251
loc0020: 256
loc001e: 256
loc001d: 261
loc0025: 267
loc0024: 277
loc0023: 282
loc0028: 286
loc0027: 295
loc0026: 300
extra_modules: []
compile_options:
swf_version: 15
optimizations:
fold_constants: true
promote_variables_to_registers: true
custom_pcodes: []