aboutsummaryrefslogtreecommitdiffstats
path: root/lib/asn1/src/asn1ct_gen_per.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2013-02-25 15:19:13 +0100
committerBjörn Gustavsson <[email protected]>2013-05-31 14:52:15 +0200
commitab7f7f53dc75cdf6ff05abd5663b1c2add39963c (patch)
tree9d629245cb7b8ad33bc31947e7e7418c568454ad /lib/asn1/src/asn1ct_gen_per.erl
parent509ccd85ef448f5843716d4b51a8b07f875cdfda (diff)
downloadotp-ab7f7f53dc75cdf6ff05abd5663b1c2add39963c.tar.gz
otp-ab7f7f53dc75cdf6ff05abd5663b1c2add39963c.tar.bz2
otp-ab7f7f53dc75cdf6ff05abd5663b1c2add39963c.zip
Eliminate general use of #typereference{}
The record #typereference{} is only used internally within the asn1ct_parser2 module (the parser translates it to an #'Externaltypereference{} record).
Diffstat (limited to 'lib/asn1/src/asn1ct_gen_per.erl')
-rw-r--r--lib/asn1/src/asn1ct_gen_per.erl11
1 files changed, 0 insertions, 11 deletions
diff --git a/lib/asn1/src/asn1ct_gen_per.erl b/lib/asn1/src/asn1ct_gen_per.erl
index f9681491df..2ffbe87ab2 100644
--- a/lib/asn1/src/asn1ct_gen_per.erl
+++ b/lib/asn1/src/asn1ct_gen_per.erl
@@ -94,8 +94,6 @@ gen_encode_user(Erules,D) when is_record(D,typedef) ->
emit({"'enc_",Etype,"'(Val).",nl,nl});
#'Externaltypereference'{module=Emod,type=Etype} ->
emit({"'",Emod,"':'enc_",Etype,"'(Val).",nl,nl});
- #typereference{val=Ename} ->
- emit({"'enc_",Ename,"'(Val).",nl,nl});
{notype,_} ->
emit({"'enc_",InnerType,"'(Val).",nl,nl})
end.
@@ -805,9 +803,6 @@ emit_inner_of_fun(Erule, #type{}=Type, _) ->
Def when is_atom(Def) ->
emit({indent(9),Def," ->",nl,indent(12)}),
gen_encode_prim(Erule, Type, dotag, "Val");
- TRef when is_record(TRef,typereference) ->
- T = TRef#typereference.val,
- emit({indent(9),T," ->",nl,indent(12),"'enc_",T,"'(Val)"});
#'Externaltypereference'{module=CurrMod,type=T} ->
emit({indent(9),T," ->",nl,indent(12),"'enc_",T,"'(Val)"});
#'Externaltypereference'{module=ExtMod,type=T} ->
@@ -929,9 +924,6 @@ emit_inner_of_decfun(Erule, #type{}=Type, _) ->
Def when is_atom(Def) ->
emit({indent(9),Def," ->",nl,indent(12)}),
gen_dec_prim(Erule, Type, "Val");
- TRef when is_record(TRef,typereference) ->
- T = TRef#typereference.val,
- emit({indent(9),T," ->",nl,indent(12),"'dec_",T,"'(Val)"});
#'Externaltypereference'{module=CurrMod,type=T} ->
emit({indent(9),T," ->",nl,indent(12),"'dec_",T,"'(Val)"});
#'Externaltypereference'{module=ExtMod,type=T} ->
@@ -1004,9 +996,6 @@ gen_decode_user(Erules,D) when is_record(D,typedef) ->
emit({".",nl,nl});
{constructed,bif} ->
asn1ct_gen:gen_decode_constructed(Erules,Typename,InnerType,D);
- #typereference{val=Dname} ->
- emit({"'dec_",Dname,"'(Bytes,telltype)"}),
- emit({".",nl,nl});
#'Externaltypereference'{module=CurrMod,type=Etype} ->
emit({"'dec_",Etype,"'(Bytes,telltype).",nl,nl});
#'Externaltypereference'{module=Emod,type=Etype} ->