aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/src/v3_kernel_pp.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2016-09-29 12:17:58 +0200
committerBjörn Gustavsson <[email protected]>2016-09-29 12:17:58 +0200
commit3651c6bb09319bd4e87892dc9ae0e6620a5a3e8d (patch)
treed1e312ba372e578f8adb0be5c98281df68c61abb /lib/compiler/src/v3_kernel_pp.erl
parent81082ce34fcaa97b0ef66a5e445fdbf2e3b9644c (diff)
parent05130e485558919344584f9bbfa057efdca94c3d (diff)
downloadotp-3651c6bb09319bd4e87892dc9ae0e6620a5a3e8d.tar.gz
otp-3651c6bb09319bd4e87892dc9ae0e6620a5a3e8d.tar.bz2
otp-3651c6bb09319bd4e87892dc9ae0e6620a5a3e8d.zip
Merge branch 'bjorn/compiler/misc'
* bjorn/compiler/misc: sys_core_fold: Run optimizations to a fixpoint sys_core_fold: Improve case optimization sys_core_fold: Correct scope verification code core_pp: Correct printing of map updates Simplify handling of internal BIFs v3_life: Eliminate special handling of guards Simplify beam_utils bs_match_SUITE: Add a test case for beam_utils bif_SUITE: Cover the remaining uncovered lines erl_bifs: Remove error_logger:warning_map/0 as a safe BIF beam_validator: Correct reporting of y register number beam_jump: Don't try to handle a label at the very end beam_jump: Simplify eliminate_fallthroughs/2 beam_listing: Remove support for listing sys_pre_expand format
Diffstat (limited to 'lib/compiler/src/v3_kernel_pp.erl')
-rw-r--r--lib/compiler/src/v3_kernel_pp.erl9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/compiler/src/v3_kernel_pp.erl b/lib/compiler/src/v3_kernel_pp.erl
index 0b90f0a1e0..45065b7e11 100644
--- a/lib/compiler/src/v3_kernel_pp.erl
+++ b/lib/compiler/src/v3_kernel_pp.erl
@@ -279,6 +279,15 @@ format_1(#k_try_enter{arg=A,vars=Vs,body=B,evars=Evs,handler=H}, Ctxt) ->
nl_indent(Ctxt),
"end"
];
+format_1(#k_protected{arg=A,ret=Rs}, Ctxt) ->
+ Ctxt1 = ctxt_bump_indent(Ctxt, Ctxt#ctxt.body_indent),
+ ["protected",
+ nl_indent(Ctxt1),
+ format(A, Ctxt1),
+ nl_indent(Ctxt),
+ "end",
+ format_ret(Rs, ctxt_bump_indent(Ctxt, 1))
+ ];
format_1(#k_catch{body=B,ret=Rs}, Ctxt) ->
Ctxt1 = ctxt_bump_indent(Ctxt, Ctxt#ctxt.body_indent),
["catch",