aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/src/beam_utils.erl
AgeCommit message (Collapse)Author
2012-08-15beam_utils:live_opt/1: Correct handling of try_case_end/1Björn Gustavsson
Liveness for the try_case_end/1 instruction should be calculated in the same way as for the case_end/1 instruction.
2012-03-30Update copyright yearsBjörn-Egil Dahlberg
2012-01-18compiler: Correct live calculation when get/1 is used in try...catchBjörn Gustavsson
In the following code excerpt, the instruction marked below was incorrectly removed: . . . {'try',{y,2},{f,TryCaseLabel}}. {bif,get,{f,0},[{x,0}],{x,0}}. {move,{x,1},{y,0}}. {move,{x,3},{y,1}}. <======= Incorrectly removed {jump,{f,TryEndLabel}}. {label,TryEndLabel}. {try_end,{y,2}}. {deallocate,3}. return. {label,TryCaseLabel}. {try_case,{y,2}}. . . . beam_utils indicated that {y,1} was not used at TryEndLabel, which by itself is correct. But it is still not safe to remove the instruction, because {y,1} might be used at TryCaseLabel if an exception occurs. Noticed-by: Eric Merritt
2011-12-09Update copyright yearsBjörn-Egil Dahlberg
2011-08-16compiler: Generate line instructionsBjörn Gustavsson
2010-12-02beam_utils: Fix check_liveness/3 for receive loopsBjörn Gustavsson
Sometimes the beam_bool pass wants to know whether an y register will be killed by the code that follows and will do (effectively): beam_utils:is_killed({y,Y}, Code, L) When asked to calculate the liveness for an y register, beam_utils:is_killed/3 will loop forever if the code includes a receive loop. Since this rarely occurs, fix the problem in the simplest and most conservative way. Reported-by: Christopher Williams
2010-11-26beam_utils: Fix liveness analysis for gc_bif instructionsBjörn Gustavsson
When gc_bif instructions occurred outside of a block, beam_utils:check_liveness/3 did not take into account that the instruction could do a garbage collection, and could falsely report that an x register would be killed. That could cause the beam_dead pass to make the code unsafe by removing the assignment to an x register that would subsequently be referenced by the garbage collector. Reported-by: Christopher Williams
2010-05-21Merge branch 'bg/compiler-cover-and-clean' into devErlang/OTP
* bg/compiler-cover-and-clean: v3_life: Remove clause that cannot match in match_fail/3 v3_life tests: Cover exception handling code in v3_life:function/1 beam_type: Remove redundant clause v3_core tests: Cover make_bool_switch_guard/5 v3_core tests: Cover handling of pattern aliases v3_core: Remove a clause in is_simple/1 that cannot match v3_core: Remove unused support for generating compilation errors Remove stray support for the put_literal/2 instruction Remove stray support for the bs_bits_to_bytes2/2 instruction Remove the bs_bits_to_bytes/3 instruction Cover handling of 'math' BIFs beam_bool: Remove a clause in live_regs/1 that cannot match beam_bool: Cover handling of bs_context_to_binary in initialized_regs/2 beam_bool: Remove a clause in initialized_regs/2 that cannot match beam_block: Remove a clause that will never be executed erts: Stop supporting non-literal empty tuples compile: Remove code that is only executed on Solaris Do not cover-analyze core_scan core_SUITE_data: Don't ignore *.core files in this directory OTP-8636 bg/compiler-cover-and-clean
2010-05-20Remove stray support for the bs_bits_to_bytes2/2 instructionBjörn Gustavsson
bs_bits_to_bytes2/2 was an experimental instruction added in R11, but was removed in R12. Although the beam_disasm and beam_validator modules do support instructions in older releases, there is no reason to have them support experimental instructions.
2009-11-20The R13B03 release.OTP_R13B03Erlang/OTP