diff options
author | Björn Gustavsson <[email protected]> | 2012-03-14 11:29:00 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2012-03-14 11:29:00 +0100 |
commit | 96c544b77b3ca961e3aff3913a96c535b91aab2b (patch) | |
tree | f717edf92f43cd02b0f86d9bdf53819b6c23acd6 /lib/compiler/src/v3_codegen.erl | |
parent | cd992c382c60fbb2a4126b4d7407df354e11a3ec (diff) | |
parent | ecb5470bbcaaead92fdbe43e190b0557ca8f39fa (diff) | |
download | otp-96c544b77b3ca961e3aff3913a96c535b91aab2b.tar.gz otp-96c544b77b3ca961e3aff3913a96c535b91aab2b.tar.bz2 otp-96c544b77b3ca961e3aff3913a96c535b91aab2b.zip |
Merge branch 'bjorn/compiler/coverage-and-minor-fixes/OTP-9982' into maint
* bjorn/compiler/coverage-and-minor-fixes/OTP-9982:
v3_life: Use common code for guards and bodies
v3_core: Don't put negative line numbers in annotations
v3_kernel: Dig out the line number only when generating a warning
v3_kernel: Clean up handling of guards
v3_kernel: Introduce is_in_guard/1
v3_kernel: Removed unreached clause for #k_bin_int{} in sub_size_var/1
v3_kernel: Remove unreached handling of #k_bin_int{} in arg_con/1
v3_codegen: Eliminate the special case of 'put' without destination
v3_kernel: Don't attempt to share identical literals
v3_kernel: Handle sequences in guards
v3_kernel: Remove clauses that are never executed in arg_val/1
v3_kernel.hrl: Remove unused record #k_string{}
v3_kernel.erl: Remove unused define of EXPENSIVE_BINARY_LIMIT
sys_core_fold: Refactor previous_ctx_to_binary/2 to cover it completely
sys_core_fold: Fix opt_guard_try/1
sys_core_fold: Simplify opt_bool_not() to cover it completely
sys_core_fold: Remove duplicate optimization
Diffstat (limited to 'lib/compiler/src/v3_codegen.erl')
-rw-r--r-- | lib/compiler/src/v3_codegen.erl | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/lib/compiler/src/v3_codegen.erl b/lib/compiler/src/v3_codegen.erl index 6623485609..36d35a8122 100644 --- a/lib/compiler/src/v3_codegen.erl +++ b/lib/compiler/src/v3_codegen.erl @@ -1423,20 +1423,7 @@ set_cg([{var,R}], Con, Le, Vdb, Bef, St) -> Other -> [{move,Other,Ret}] end, - {Ais,clear_dead(Int, Le#l.i, Vdb),St}; -set_cg([], {binary,Segs}, Le, Vdb, Bef, St) -> - Fail = {f,St#cg.bfail}, - Target = find_scratch_reg(Bef#sr.reg), - Temp = find_scratch_reg(put_reg(Target, Bef#sr.reg)), - PutCode = cg_bin_put(Segs, Fail, Bef), - MaxRegs = max_reg(Bef#sr.reg), - Code = cg_binary(PutCode, Target, Temp, Fail, MaxRegs, Le#l.a), - Aft = clear_dead(Bef, Le#l.i, Vdb), - {Code,Aft,St}; -set_cg([], _, Le, Vdb, Bef, St) -> - %% This should have been stripped by compiler, just cleanup. - {[],clear_dead(Bef, Le#l.i, Vdb), St}. - + {Ais,clear_dead(Int, Le#l.i, Vdb),St}. %%% %%% Code generation for constructing binaries. @@ -2067,7 +2054,7 @@ line_1(_, 0) -> %% Missing line number or line number 0. {line,[]}; line_1(Name, Line) -> - {line,[{location,Name,abs(Line)}]}. + {line,[{location,Name,Line}]}. find_loc([Line|T], File, _) when is_integer(Line) -> find_loc(T, File, Line); |