Untamed:
void
protocol(Object optSelf,
FlexList mTypes)
boolean
respondsTo(Object optSelf,
String verb,
int arity)
Script
shorten(Object optSelf,
String aVerb,
Object[] args)
public Script shorten(Object optSelf, String aVerb, Object[] args)
We intend to grow this mechanism into a call-site caching mechanism, but currently it's just to shorten the Java call stack needed for a given E call stack.
If the call won't actually resolve, then shorten may throw the relevant exception, or it may return a Script whose execute will throw that exception. The choice shouldn't matter.
This method represents a start on the mechanism needed for call-site cacheing, but the API will need to change to get their.
optSelf - If present, then a script could shorten using
instance-specific data.aVerb - Must be internedargs - Typically, only its arity is used. But OverloaderNode uses
the types of the arguments to select among Java overloads.
public Object execute(Object self, String verb, Object[] args)
public void protocol(Object optSelf, FlexList mTypes)
optSelf - If non-null, and if this script has a match clause, then
delegate an __allegedType query to optSelf via the match
clause so it can add further elements to mTypes.
Since 'null' is normally a valid value for a 'self', this use of 'null' depends on our knowledge that 'null''s script does not have its own match clause.
mTypes - message descriptions.public boolean respondsTo(Object optSelf, String verb, int arity)
optSelf - If non-null, and if this script has a match clause,
and if this script doesn't have a directly matching
method, then delegate the respondsTo question to
optSelf via the match clause to see if it responds.
Since 'null' is normally a valid value for a 'self', this use of 'null' depends on our knowledge that 'null''s script does not have its own match clause.
verb - arity -