[erlang-bugs] core_lint:module/1 problem

Lars-Åke Fredlund lfredlund@REDACTED
Mon Jan 26 14:38:02 CET 2009


Robert Virding wrote:
> 2009/1/26 Lars-Åke Fredlund <lfredlund@REDACTED 
> <mailto:lfredlund@REDACTED>>
>
>     Version:   otp R12B-5 (not patched)
>     Problem:
>       Applying core_lint:module/1 to a core erlang module generated by
>     compile:file(FileSpec,[to_core,binary] (without problems)
>     results in the error message:
>       *** Core Erlang ERROR in module schedule: illegal guard
>     expression in reschedule/1
>
>     Source code and core erlang code for function attached.
>     (apparently the checks for correct guards are too strict for
>     try... guards).
>
>     /Lars-Ake Fredlund
>
>
> Without having looked at the actual code I can say that some of the 
> core support modules, core_lint and core_parse for example, don't 
> always follow the latest core development. This is because they are 
> not actually used by the compiler, it *knows* it's generated code is 
> correct.
>
> Another problem I had with LFE is that some of the core optimisation 
> passes assumed that the core module was generated in the same way as 
> the from the erlang compiler, in some cases they couldn't handle 
> general core. This has now been fixed.
>
Yes, I don't check core_lint normally, but in the interest of improving 
things for the future I submitted the bug report.

Robert, any experience on how the Core Erlang code should be written so 
that the optimisation passes optimise well?
(or does things work ok now, without any need to adapt the code 
structure to the optimisers?)

/Lars-Ake Fredlund





More information about the erlang-bugs mailing list