Get rid of lager in the compiler
This commit is contained in:
parent
4853d386e4
commit
b8f4a6b67a
@ -32,19 +32,6 @@
|
||||
}.
|
||||
-type type_info() :: [function_type_info()].
|
||||
|
||||
-ifdef(COMMON_TEST).
|
||||
-define(TEST_LOG(Format, Data),
|
||||
try ct:log(Format, Data)
|
||||
catch
|
||||
%% Enable setting up node with "test" rebar profile.
|
||||
error:undef -> ok
|
||||
end).
|
||||
-define(DEBUG_LOG(Format, Data), begin lager:debug(Format, Data), ?TEST_LOG(Format, Data) end).
|
||||
-else.
|
||||
-define(TEST_LOG(Format, Data), ok).
|
||||
-define(DEBUG_LOG(Format, Data), lager:debug(Format, Data)).
|
||||
-endif.
|
||||
|
||||
%%%===================================================================
|
||||
%%% API
|
||||
%%%===================================================================
|
||||
@ -112,15 +99,12 @@ check_calldata(CallData, TypeInfo) ->
|
||||
{error, bad_call_data}
|
||||
catch
|
||||
_T:_E ->
|
||||
?TEST_LOG("Error parsing call data: ~p", [{_T, _E}]),
|
||||
{error, bad_call_data}
|
||||
end;
|
||||
{error, _} ->
|
||||
?TEST_LOG("Unknown function hash ~p", [Hash]),
|
||||
{error, unknown_function}
|
||||
end;
|
||||
{error, _What} ->
|
||||
?TEST_LOG("Bad call data ~p", [_What]),
|
||||
{error, bad_call_data}
|
||||
end.
|
||||
|
||||
|
@ -94,8 +94,8 @@ contract_to_icode([{letrec,_,Defs}|Rest], Icode) ->
|
||||
%% just to parse a list of (mutually recursive) definitions.
|
||||
contract_to_icode(Defs++Rest, Icode);
|
||||
contract_to_icode([], Icode) -> Icode;
|
||||
contract_to_icode(Code, Icode) ->
|
||||
lager:debug("Unhandled code ~p~n",[Code]),
|
||||
contract_to_icode(_Code, Icode) ->
|
||||
%% TODO debug output for debug("Unhandled code ~p~n",[Code]),
|
||||
Icode.
|
||||
|
||||
ast_id({id, _, Id}) -> Id.
|
||||
@ -444,9 +444,8 @@ ast_body({typed,_,{record,Attrs,Fields},{record_t,DefFields}}, Icode) ->
|
||||
NamedField = fun({field, _, [{proj, _, {id, _, Name}}], E}) -> {Name, E} end,
|
||||
NamedFields = lists:map(NamedField, Fields),
|
||||
#tuple{cpts =
|
||||
[case proplists:get_value(Name,NamedFields) of
|
||||
[case proplists:get_value(Name, NamedFields) of
|
||||
undefined ->
|
||||
lager:debug("~p not in ~p\n", [Name, NamedFields]),
|
||||
Line = aeso_syntax:get_ann(line, Attrs),
|
||||
#missing_field{format = "Missing field in record: ~s (on line ~p)\n",
|
||||
args = [Name,Line]};
|
||||
|
@ -5,7 +5,6 @@
|
||||
{applications,
|
||||
[kernel,
|
||||
stdlib,
|
||||
lager,
|
||||
aebytecode
|
||||
]},
|
||||
{env,[]},
|
||||
|
Loading…
x
Reference in New Issue
Block a user