From 7bd678640d855ee9053d6d78434a98d977ad0f1f Mon Sep 17 00:00:00 2001 From: Anthony Ramine Date: Tue, 19 Nov 2013 18:17:53 +0100 Subject: Collect all optimised allocate instructions in beam_block Any init instruction following an allocate is put in the Inits list of the corresponding alloc tuple. --- lib/compiler/src/beam_flatten.erl | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/compiler/src/beam_flatten.erl') diff --git a/lib/compiler/src/beam_flatten.erl b/lib/compiler/src/beam_flatten.erl index 25428c0c10..5603a677e8 100644 --- a/lib/compiler/src/beam_flatten.erl +++ b/lib/compiler/src/beam_flatten.erl @@ -51,6 +51,7 @@ norm_block([], Acc) -> Acc. norm({set,[D],As,{bif,N,F}}) -> {bif,N,F,As,D}; norm({set,[D],As,{alloc,R,{gc_bif,N,F}}}) -> {gc_bif,N,F,R,As,D}; +norm({set,[D],[],init}) -> {init,D}; norm({set,[D],[S],move}) -> {move,S,D}; norm({set,[D],[S],fmove}) -> {fmove,S,D}; norm({set,[D],[S],fconv}) -> {fconv,S,D}; -- cgit v1.2.3