Skip to content

Instantly share code, notes, and snippets.

@nox
Created February 15, 2014 02:13
Show Gist options
  • Save nox/9013567 to your computer and use it in GitHub Desktop.
Save nox/9013567 to your computer and use it in GitHub Desktop.
Changed BEAM code when bootstrapping with v3_core-comprehensions-cleanup
--- old/compile.S 2014-02-14 21:29:30.000000000 +0100
+++ new/compile.S 2014-02-14 21:29:20.000000000 +0100
@@ -8482,10 +8482,10 @@
{call_only,1,{f,233}}.
-{function, '-mpf/1-lc$^2/1-2-', 1, 853}.
+{function, '-mpf/1-lc$^0/1-2-', 1, 853}.
{label,852}.
{line,[{location,"lib/compiler/src/compile.erl",389}]}.
- {func_info,{atom,compile},{atom,'-mpf/1-lc$^2/1-2-'},1}.
+ {func_info,{atom,compile},{atom,'-mpf/1-lc$^0/1-2-'},1}.
{label,853}.
{test,is_nonempty_list,{f,855},[{x,0}]}.
{get_list,{x,0},{x,1},{x,2}}.
@@ -8508,10 +8508,10 @@
return.
-{function, '-mpf/1-lc$^0/1-0-', 2, 857}.
+{function, '-mpf/1-lc$^1/1-0-', 2, 857}.
{label,856}.
{line,[{location,"lib/compiler/src/compile.erl",388}]}.
- {func_info,{atom,compile},{atom,'-mpf/1-lc$^0/1-0-'},2}.
+ {func_info,{atom,compile},{atom,'-mpf/1-lc$^1/1-0-'},2}.
{label,857}.
{test,is_nonempty_list,{f,858},[{x,0}]}.
{allocate,3,2}.
@@ -8547,10 +8547,10 @@
{call_ext,2,{extfunc,erlang,error,2}}.
-{function, '-mpf/1-lc$^1/1-1-', 2, 861}.
+{function, '-mpf/1-lc$^2/1-1-', 2, 861}.
{label,860}.
{line,[{location,"lib/compiler/src/compile.erl",388}]}.
- {func_info,{atom,compile},{atom,'-mpf/1-lc$^1/1-1-'},2}.
+ {func_info,{atom,compile},{atom,'-mpf/1-lc$^2/1-1-'},2}.
{label,861}.
{test,is_nonempty_list,{f,863},[{x,0}]}.
{get_list,{x,0},{x,2},{x,3}}.
--- old/erl_lint.S 2014-02-14 21:19:07.000000000 +0100
+++ new/erl_lint.S 2014-02-14 21:18:59.000000000 +0100
@@ -21553,10 +21553,10 @@
{call_only,2,{f,207}}.
-{function, '-pack_warnings/1-lc$^2/1-2-', 1, 2092}.
+{function, '-pack_warnings/1-lc$^0/1-2-', 1, 2092}.
{label,2091}.
{line,[{location,"lib/stdlib/src/erl_lint.erl",564}]}.
- {func_info,{atom,erl_lint},{atom,'-pack_warnings/1-lc$^2/1-2-'},1}.
+ {func_info,{atom,erl_lint},{atom,'-pack_warnings/1-lc$^0/1-2-'},1}.
{label,2092}.
{test,is_nonempty_list,{f,2094},[{x,0}]}.
{get_list,{x,0},{x,1},{x,2}}.
@@ -21579,10 +21579,10 @@
return.
-{function, '-pack_warnings/1-lc$^0/1-0-', 2, 2096}.
+{function, '-pack_warnings/1-lc$^1/1-0-', 2, 2096}.
{label,2095}.
{line,[{location,"lib/stdlib/src/erl_lint.erl",563}]}.
- {func_info,{atom,erl_lint},{atom,'-pack_warnings/1-lc$^0/1-0-'},2}.
+ {func_info,{atom,erl_lint},{atom,'-pack_warnings/1-lc$^1/1-0-'},2}.
{label,2096}.
{test,is_nonempty_list,{f,2097},[{x,0}]}.
{allocate,3,2}.
@@ -21620,10 +21620,10 @@
{call_ext,2,{extfunc,erlang,error,2}}.
-{function, '-pack_warnings/1-lc$^1/1-1-', 2, 2100}.
+{function, '-pack_warnings/1-lc$^2/1-1-', 2, 2100}.
{label,2099}.
{line,[{location,"lib/stdlib/src/erl_lint.erl",563}]}.
- {func_info,{atom,erl_lint},{atom,'-pack_warnings/1-lc$^1/1-1-'},2}.
+ {func_info,{atom,erl_lint},{atom,'-pack_warnings/1-lc$^2/1-1-'},2}.
{label,2100}.
{test,is_nonempty_list,{f,2102},[{x,0}]}.
{get_list,{x,0},{x,2},{x,3}}.
--- old/qlc_pt.S 2014-02-14 21:26:12.000000000 +0100
+++ new/qlc_pt.S 2014-02-14 21:26:20.000000000 +0100
@@ -13958,10 +13958,10 @@
{call_only,2,{f,311}}.
-{function, '-join_gens2/3-lc$^1/1-1-', 1, 1217}.
+{function, '-join_gens2/3-lc$^0/1-1-', 1, 1217}.
{label,1216}.
{line,[{location,"lib/stdlib/src/qlc_pt.erl",1301}]}.
- {func_info,{atom,qlc_pt},{atom,'-join_gens2/3-lc$^1/1-1-'},1}.
+ {func_info,{atom,qlc_pt},{atom,'-join_gens2/3-lc$^0/1-1-'},1}.
{label,1217}.
{test,is_nonempty_list,{f,1218},[{x,0}]}.
{allocate,1,1}.
@@ -13982,10 +13982,10 @@
return.
-{function, '-join_gens2/3-lc$^0/1-0-', 3, 1220}.
+{function, '-join_gens2/3-lc$^1/1-0-', 3, 1220}.
{label,1219}.
{line,[{location,"lib/stdlib/src/qlc_pt.erl",1295}]}.
- {func_info,{atom,qlc_pt},{atom,'-join_gens2/3-lc$^0/1-0-'},3}.
+ {func_info,{atom,qlc_pt},{atom,'-join_gens2/3-lc$^1/1-0-'},3}.
{label,1220}.
{test,is_nonempty_list,{f,1223},[{x,0}]}.
{allocate,4,3}.
@@ -14203,11 +14203,11 @@
{call,5,{f,365}}.
{test,is_ne_exact,{f,1247},[nil,{x,0}]}.
{move,{y,5},{x,6}}.
- {move,{y,6},{x,7}}.
+ {move,{x,0},{x,7}}.
{move,{y,4},{x,5}}.
- {move,{y,7},{x,8}}.
+ {move,{y,6},{x,8}}.
{move,{y,3},{x,4}}.
- {move,{x,0},{x,9}}.
+ {move,{y,7},{x,9}}.
{move,{y,2},{x,3}}.
{move,{y,8},{x,10}}.
{move,{y,1},{x,2}}.
@@ -14287,7 +14287,7 @@
{move,{y,5},{x,5}}.
{kill,{y,0}}.
{kill,{y,1}}.
- {move,{y,10},{x,0}}.
+ {move,{y,8},{x,0}}.
{line,[{location,"lib/stdlib/src/qlc_pt.erl",1210}]}.
{call,6,{f,385}}.
{line,[{location,"lib/stdlib/src/qlc_pt.erl",1210}]}.
@@ -14299,9 +14299,9 @@
{line,[{location,"lib/stdlib/src/qlc_pt.erl",1220}]}.
{gc_bif,length,{f,0},1,[{x,0}],{x,1}}.
{test,is_eq_exact,{f,1253},[{x,1},{integer,1}]}.
- {move,{y,9},{x,8}}.
+ {move,{x,0},{x,8}}.
{move,{y,8},{x,7}}.
- {move,{x,0},{x,9}}.
+ {move,{y,9},{x,9}}.
{move,{y,7},{x,6}}.
{move,{y,10},{x,10}}.
{move,{y,6},{x,5}}.
@@ -14314,7 +14314,7 @@
{move,{y,14},{x,14}}.
{move,{y,2},{x,1}}.
{move,{y,15},{x,15}}.
- {move,{y,10},{x,0}}.
+ {move,{y,8},{x,0}}.
{call_last,16,{f,1258},16}.
{label,1253}.
{move,{y,7},{x,6}}.
@@ -14336,6 +14336,8 @@
{call_only,13,{f,1252}}.
{label,1255}.
{test,is_nil,{f,1256},[{x,0}]}.
+ {move,{x,8},{x,7}}.
+ {move,{x,9},{x,8}}.
{move,{x,10},{x,9}}.
{move,{x,11},{x,0}}.
{call_only,10,{f,1246}}.
@@ -14355,8 +14357,8 @@
{test,is_nonempty_list,{f,1263},[{x,0}]}.
{allocate_zero,21,16}.
{get_list,{x,0},{x,16},{x,17}}.
- {test,is_nonempty_list,{f,1269},[{x,9}]}.
- {get_list,{x,9},{x,0},{x,18}}.
+ {test,is_nonempty_list,{f,1269},[{x,8}]}.
+ {get_list,{x,8},{x,0},{x,18}}.
{test,is_tuple,{f,1269},[{x,0}]}.
{test,test_arity,{f,1269},[{x,0},2]}.
{get_tuple_element,{x,0},0,{x,19}}.
@@ -14407,7 +14409,7 @@
{move,{y,1},{x,3}}.
{move,{y,13},{x,1}}.
{move,{y,5},{x,4}}.
- {move,{y,8},{x,0}}.
+ {move,{y,10},{x,0}}.
{move,{x,5},{y,19}}.
{line,[{location,"lib/stdlib/src/qlc_pt.erl",1232}]}.
{call,5,{f,416}}.
@@ -14515,6 +14517,7 @@
{call_last,16,{f,1258},21}.
{label,1263}.
{test,is_nil,{f,1270},[{x,0}]}.
+ {move,{x,9},{x,8}}.
{move,{x,10},{x,9}}.
{move,{x,11},{x,10}}.
{move,{x,14},{x,11}}.
@@ -14539,7 +14542,7 @@
{badmatch,{x,0}}.
{label,1269}.
{line,[{location,"lib/stdlib/src/qlc_pt.erl",1227}]}.
- {badmatch,{x,9}}.
+ {badmatch,{x,8}}.
{label,1270}.
{test_heap,2,1}.
{put_list,{x,0},nil,{x,1}}.
@@ -15397,10 +15400,10 @@
return.
-{function, '-template_cols/1-lc$^0/1-0-', 1, 1386}.
+{function, '-template_cols/1-lc$^1/1-0-', 1, 1386}.
{label,1385}.
{line,[{location,"lib/stdlib/src/qlc_pt.erl",942}]}.
- {func_info,{atom,qlc_pt},{atom,'-template_cols/1-lc$^0/1-0-'},1}.
+ {func_info,{atom,qlc_pt},{atom,'-template_cols/1-lc$^1/1-0-'},1}.
{label,1386}.
{test,is_nonempty_list,{f,1387},[{x,0}]}.
{get_list,{x,0},{x,1},{x,3}}.
@@ -15413,10 +15416,10 @@
return.
-{function, '-template_cols/1-lc$^1/1-1-', 3, 1389}.
+{function, '-template_cols/1-lc$^2/1-1-', 3, 1389}.
{label,1388}.
{line,[{location,"lib/stdlib/src/qlc_pt.erl",942}]}.
- {func_info,{atom,qlc_pt},{atom,'-template_cols/1-lc$^1/1-1-'},3}.
+ {func_info,{atom,qlc_pt},{atom,'-template_cols/1-lc$^2/1-1-'},3}.
{label,1389}.
{test,is_nonempty_list,{f,1392},[{x,0}]}.
{get_list,{x,0},{x,3},{x,4}}.
@@ -15476,10 +15479,10 @@
{call_ext,2,{extfunc,erlang,error,2}}.
-{function, '-template_cols/1-lc$^2/1-2-', 1, 1395}.
+{function, '-template_cols/1-lc$^0/1-2-', 1, 1395}.
{label,1394}.
{line,[{location,"lib/stdlib/src/qlc_pt.erl",946}]}.
- {func_info,{atom,qlc_pt},{atom,'-template_cols/1-lc$^2/1-2-'},1}.
+ {func_info,{atom,qlc_pt},{atom,'-template_cols/1-lc$^0/1-2-'},1}.
{label,1395}.
{test,is_nonempty_list,{f,1397},[{x,0}]}.
{get_list,{x,0},{x,1},{x,2}}.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment