Simplify ast_typerep
This commit is contained in:
parent
3255c62e0e
commit
45a62f0807
@ -696,11 +696,8 @@ ast_typerep({qid, _, Name}, Icode) ->
|
|||||||
lookup_type_id(Name, [], Icode);
|
lookup_type_id(Name, [], Icode);
|
||||||
ast_typerep({con, _, _}, _) ->
|
ast_typerep({con, _, _}, _) ->
|
||||||
word; %% Contract type
|
word; %% Contract type
|
||||||
ast_typerep({bytes_t, _, Len}, _) when Len =< 32 ->
|
|
||||||
word;
|
|
||||||
ast_typerep({bytes_t, _, Len}, _) ->
|
ast_typerep({bytes_t, _, Len}, _) ->
|
||||||
Words = (31 + Len) div 32,
|
bytes_t(Len);
|
||||||
{tuple, lists:duplicate(Words, word)};
|
|
||||||
ast_typerep({app_t, _, {id, _, Name}, Args}, Icode) ->
|
ast_typerep({app_t, _, {id, _, Name}, Args}, Icode) ->
|
||||||
ArgReps = [ ast_typerep(Arg, Icode) || Arg <- Args ],
|
ArgReps = [ ast_typerep(Arg, Icode) || Arg <- Args ],
|
||||||
lookup_type_id(Name, ArgReps, Icode);
|
lookup_type_id(Name, ArgReps, Icode);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user