To sophia value revisited #521

Merged
zxq9 merged 6 commits from to-sophia-value-revisited into master 2019-02-27 19:36:04 +09:00
2 changed files with 3 additions and 3 deletions
Showing only changes of commit 5a3c8530b4 - Show all commits

View File

@ -40,8 +40,8 @@
%%% Handle calldata
create_calldata(FunName, Args, ArgTypes, RetType) ->
<<TypeHashInt:?HASH_SIZE/unit:8>> =
function_type_hash(list_to_binary(FunName), ArgTypes, RetType),
{<<TypeHashInt:?HASH_SIZE/unit:8>>, _, _, _} =
function_type_info(list_to_binary(FunName), ArgTypes, RetType),
Data = aeso_heap:to_binary({TypeHashInt, list_to_tuple(Args)}),
{ok, Data, {tuple, [word, {tuple, ArgTypes}]}, RetType}.

View File

@ -273,7 +273,7 @@ translate_vm_value(_VmType, _Type, _Data) ->
-spec create_calldata(string(), string(), [string()]) ->
{ok, binary(), aeso_sophia:type(), aeso_sophia:type()}
| {error, argument_syntax_error}.
| {error, term()}.
create_calldata(Code, Fun, Args) ->
case check_call(Code, Fun, Args, []) of
{ok, FunName, {ArgTypes, RetType}, VMArgs} ->