@Retention(value=CLASS) @Target(value=PARAMETER) public @interface Bind
cached
,
guard
, limit
,
assumption
expressions or the specialization body. The bind
expression may refer to dynamic parameters, previously declared bind or cached parameters and
node field
declarations.
If a bind parameter only uses cached values, then it is considered also a cached value. If the parameter uses any dynamic parameter then the extract parameter is considered also a dynamic parameter.
Usage examples:
static class DynamicObject { volatile Object storage; DynamicObject(Object storage) { this.storage = storage; } } abstract static class ExtractStorageNode extends Node { abstract Object execute(Object arg0); @Specialization(guards = "storage == cachedStorage", limit = "3") Object s0(DynamicObject a0, @Bind("a0.storage") Object storage, @Cached("storage") Object cachedStorage) { // use storage in specialization and in guard. return a0; } }
Cached
,
Specialization