Compile events
But no FATE support for events yet
This commit is contained in:
parent
b43e8d9f68
commit
49b00715c5
@ -214,7 +214,8 @@ to_fcode(Env, [{contract, _, {con, _, Main}, Decls}]) ->
|
||||
#{ builtins := Builtins } = Env,
|
||||
MainEnv = Env#{ context => {main_contract, Main},
|
||||
builtins => Builtins#{[Main, "state"] => {get_state, none},
|
||||
[Main, "put"] => {set_state, 1}} },
|
||||
[Main, "put"] => {set_state, 1},
|
||||
[Main, "Chain", "event"] => {event, 1}} },
|
||||
#{ functions := Funs } = Env1 =
|
||||
decls_to_fcode(MainEnv, Decls),
|
||||
StateType = lookup_type(Env1, [Main, "state"], [], {tuple, []}),
|
||||
|
@ -378,6 +378,8 @@ builtin_to_scode(_Env, get_state, none) ->
|
||||
builtin_to_scode(Env, set_state, [_] = Args) ->
|
||||
call_to_scode(Env, [aeb_fate_code:store(?s, ?a),
|
||||
aeb_fate_code:tuple(0)], Args);
|
||||
builtin_to_scode(_Env, event, [_] = _Args) ->
|
||||
?TODO(fate_event_instruction);
|
||||
builtin_to_scode(_Env, map_empty, none) ->
|
||||
[aeb_fate_code:map_empty(?a)];
|
||||
builtin_to_scode(_Env, bits_none, none) ->
|
||||
|
Loading…
x
Reference in New Issue
Block a user