STR-365: allow declaration of exported rules/strategies (1)
Currently, the compiler doesn’t generate code for rules and strategies that are never called. With dynamic loading, a program/module can have multiple entry points, and the compiler needs to ensure that code is generated for all of them and that their symbols are exported.
A simple hack would be to add a –dynamic-main which would name the main entry point. This would take care of the simple case were a loadable module has only one entry point (which is different from the normal main).
A better solution would be to provide some sort of ‘export’ declaration; which we’ll probably need anyway for the module system. For example,
export s = foo + bar
or
exported strategies
Submitted on 25 July 2005 at 10:20s = ...
Issue Log
STR-365, visser:
This isssue is (temporarily) solved by the DYNAMIC-CALLS hack from issue STR-346. A cleaner solution should be designed eventually. Therefore, leaving this issue open (but moving it to a future release).
The
--library
option also disables the dead code elimination optimization. Note that strategies that are markedinternal
can still be eliminated in this case, and are not exported to other libraries.
Log in to post comments