=== vm run: test === 0000: [] (_,_,_,_,_,_,_,_) 0000: reset_match 0001: [] (_,_,_,_,_,_,_,_) 0001: constant 00000: 4 0004: [->4<-] (_,_,_,_,_,_,_,_) 0004: match 0005: [->4<-] (_,_,_,_,_,_,_,_) 0005: panic_if_no_match 0006: [->4<-] (_,_,_,_,_,_,_,_) 0006: push_list 0007: [->4<-|[]] (_,_,_,_,_,_,_,_) 0007: constant 00001: 1 0010: [->4<-|[]|1] (_,_,_,_,_,_,_,_) 0010: append_list 0011: [->4<-|[1]] (_,_,_,_,_,_,_,_) 0011: constant 00002: 2 0014: [->4<-|[1]|2] (_,_,_,_,_,_,_,_) 0014: append_list 0015: [->4<-|[1, 2]] (_,_,_,_,_,_,_,_) 0015: constant 00003: 3 0018: [->4<-|[1, 2]|3] (_,_,_,_,_,_,_,_) 0018: append_list 0019: [->4<-|[1, 2, 3]] (_,_,_,_,_,_,_,_) 0019: ***entering loop with stack depth of 2 0021: [->4<-|[1, 2, 3]] (_,_,_,_,_,_,_,_) 0021: store_n 001 0023: [->4<-] ([1, 2, 3],_,_,_,_,_,_,_) 0023: ***after store, stack depth is now 2 0025: [->4<-] ([1, 2, 3],_,_,_,_,_,_,_) 0025: load 0026: [->4<-|[1, 2, 3]] (_,_,_,_,_,_,_,_) 0026: ***after load, stack depth is now 2 0028: [->4<-|[1, 2, 3]] (_,_,_,_,_,_,_,_) 0028: reset_match 0029: [->4<-|[1, 2, 3]] (_,_,_,_,_,_,_,_) 0029: match_depth 000 0031: [->4<-|[1, 2, 3]] (_,_,_,_,_,_,_,_) 0031: match_list 000 0033: [->4<-|[1, 2, 3]] (_,_,_,_,_,_,_,_) 0033: jump_if_no_match 00006 0042: [->4<-|[1, 2, 3]] (_,_,_,_,_,_,_,_) 0042: jump_if_no_match 00010 0055: [->4<-|[1, 2, 3]] (_,_,_,_,_,_,_,_) 0055: reset_match 0056: [->4<-|[1, 2, 3]] (_,_,_,_,_,_,_,_) 0056: match_depth 000 0058: [->4<-|[1, 2, 3]] (_,_,_,_,_,_,_,_) 0058: match_list 001 0060: [->4<-|[1, 2, 3]] (_,_,_,_,_,_,_,_) 0060: jump_if_no_match 00012 0075: [->4<-|[1, 2, 3]] (_,_,_,_,_,_,_,_) 0075: jump_if_no_match 00030 0108: [->4<-|[1, 2, 3]] (_,_,_,_,_,_,_,_) 0108: reset_match 0109: [->4<-|[1, 2, 3]] (_,_,_,_,_,_,_,_) 0109: match_depth 000 0111: [->4<-|[1, 2, 3]] (_,_,_,_,_,_,_,_) 0111: match_splatted_list 002 0113: [->4<-|[1, 2, 3]] (_,_,_,_,_,_,_,_) 0113: jump_if_no_match 00019 0116: [->4<-|[1, 2, 3]] (_,_,_,_,_,_,_,_) 0116: load_splatted_list 002 0118: [->4<-|[1, 2, 3]|1|[2, 3]] (_,_,_,_,_,_,_,_) 0118: match_depth 001 0120: [->4<-|[1, 2, 3]|1|[2, 3]] (_,_,_,_,_,_,_,_) 0120: match 0121: [->4<-|[1, 2, 3]|1|[2, 3]] (_,_,_,_,_,_,_,_) 0121: jump_if_no_match 00010 0124: [->4<-|[1, 2, 3]|1|[2, 3]] (_,_,_,_,_,_,_,_) 0124: match_depth 000 0126: [->4<-|[1, 2, 3]|1|[2, 3]] (_,_,_,_,_,_,_,_) 0126: match 0127: [->4<-|[1, 2, 3]|1|[2, 3]] (_,_,_,_,_,_,_,_) 0127: jump_if_no_match 00004 0130: [->4<-|[1, 2, 3]|1|[2, 3]] (_,_,_,_,_,_,_,_) 0130: jump 00002 0135: [->4<-|[1, 2, 3]|1|[2, 3]] (_,_,_,_,_,_,_,_) 0135: jump_if_no_match 00068 0138: [->4<-|[1, 2, 3]|1|[2, 3]] (_,_,_,_,_,_,_,_) 0138: ***before visiting body, the stack depth is 4 0140: [->4<-|[1, 2, 3]|1|[2, 3]] (_,_,_,_,_,_,_,_) 0140: ***calling function eq? stack depth: 4 0142: [->4<-|[1, 2, 3]|1|[2, 3]] (_,_,_,_,_,_,_,_) 0142: ***calling function first stack depth: 4 0144: [->4<-|[1, 2, 3]|1|[2, 3]] (_,_,_,_,_,_,_,_) 0144: resolving binding `xs` in test 0146: [->4<-|[1, 2, 3]|1|[2, 3]] (_,_,_,_,_,_,_,_) 0146: push_binding 003 0148: [->4<-|[1, 2, 3]|1|[2, 3]|[2, 3]] (_,_,_,_,_,_,_,_) 0148: resolving binding `first` in test 0150: [->4<-|[1, 2, 3]|1|[2, 3]|[2, 3]] (_,_,_,_,_,_,_,_) 0150: constant 00005: :first 0153: [->4<-|[1, 2, 3]|1|[2, 3]|[2, 3]|:first] (_,_,_,_,_,_,_,_) 0153: push_global 0154: [->4<-|[1, 2, 3]|1|[2, 3]|[2, 3]|fn first] (_,_,_,_,_,_,_,_) 0154: ***after 1 args stack depth: 6 0156: [->4<-|[1, 2, 3]|1|[2, 3]|[2, 3]|fn first] (_,_,_,_,_,_,_,_) 0156: call 001 === calling into fn first/1 === 0000: [4|[1, 2, 3]|1|[2, 3]|->[2, 3]<-] (_,_,_,_,_,_,_,_) 0000: reset_match 0001: [4|[1, 2, 3]|1|[2, 3]|->[2, 3]<-] (_,_,_,_,_,_,_,_) 0001: match_depth 000 0003: [4|[1, 2, 3]|1|[2, 3]|->[2, 3]<-] (_,_,_,_,_,_,_,_) 0003: match_list 000 0005: [4|[1, 2, 3]|1|[2, 3]|->[2, 3]<-] (_,_,_,_,_,_,_,_) 0005: jump_if_no_match 00006 0014: [4|[1, 2, 3]|1|[2, 3]|->[2, 3]<-] (_,_,_,_,_,_,_,_) 0014: jump_if_no_match 00003 0020: [4|[1, 2, 3]|1|[2, 3]|->[2, 3]<-] (_,_,_,_,_,_,_,_) 0020: jump_if_no_match 00005 0028: [4|[1, 2, 3]|1|[2, 3]|->[2, 3]<-] (_,_,_,_,_,_,_,_) 0028: match_depth 000 0030: [4|[1, 2, 3]|1|[2, 3]|->[2, 3]<-] (_,_,_,_,_,_,_,_) 0030: constant 00000: :list 0033: [4|[1, 2, 3]|1|[2, 3]|->[2, 3]<-|:list] (_,_,_,_,_,_,_,_) 0033: match_type 0034: [4|[1, 2, 3]|1|[2, 3]|->[2, 3]<-] (_,_,_,_,_,_,_,_) 0034: jump_if_no_match 00003 0037: [4|[1, 2, 3]|1|[2, 3]|->[2, 3]<-] (_,_,_,_,_,_,_,_) 0037: jump 00000 0040: [4|[1, 2, 3]|1|[2, 3]|->[2, 3]<-] (_,_,_,_,_,_,_,_) 0040: jump_if_no_match 00024 0043: [4|[1, 2, 3]|1|[2, 3]|->[2, 3]<-] (_,_,_,_,_,_,_,_) 0043: ***accessing keyword: base :first stack depth: 1 0045: [4|[1, 2, 3]|1|[2, 3]|->[2, 3]<-] (_,_,_,_,_,_,_,_) 0045: resolving binding `base` in first 0047: [4|[1, 2, 3]|1|[2, 3]|->[2, 3]<-] (_,_,_,_,_,_,_,_) 0047: get_upvalue 000 0049: [4|[1, 2, 3]|1|[2, 3]|->[2, 3]<-|#{:append fn append/...] (_,_,_,_,_,_,_,_) 0049: constant 00001: :first 0052: [4|[1, 2, 3]|1|[2, 3]|->[2, 3]<-|#{:append fn append/...|:first] (_,_,_,_,_,_,_,_) 0052: get_key? 0053: [4|[1, 2, 3]|1|[2, 3]|->[2, 3]<-|fn first/base] (_,_,_,_,_,_,_,_) 0053: ***after keyword access stack depth: 2 0055: [4|[1, 2, 3]|1|[2, 3]|->[2, 3]<-|fn first/base] (_,_,_,_,_,_,_,_) 0055: stash 0056: [4|[1, 2, 3]|1|[2, 3]|->[2, 3]<-|fn first/base] (fn first/base,_,_,_,_,_,_,_) 0056: pop 0057: [4|[1, 2, 3]|1|[2, 3]|->[2, 3]<-] (fn first/base,_,_,_,_,_,_,_) 0057: resolving binding `xs` in first 0059: [4|[1, 2, 3]|1|[2, 3]|->[2, 3]<-] (fn first/base,_,_,_,_,_,_,_) 0059: push_binding 000 0061: [4|[1, 2, 3]|1|[2, 3]|->[2, 3]<-|[2, 3]] (fn first/base,_,_,_,_,_,_,_) 0061: load 0062: [4|[1, 2, 3]|1|[2, 3]|->[2, 3]<-|[2, 3]|fn first/base] (_,_,_,_,_,_,_,_) 0062: tail_call 001 === tail call into fn first/base/1 from first === 0158: [->4<-|[1, 2, 3]|1|[2, 3]|2] (_,_,_,_,_,_,_,_) 0158: resolving binding `test` in test 0160: [->4<-|[1, 2, 3]|1|[2, 3]|2] (_,_,_,_,_,_,_,_) 0160: push_binding 000 0162: [->4<-|[1, 2, 3]|1|[2, 3]|2|4] (_,_,_,_,_,_,_,_) 0162: resolving binding `eq?` in test 0164: [->4<-|[1, 2, 3]|1|[2, 3]|2|4] (_,_,_,_,_,_,_,_) 0164: constant 00004: :eq? 0167: [->4<-|[1, 2, 3]|1|[2, 3]|2|4|:eq?] (_,_,_,_,_,_,_,_) 0167: push_global 0168: [->4<-|[1, 2, 3]|1|[2, 3]|2|4|fn eq?] (_,_,_,_,_,_,_,_) 0168: ***after 2 args stack depth: 7 0170: [->4<-|[1, 2, 3]|1|[2, 3]|2|4|fn eq?] (_,_,_,_,_,_,_,_) 0170: call 002 === calling into fn eq?/2 === 0000: [4|[1, 2, 3]|1|[2, 3]|->2<-|4] (_,_,_,_,_,_,_,_) 0000: reset_match 0001: [4|[1, 2, 3]|1|[2, 3]|->2<-|4] (_,_,_,_,_,_,_,_) 0001: match_depth 001 0003: [4|[1, 2, 3]|1|[2, 3]|->2<-|4] (_,_,_,_,_,_,_,_) 0003: match 0004: [4|[1, 2, 3]|1|[2, 3]|->2<-|4] (_,_,_,_,_,_,_,_) 0004: jump_if_no_match 00009 0007: [4|[1, 2, 3]|1|[2, 3]|->2<-|4] (_,_,_,_,_,_,_,_) 0007: match_depth 000 0009: [4|[1, 2, 3]|1|[2, 3]|->2<-|4] (_,_,_,_,_,_,_,_) 0009: match 0010: [4|[1, 2, 3]|1|[2, 3]|->2<-|4] (_,_,_,_,_,_,_,_) 0010: jump_if_no_match 00003 0013: [4|[1, 2, 3]|1|[2, 3]|->2<-|4] (_,_,_,_,_,_,_,_) 0013: jump 00000 0016: [4|[1, 2, 3]|1|[2, 3]|->2<-|4] (_,_,_,_,_,_,_,_) 0016: jump_if_no_match 00029 0019: [4|[1, 2, 3]|1|[2, 3]|->2<-|4] (_,_,_,_,_,_,_,_) 0019: ***accessing keyword: base :eq? stack depth: 2 0021: [4|[1, 2, 3]|1|[2, 3]|->2<-|4] (_,_,_,_,_,_,_,_) 0021: resolving binding `base` in eq? 0023: [4|[1, 2, 3]|1|[2, 3]|->2<-|4] (_,_,_,_,_,_,_,_) 0023: get_upvalue 000 0025: [4|[1, 2, 3]|1|[2, 3]|->2<-|4|#{:append fn append/...] (_,_,_,_,_,_,_,_) 0025: constant 00000: :eq? 0028: [4|[1, 2, 3]|1|[2, 3]|->2<-|4|#{:append fn append/...|:eq?] (_,_,_,_,_,_,_,_) 0028: get_key 0029: [4|[1, 2, 3]|1|[2, 3]|->2<-|4|fn eq?/base] (_,_,_,_,_,_,_,_) 0029: ***after keyword access stack depth: 3 0031: [4|[1, 2, 3]|1|[2, 3]|->2<-|4|fn eq?/base] (_,_,_,_,_,_,_,_) 0031: stash 0032: [4|[1, 2, 3]|1|[2, 3]|->2<-|4|fn eq?/base] (fn eq?/base,_,_,_,_,_,_,_) 0032: pop 0033: [4|[1, 2, 3]|1|[2, 3]|->2<-|4] (fn eq?/base,_,_,_,_,_,_,_) 0033: resolving binding `x` in eq? 0035: [4|[1, 2, 3]|1|[2, 3]|->2<-|4] (fn eq?/base,_,_,_,_,_,_,_) 0035: push_binding 000 0037: [4|[1, 2, 3]|1|[2, 3]|->2<-|4|2] (fn eq?/base,_,_,_,_,_,_,_) 0037: resolving binding `y` in eq? 0039: [4|[1, 2, 3]|1|[2, 3]|->2<-|4|2] (fn eq?/base,_,_,_,_,_,_,_) 0039: push_binding 001 0041: [4|[1, 2, 3]|1|[2, 3]|->2<-|4|2|4] (fn eq?/base,_,_,_,_,_,_,_) 0041: load 0042: [4|[1, 2, 3]|1|[2, 3]|->2<-|4|2|4|fn eq?/base] (_,_,_,_,_,_,_,_) 0042: tail_call 002 === tail call into fn eq?/base/2 from eq? === 0172: [->4<-|[1, 2, 3]|1|[2, 3]|false] (_,_,_,_,_,_,_,_) 0172: jump_if_false 00004 0179: [->4<-|[1, 2, 3]|1|[2, 3]] (_,_,_,_,_,_,_,_) 0179: before visiting recur args the compiler thinks the stack depth is 5 0181: [->4<-|[1, 2, 3]|1|[2, 3]] (_,_,_,_,_,_,_,_) 0181: recur arg: 0 0183: [->4<-|[1, 2, 3]|1|[2, 3]] (_,_,_,_,_,_,_,_) 0183: resolving binding `xs` in test 0185: [->4<-|[1, 2, 3]|1|[2, 3]] (_,_,_,_,_,_,_,_) 0185: push_binding 003 0187: [->4<-|[1, 2, 3]|1|[2, 3]|[2, 3]] (_,_,_,_,_,_,_,_) 0187: after visiting recur args the compiler thinks the stack depth is 6 0189: [->4<-|[1, 2, 3]|1|[2, 3]|[2, 3]] (_,_,_,_,_,_,_,_) 0189: store_n 001 0191: [->4<-|[1, 2, 3]|1|[2, 3]] ([2, 3],_,_,_,_,_,_,_) 0191: pop_n 004 0193: [] ([2, 3],_,_,_,_,_,_,_) 0193: load 0194: [->[2, 3]<-] (_,_,_,_,_,_,_,_) 0194: jump_back 00168 0026: [->[2, 3]<-] (_,_,_,_,_,_,_,_) 0026: ***after load, stack depth is now 2 0028: [->[2, 3]<-] (_,_,_,_,_,_,_,_) 0028: reset_match 0029: [->[2, 3]<-] (_,_,_,_,_,_,_,_) 0029: match_depth 000 0031: [->[2, 3]<-] (_,_,_,_,_,_,_,_) 0031: match_list 000 0033: [->[2, 3]<-] (_,_,_,_,_,_,_,_) 0033: jump_if_no_match 00006 0042: [->[2, 3]<-] (_,_,_,_,_,_,_,_) 0042: jump_if_no_match 00010 0055: [->[2, 3]<-] (_,_,_,_,_,_,_,_) 0055: reset_match 0056: [->[2, 3]<-] (_,_,_,_,_,_,_,_) 0056: match_depth 000 0058: [->[2, 3]<-] (_,_,_,_,_,_,_,_) 0058: match_list 001 0060: [->[2, 3]<-] (_,_,_,_,_,_,_,_) 0060: jump_if_no_match 00012 0075: [->[2, 3]<-] (_,_,_,_,_,_,_,_) 0075: jump_if_no_match 00030 0108: [->[2, 3]<-] (_,_,_,_,_,_,_,_) 0108: reset_match 0109: [->[2, 3]<-] (_,_,_,_,_,_,_,_) 0109: match_depth 000 0111: [->[2, 3]<-] (_,_,_,_,_,_,_,_) 0111: match_splatted_list 002 0113: [->[2, 3]<-] (_,_,_,_,_,_,_,_) 0113: jump_if_no_match 00019 0116: [->[2, 3]<-] (_,_,_,_,_,_,_,_) 0116: load_splatted_list 002 0118: [->[2, 3]<-|2|[3]] (_,_,_,_,_,_,_,_) 0118: match_depth 001 0120: [->[2, 3]<-|2|[3]] (_,_,_,_,_,_,_,_) 0120: match 0121: [->[2, 3]<-|2|[3]] (_,_,_,_,_,_,_,_) 0121: jump_if_no_match 00010 0124: [->[2, 3]<-|2|[3]] (_,_,_,_,_,_,_,_) 0124: match_depth 000 0126: [->[2, 3]<-|2|[3]] (_,_,_,_,_,_,_,_) 0126: match 0127: [->[2, 3]<-|2|[3]] (_,_,_,_,_,_,_,_) 0127: jump_if_no_match 00004 0130: [->[2, 3]<-|2|[3]] (_,_,_,_,_,_,_,_) 0130: jump 00002 0135: [->[2, 3]<-|2|[3]] (_,_,_,_,_,_,_,_) 0135: jump_if_no_match 00068 0138: [->[2, 3]<-|2|[3]] (_,_,_,_,_,_,_,_) 0138: ***before visiting body, the stack depth is 4 0140: [->[2, 3]<-|2|[3]] (_,_,_,_,_,_,_,_) 0140: ***calling function eq? stack depth: 4 0142: [->[2, 3]<-|2|[3]] (_,_,_,_,_,_,_,_) 0142: ***calling function first stack depth: 4 0144: [->[2, 3]<-|2|[3]] (_,_,_,_,_,_,_,_) 0144: resolving binding `xs` in test 0146: [->[2, 3]<-|2|[3]] (_,_,_,_,_,_,_,_) 0146: push_binding 003 thread 'main' panicked at src/vm.rs:313:51: index out of bounds: the len is 3 but the index is 3