HTTPS clone URL
Subversion checkout URL
What's new in 0.3
szegedi edited this page · 4 revisions
- Differences between GitHub and OpenJDK Dynalink
- Licensing FAQ
- Request for comments: Methods as properties on POJOs
- User Guide 0.2
- User Guide 0.3
- User Guide 0.4
- User Guide 0.5
- User Guide 0.6
- User Guide 0.7
- What if Java had dynamic type?
- What's new in 0.3
- What's new in 0.4
- What's new in 0.5
- What's new in 0.6
- What's new in 0.7
- What's new in 0.8
Clone this wiki locally
- New "dyn:new" operation for creation of instances.
- java.lang.Class objects accessed through BeansLinker have a synthetic property named "static" which exposes an object representing the static facet of the class; that is, a request for "dyn:getProp:static" on a Class will return it.
- Static facet of the class exposes all public constructors (it answers with constructors to "dyn:new"), static methods, static fields and static property getters/setters for the class. Classes of arrays also have a constructor that takes a single int as the length of the array. Full overload resolution and vararg handling applies to statics too.
- New call site class, ChainedCallSite can remember several already linked methods and build guardWithTest() chains from them. Usually performs better than MonomorphicCallSite.
- ConversionComparator interface that can be implemented by language runtimes for defining priorities between language-specific type conversions.
- BeansLinker recognizes method names with explicit type signatures in them, i.e. "dyn:callPropWithThis:println(String)" and uses them to explicitly select an overload with that exact signature. Not usually needed for correctness as automatic overload resolution typically always works, but can improve performance.
- DynamicLinker.getTypeConverter(sourceType, targetType) can be used to retrieve a type converter method handle outside of the linking context (if the language runtime needs to explicitly invoke them from some other code).
- Swanky new website at http://szegedi.github.com/dynalink
- Array objects now expose a synthetic "length" property when accessed through BeansLinker.
- DynamicLinkerFactory.setSyncOnRelink() method.
- GuardedInvocation.compose() convenience methods.
- GuardedInvocation.hasBeenInvalidated() method.
- GuardedInvocation.asType(), .filterArguments() and .dropArguments() convenience methods that operate both on the invocation and the guard.
- Guards.isNull() method.
- LinkRequest.getReceiver() for returning the 0th argument of the link request. Saves whole lot of argument array cloning in code that only inspects the 0th argument.
- Lookup.findOwnStatic() method for easy creation of method handles to a class' own static methods.
- TypeUtilities.getPrimitiveTypeByName() and .getPrimitiveType() methods.
- Significantly improved overloaded method resolution compared to 0.2. We no longer know of any case where it wouldn't work as expected out of the box.
- Use of foldArguments(exactInvoker()) for relinking invocation eliminates Dynalink stack frames from the relinking operations.
- CallSiteDescriptor is now an interface; we provide a factory that canonicalizes instances and varies between optimal implementations for different needs.
- POJO linker reuses most guard method handles; much less method handles are generated.
- Language specific context arguments are now expected from the argument position 1. In 0.2, they were trailing arguments, but that caused problems with vararg invocation. Now they're after "this" (which is in position 0), and before any regular arguments.