aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/src/beam_clean.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2012-09-03 12:08:40 +0200
committerBjörn Gustavsson <[email protected]>2012-10-09 15:24:42 +0200
commit0772d1063c3e03cfb575fb5e948c120cfee14605 (patch)
tree90b735d1ef71dea89c935b2b5507bab584f58b9f /lib/compiler/src/beam_clean.erl
parented7ab81375d599c73cbe0d2195102187957c25d6 (diff)
downloadotp-0772d1063c3e03cfb575fb5e948c120cfee14605.tar.gz
otp-0772d1063c3e03cfb575fb5e948c120cfee14605.tar.bz2
otp-0772d1063c3e03cfb575fb5e948c120cfee14605.zip
Rewrite binary creation instructions to bs_init instructions
Rewrite the five binary creation instructions to a bs_init instruction, in order to somewhat reduce code bloat.
Diffstat (limited to 'lib/compiler/src/beam_clean.erl')
-rw-r--r--lib/compiler/src/beam_clean.erl9
1 files changed, 2 insertions, 7 deletions
diff --git a/lib/compiler/src/beam_clean.erl b/lib/compiler/src/beam_clean.erl
index 083ccb32fa..39710490df 100644
--- a/lib/compiler/src/beam_clean.erl
+++ b/lib/compiler/src/beam_clean.erl
@@ -242,15 +242,10 @@ replace([{call_only,Ar,{f,Lbl}}|Is], Acc, D) ->
replace(Is, [{call_only,Ar,{f,label(Lbl, D)}}|Acc], D);
replace([{make_fun2,{f,Lbl},U1,U2,U3}|Is], Acc, D) ->
replace(Is, [{make_fun2,{f,label(Lbl, D)},U1,U2,U3}|Acc], D);
-replace([{bs_init2,{f,Lbl},Sz,Words,R,F,Dst}|Is], Acc, D) when Lbl =/= 0 ->
- replace(Is, [{bs_init2,{f,label(Lbl, D)},Sz,Words,R,F,Dst}|Acc], D);
-replace([{bs_init_bits,{f,Lbl},Sz,Words,R,F,Dst}|Is], Acc, D) when Lbl =/= 0 ->
- replace(Is, [{bs_init_bits,{f,label(Lbl, D)},Sz,Words,R,F,Dst}|Acc], D);
+replace([{bs_init,{f,Lbl},Info,Live,Ss,Dst}|Is], Acc, D) when Lbl =/= 0 ->
+ replace(Is, [{bs_init,{f,label(Lbl, D)},Info,Live,Ss,Dst}|Acc], D);
replace([{bs_put,{f,Lbl},Info,Ss}|Is], Acc, D) when Lbl =/= 0 ->
replace(Is, [{bs_put,{f,label(Lbl, D)},Info,Ss}|Acc], D);
-replace([{bs_append,{f,Lbl},_,_,_,_,_,_,_}=I0|Is], Acc, D) when Lbl =/= 0 ->
- I = setelement(2, I0, {f,label(Lbl, D)}),
- replace(Is, [I|Acc], D);
replace([I|Is], Acc, D) ->
replace(Is, [I|Acc], D);
replace([], Acc, _) -> Acc.