aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2014-01-20 10:22:14 +0100
committerBjörn Gustavsson <[email protected]>2014-01-20 10:22:14 +0100
commit7ba68e1dc45981a82ccec84d157699606d664431 (patch)
treebc9ce3249e7e47f614368a2a7044480af9748daf /lib
parente19b19ceeabff388fb53df46298a5c81f171a8bc (diff)
parent8c39400c7fb03f3dd7d9dbfb01c43e5e91d7086c (diff)
downloadotp-7ba68e1dc45981a82ccec84d157699606d664431.tar.gz
otp-7ba68e1dc45981a82ccec84d157699606d664431.tar.bz2
otp-7ba68e1dc45981a82ccec84d157699606d664431.zip
Merge branch 'bjorn/fix-line-number-in-bs-exception/OTP-11572'
* bjorn/fix-line-number-in-bs-exception/OTP-11572: compiler: Correct line number in exception from binary construction
Diffstat (limited to 'lib')
-rw-r--r--lib/compiler/src/v3_codegen.erl3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/compiler/src/v3_codegen.erl b/lib/compiler/src/v3_codegen.erl
index 6a13495523..f534500671 100644
--- a/lib/compiler/src/v3_codegen.erl
+++ b/lib/compiler/src/v3_codegen.erl
@@ -1466,10 +1466,11 @@ set_cg([{var,R}], Con, Le, Vdb, Bef, St) ->
cg_binary([{bs_put_binary,Fail,{atom,all},U,_Flags,Src}|PutCode],
Target, Temp, Fail, MaxRegs, Anno) ->
+ Line = line(Anno),
Live = cg_live(Target, MaxRegs),
SzCode = cg_bitstr_size(PutCode, Target, Temp, Fail, Live),
BinFlags = {field_flags,[]},
- Code = SzCode ++
+ Code = [Line|SzCode] ++
[case member(single_use, Anno) of
true ->
{bs_private_append,Fail,Target,U,Src,BinFlags,Target};