Age | Commit message (Collapse) | Author | |
---|---|---|---|
2014-01-28 | compiler: Implement different instructions for => and := | Björn Gustavsson | |
2013-06-12 | Update copyright years | Björn-Egil Dahlberg | |
2013-05-28 | Fix renaming of bs_put_string instructions | Anthony Ramine | |
The clause was formerly commented-out because at this point in the code, no bs_put_string instruction has been generated yet when compiling from Erlang. If an Erlang module is compiled to BEAM assembly and the result contains a bs_put_string instruction, the output can't be compiled to binary anymore and the compiler crashes with the following error: $ erlc prs.S Function: compress/1 prs.S:none: internal error in beam_block; crash reason: {{case_clause, {'EXIT', {function_clause, [{beam_utils,live_opt, [[{bs_put_string,1,{string,[0]}}, {bs_init, {f,0}, {bs_append,0,8,{field_flags,[]}}, 0, [{integer,8},{x,0}], {x,1}}, {label,2}], 2, {1,{1,1,nil,nil}}, [{block, [{'%live',2}, {set,[{x,0}],[{x,1}],move}, {'%live',1}]}, return]], [{file,"beam_utils.erl"},{line,639}]}, {beam_utils,live_opt,1, [{file,"beam_utils.erl"},{line,205}]}, {beam_block,function,2, [{file,"beam_block.erl"},{line,38}]}, {lists,mapfoldl,3, [{file,"lists.erl"},{line,1329}]}, {beam_block,module,2, [{file,"beam_block.erl"},{line,29}]}, {compile,'-select_passes/2-anonymous-2-',2, [{file,"compile.erl"},{line,476}]}, {compile,'-internal_comp/4-anonymous-1-',2, [{file,"compile.erl"},{line,276}]}, {compile,fold_comp,3, [{file,"compile.erl"},{line,294}]}]}}}, [{compile,'-select_passes/2-anonymous-2-',2, [{file,"compile.erl"},{line,476}]}, {compile,'-internal_comp/4-anonymous-1-',2, [{file,"compile.erl"},{line,276}]}, {compile,fold_comp,3,[{file,"compile.erl"},{line,294}]}, {compile,internal_comp,4,[{file,"compile.erl"},{line,278}]}, {compile,'-do_compile/2-anonymous-0-',2, [{file,"compile.erl"},{line,152}]}]} | |||
2012-10-10 | Break apart tail-recursive call instructions | Björn Gustavsson | |
Somewhat reduce the code bloat by eliminating special cases. | |||
2012-10-10 | Represent the 'send' instruction as a call_ext/2 instruction | Björn Gustavsson | |
Somewhat reduce code bloat. | |||
2012-10-10 | Rewrite select_val and select_tuple_arity to a select instruction | Björn Gustavsson | |
Eliminate some code bloat. | |||
2012-10-09 | Rewrite binary creation instructions to bs_init instructions | Björn Gustavsson | |
Rewrite the five binary creation instructions to a bs_init instruction, in order to somewhat reduce code bloat. | |||
2012-10-09 | Rewrite bs_add, bs_utf*_size to BIF instructions in optimizations | Björn Gustavsson | |
We can remove some code bloat by handling the special instructions as BIF instructions in the optimization passes. Also note that bs_utf*_size was not handled by beam_utils:check_liveness/3 (meaning the conservative answer instead of the correct answer would be returned). | |||
2012-10-09 | Rewrite bs_put* instructions to a generic bs_put instruction | Björn Gustavsson | |
Seven bs_put_* instructions can be combined into one generic bs_put instruction to avoid some code bloat. That will also improve some optimizations (such as beam_trim) that did not handle all bs_put* variants. | |||
2012-10-09 | Refactor removal of unused labels | Björn Gustavsson | |
Since we always want to remove unused labels directly after code generation (whether we'll run the optimization passes or not), we can simplify the code by doing it in beam_a. | |||
2012-10-09 | Introduce the mandatory beam_a and beam_z passes | Björn Gustavsson | |
Introduce the mandary beam_a pass that will be run directly after code generation, and the mandatory beam_z pass that will be run just before beam_asm. Since these passes surround the optimizations, beam_a can (for example) do instruction renaming to simplify the optimization passes and beam_z can undo those renamings. |