Revert bytes(N) from icode/vm-types #551

Merged
zxq9 merged 2 commits from PT-164629541-generic_hash_and_signature into master 2019-04-24 15:58:44 +09:00
Showing only changes of commit 45a62f0807 - Show all commits

View File

@ -696,11 +696,8 @@ ast_typerep({qid, _, Name}, Icode) ->
lookup_type_id(Name, [], Icode);
ast_typerep({con, _, _}, _) ->
word; %% Contract type
ast_typerep({bytes_t, _, Len}, _) when Len =< 32 ->
word;
ast_typerep({bytes_t, _, Len}, _) ->
Words = (31 + Len) div 32,
{tuple, lists:duplicate(Words, word)};
bytes_t(Len);
ast_typerep({app_t, _, {id, _, Name}, Args}, Icode) ->
ArgReps = [ ast_typerep(Arg, Icode) || Arg <- Args ],
lookup_type_id(Name, ArgReps, Icode);