Currently translation of rule code to bytecode can only be enabled globally (i.e. for all rules) by setting System property o.j.b.compile.to.bytecode It would be much more useful if translation to bytecode could be configured for individual rules using a directive in the rule file.
A suitable model would be to follow the syntax for HELPER methods, i.e. to provide for configuration at both the script level and at the individual rule level. So, the directives
can be inserted into a script outside of the scope of a rule to configure compilation to bytecode for all subsequent rules in the script (in the absence of any such directive the default is to disable compilation). The same directives can be inserted into a rule overriding any current default or script level setting.
A COMPILE clause should only appear in a RULE body after the location clause and before the bind clause i.e. it is subject to the same restriction as a HELPER clause (note that there is no requirement to order these clause wrt each other if both are supplied).