diff options
author | Björn Gustavsson <[email protected]> | 2013-10-31 15:34:00 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2014-01-20 12:22:42 +0100 |
commit | 912b330733144ae37e7a4da1bfea5be2a46d7594 (patch) | |
tree | 83567913bf2edbf5d421aa3843a488b9089a5aba /lib/asn1/src/asn1ct_imm.erl | |
parent | deae68b06e58027efe0b203bb2c30d3addb24f96 (diff) | |
download | otp-912b330733144ae37e7a4da1bfea5be2a46d7594.tar.gz otp-912b330733144ae37e7a4da1bfea5be2a46d7594.tar.bz2 otp-912b330733144ae37e7a4da1bfea5be2a46d7594.zip |
Keep type information in the apply intermediate instruction
To facilitate inlining of apply calls in the intermediate format.
Diffstat (limited to 'lib/asn1/src/asn1ct_imm.erl')
-rw-r--r-- | lib/asn1/src/asn1ct_imm.erl | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/lib/asn1/src/asn1ct_imm.erl b/lib/asn1/src/asn1ct_imm.erl index 26923b425e..48d380bcbc 100644 --- a/lib/asn1/src/asn1ct_imm.erl +++ b/lib/asn1/src/asn1ct_imm.erl @@ -1719,20 +1719,14 @@ enc_cg(align) -> enc_cg({apply,F0,As0}) -> As = enc_call_args(As0, ""), case F0 of - {M,F} -> - emit([{asis,M},":",{asis,F},"(",As,")"]); - F when is_atom(F) -> - emit([{asis,F},"(",As,")"]) + {local,F,_} when is_atom(F) -> + emit([{asis,F},"(",As,")"]); + {M,F,_} -> + emit([{asis,M},":",{asis,F},"(",As,")"]) end; -enc_cg({apply,F0,As0,Dst}) -> - As = enc_call_args(As0, ""), +enc_cg({apply,F,As,Dst}) -> emit([mk_val(Dst)," = "]), - case F0 of - {M,F} -> - emit([{asis,M},":",{asis,F},"(",As,")"]); - F when is_atom(F) -> - emit([{asis,F},"(",As,")"]) - end; + enc_cg({apply,F,As}); enc_cg({assign,Dst0,Expr}) -> Dst = mk_val(Dst0), emit([Dst," = ",Expr]); |