This changelog summarizes major changes between Truffle versions relevant to languages implementors building upon the Truffle framework. The main focus is on APIs exported by Truffle.
- The Instrumentation Framework has been revised and has new APIs that are integrated into the PolyglotEngine.
- Instrumention support required of language implementatins is specified as abstract methods on TruffleLanguage.
- Clients access instrumentation sevices via an instance of Instrumenter, provided by the Polyglot framework.
17-Jul-2015, Repository Revision
- The Truffle repository no longer contains Graal
- PolyglotEngine is an entrypoint for creating, building and running multi language Truffle systems
- Implement TruffleLanguage and use @Registration to register your language into the Truffle polyglot system
- Include Truffle TCK (test compatibility kit) into your test cases to verify your language implementation is compliant enough
- Interoperability API polished
- Cleanup of Source related API
29-Apr-2015, Repository Revision
- New, faster partial evaluation (no more TruffleCache).
- If a method is annotated with @ExplodeLoop and contains a loop that can not be exploded, partial evaluation will fail.
- Truffle background compilation is now multi-threaded.
- Experimental merge=true flag for @ExplodeLoop allows building bytecode-based interpreters (see BytecodeInterpreterPartialEvaluationTest).
- Added Node#deepCopy as primary method to copy ASTs.
- Disable inlining across Truffle boundary by default. New option TruffleInlineAcrossTruffleBoundary default false.
- Node.replace(Node) now guards against non-assignable replacement, and Node.isReplacementSafe(Node) checks in advance.
- Instrumentation: AST "probing" is now safe and implemented by Node.probe(); language implementors need only implement Node.isInstrumentable() and Node.createWrapperNode().
- Instrumentation: A new framework defines a category of simple "instrumentation tools" that can be created, configured, and installed, after which they autonomously collect execution data of some kind.
- Instrumentation: A new example "instrumentation tool" is a language-agnostic collector of code coverage information (CoverageTracker); there are two other examples.
- Removed unsafe compiler directives; use
sun.misc.Unsafeinstead. - Removed
Node#onAdopt().
- Implemented a new generated code layout that reduces the code size.
- Changed all methods enclosed in a @TypeSystem must now be static.
- Changed all methods enclosed in generated type system classes are now static.
- Deprecated the type system constant used in the generated type system classes.
- Changed NodeFactory implementations are no longer generated by default. Use {Node}Gen#create instead of {Node}Factory#create to create new instances of nodes.
- Added @GenerateNodeFactory to generate NodeFactory implementations for this node and its subclasses.
- Deprecated @NodeAssumptions for removal in the next release.
- Deprecated experimental @Implies for removal in the next release.
- Added new package c.o.t.api.dsl.examples to the c.o.t.api.dsl project containing documented and debug-able Truffle-DSL use cases.
- Changed "typed execute methods" are no longer required for use as specialization return type or parameter. It is now sufficient to declare them in the @TypeSystem.
- Added @Cached annotation to express specialization local state.
- Added Specialization#limit to declare a limit expression for the maximum number of specialization instantiations.
- Changed syntax and semantics of Specialization#assumptions and Specialization#guards. They now use a Java like expression syntax.
- Changed guard expressions that do not bind any dynamic parameter are invoked just once per specialization instantiation. They are now asserted to be true on the fast path.
- Renamed @ImportGuards to @ImportStatic.
- Changed declaring a @TypeSystemReference for a node that contains specializations is not mandatory anymore.
- Changed types used in specializations are not restricted on types declared in the type system anymore.
- Changed nodes that declare all execute methods with the same number of evaluated arguments as specialization arguments do not require @NodeChild annotations anymore.
- Changed types used in checks and casts are not mandatory to be declared in the type system.
19-Dec-2014, Repository Revision
- Instrumentation: add Instrumentable API for language implementors, with most details automated (see package
com.oracle.truffle.api.instrument). - The BranchProfile constructor is now private. Use BranchProfile#create() instead.
- Renamed @CompilerDirectives.SlowPath to @CompilerDirectives.TruffleBoundary
- Renamed RootNode#isSplittable to RootNode#isCloningAllowed
- Removed RootNode#split. Cloning ASTs for splitting is now an implementation detail of the Truffle runtime implementation.
- Renamed DirectCallNode#isSplittable to DirectCallNode#isCallTargetCloningAllowed
- Renamed DirectCallNode#split to DirectCallNode#cloneCallTarget
- Renamed DirectCallNode#isSplit to DirectCallNode#isCallTargetCloned
- Added PrimitiveValueProfile.
- Added -G:TruffleTimeThreshold=5000 option to defer compilation for call targets
- Added RootNode#getExecutionContext to identify nodes with languages
- Removed
FrameTypeConversioninterface and changed the correspondingFrameDescriptorconstructor to have a default value parameter instead. - Removed
CompilerDirectives.unsafeFrameCast(equivalent to a(MaterializedFrame)cast). - Added
TruffleRuntime#getCapabilityAPI method. - Added
NodeInterfaceand allowed child field to be declared with interfaces that extend it. - Added
CompilerOptionsand allowed it to be set forExecutionContextandRootNode. - Added experimental object API (see new project
com.oracle.truffle.api.object).
23-Sep-2014, Repository Revision
- Added
TruffleRuntime#getCallTargets()to get all call targets that were created and are still referenced. - Added
NeverValidAssumptionto complementAlwaysValidAssumption. - Fixed a bug in
AssumedValuethat may not invalidate correctly. - New option,
-G:+/-TruffleCompilationExceptionsAreThrown, that will throw anOptimizationFailedExceptionfor compiler errors.
19-Aug-2014, Repository Revision
- Change API for stack walking to a visitor:
TruffleRuntime#iterateFramesreplacesTruffleRuntime#getStackTrace - New flag
-G:+TraceTruffleCompilationCallTreeto print the tree of inlined calls before compilation. truffle.jar: strip out build-time only dependency into a seperated JAR file (truffle-dsl-processor.jar)- New flag
-G:+TraceTruffleCompilationASTto print the AST before compilation. - New experimental
TypedObjectinterface added. - Renamed flag
-G:+TruffleSplittingEnabledto-G:+TruffleSplitting - New flag
-G:+TruffleSplittingNewto enable the experimental splitting mode based on function arguments. - New flag
-G:+TruffleSplittingTypedInstanceStampsto enable splitting forTypedObjectinstances. - New flag
-G:+TruffleSplittingClassInstanceStampsto enable splitting for Java object instances exceptTypedObject. - New flag
-G:TruffleSplittingStartCallCount=3which sets the number of minimal calls until splitting is performed. - New flag
-G:-TruffleSplittingAggressiveif enabled splits every function call. - Added
isVisitedmethod forBranchProfile. - Added new
ConditionProfile,BinaryConditionProfileandCountingConditionProfileutility classes to profile if conditions.
9-May-2014, Repository Revision
- The method
CallTarget#calltakes now a variable number of Object arguments. - Support for collecting stack traces and for accessing the current frame in slow paths (see
TruffleRuntime#getStackTrace). - Renamed
CallNodetoDirectCallNode. - Renamed
TruffleRuntime#createCallNodetoTruffleRuntime#createDirectCallNode. - Added
IndirectCallNodefor calls with a changingCallTarget. - Added
TruffleRuntime#createIndirectCallNodeto create anIndirectCallNode. DirectCallNode#inlinewas renamed toDirectCallNode#forceInlining().- Removed deprecated
Node#adoptChild.
25-Mar-2014, Repository Revision
- New API
TruffleRuntime#createCallNodeto create call nodes and to give the runtime system control over its implementation. - New API
RootNode#getCachedCallNodesto get a weak set ofCallNodes that have registered to call theRootNode. - New API to split the AST of a call-site context sensitively.
CallNode#split,CallNode#isSplittable,CallNode#getSplitCallTarget,CallNode#getCurrentCallTarget,RootNode#isSplittable,RootNode#split. - New API to inline a call-site into the call-graph.
CallNode#isInlinable,CallNode#inline,CallNode#isInlined. - New API for the runtime environment to register
CallTargets as caller to theRootNode.CallNode#registerCallTarget. - Improved API for counting nodes in Truffle ASTs.
NodeUtil#countNodescan be used with aNodeFilter. - New API to declare the cost of a Node for use in runtime environment specific heuristics. See
NodeCost,Node#getCostandNodeInfo#cost. - Removed old API for
NodeInfo#KindandNodeInfo#kind. As a replacement the newNodeCostAPI can be used. - Changed
Node#replacereason parameter type toCharSequence(to enable lazy string building) - Deprecated
Node#adoptChildandNode#adoptChildren, no longer needed in node constructor - New
Node#insertmethod for inserting new nodes into the tree (formerlyadoptChild) - New
Node#adoptChildrenhelper method that adopts all (direct and indirect) children of a node - New API
Node#atomicfor atomic tree operations - Made
Node#replacethread-safe
5-Feb-2014, Repository Revision
- Initial version of a multi-language framework on top of Graal.
- Update of the Truffle Inlining API.