aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2013-09-20 16:28:30 +0200
committerBjörn-Egil Dahlberg <[email protected]>2014-01-28 15:56:25 +0100
commit2a943f14a44903eb8e67549978de5dbf7275ad57 (patch)
tree1cea549e7b8ac08d4e15bd090256d7b7b85311ba /lib/compiler
parentfa49c8ecac4996b47b17f9025240e202eb273389 (diff)
downloadotp-2a943f14a44903eb8e67549978de5dbf7275ad57.tar.gz
otp-2a943f14a44903eb8e67549978de5dbf7275ad57.tar.bz2
otp-2a943f14a44903eb8e67549978de5dbf7275ad57.zip
compiler: Fix no basic blocks for maps
Diffstat (limited to 'lib/compiler')
-rw-r--r--lib/compiler/src/v3_codegen.erl3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/compiler/src/v3_codegen.erl b/lib/compiler/src/v3_codegen.erl
index bd5ced39e5..667f10a7f5 100644
--- a/lib/compiler/src/v3_codegen.erl
+++ b/lib/compiler/src/v3_codegen.erl
@@ -455,8 +455,11 @@ basic_block([Le|Les], Acc) ->
end;
no_block -> {reverse(Acc, [Le]),Les}
end.
+
+%% sets that may garbage collect are not allowed in basic blocks.
collect_block({set,_,{binary,_}}) -> no_block;
+collect_block({set,_,{map,_,_}}) -> no_block;
collect_block({set,_,_}) -> include;
collect_block({call,{var,_}=Var,As,_Rs}) -> {block_end,As++[Var]};
collect_block({call,Func,As,_Rs}) -> {block_end,As++func_vars(Func)};