This changelog summarizes major changes between Graal versions relevant to developers building technology on top of Graal. The main focus is on APIs exported by Graal but other significant performance/stability changes are mentioned as well.
- CompileTheWorld now includes class initializers.
- Rename
DebugMetric
toDebugCounter
. - Rename
-G:Meter
option to-G:Count
. - Add new debug feature
DebugMethodMetric
to collect metrics per compilation
- Added initial code for AArch64 port.
- Moved @ServiceProvider mechanism from JVMCI to Graal.
23-Dec-2015, Repository Revision
- Moved support for command line options from JVMCI to Graal.
- Made invocation plugin initialization lazy: plugins for a class are initialized first time compiler parses a method in the class.
- Removed method handle special case logic for 8u60 and later.
- Generate graph builder plugins for @NodeIntrinsic and @Fold methods instead of using reflection.
- Converted LoadHubNode into normal FloatingNode from FloatingGuardedNode.
- Enabled CRC32 intrinsics on SPARC.
- Added log methods to Debug with 9 and 10 arguments.
17-Nov-2015, Repository Revision
- Added experimental Trace Register Allocator.
- All JVMCI (and HotSpot) code has been moved into a separate repository.
- JVMCI code is now in jdk.vm.ci.* name space.
- Graal now passes the gate on top of a JVMCI enabled JDK9 binary.
- Separate Graal compiler can be specified for Truffle compilation with new
-G:TruffleCompiler
option. - Initialization of the Truffle compiler is delayed until first Truffle compilation request.
15-Jul-2015, Repository Revision
- Add support for constructing low-level IR in SSA form (default behavior).
- Add support for SSA linear scan register allocation (default behavior).
- Remove dummy parameter
includeAbstract
fromResolvedJavaType#resolveMethod()
; The behavior is now theincludeAbstract==true
case. TheincludeAbstract==false
variant is available viaresolveConcreteMethod()
. - HotSpot modifications have been renamed to JVMCI in preparation for JEP 243. As a result HotSpot options containing "Graal" have been changed to "JVMCI" (e.g., -XX:+BootstrapJVMCI).
- All the APIs used to interface with the VM (
api.meta
,api.code
etc.) have been moved tojdk.internal.jvmci
packages (e.g.,jdk.internal.jvmci.meta
). - Fast JVMCI services do not need to implement an interface anymore, implementations simply need to be annotated with
jdk.internal.jvmci.service.ServiceProvider
.
- Moved Truffle to it own repository
29-Apr-2015, Repository Revision
- By default the Graal code is now only compiled by C1 which should improve application start-up.
- Merged with jdk8u40-b25.
- The Graal class loader now loads all lib/graal/graal*.jar jars.
- Fast Graal services (see com.oracle.graal.api.runtime.Service) are now looked up using service files in lib/graal/services.
- Add utilities ModifiersProvider#isConcrete, ResolvedJavaMethod#hasBytecodes, ResolvedJavaMethod#hasReceiver to Graal API.
- Add
GraalDirectives
API, containing methods to influence compiler behavior for unittests and microbenchmarks. - Introduce
LIRSuites
, an extensible configuration for the low-level compiler pipeline.
- 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.Unsafe
instead. - 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
- Merged with jdk8u25-b17.
- Added
com.oracle.graal.api.meta.Remote
interface for future support of remote and replay compilation. - Changed name suite specification from
mx/projects.py
tomx/suite.py
. - Changed semantics (and signature) of
ResolvedJavaType#resolveMethod()
(old behavior available viaresolveConcreteMethod()
). - Moved
ResolvedJavaField#read[Constant]Value
andgetMethodHandleAccess()
toConstantReflectionProvider
.
- 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
FrameTypeConversion
interface and changed the correspondingFrameDescriptor
constructor to have a default value parameter instead. - Removed
CompilerDirectives.unsafeFrameCast
(equivalent to a(MaterializedFrame)
cast). - Added
TruffleRuntime#getCapability
API method. - Added
NodeInterface
and allowed child field to be declared with interfaces that extend it. - Added
CompilerOptions
and allowed it to be set forExecutionContext
andRootNode
. - Added experimental object API (see new project
com.oracle.truffle.api.object
).
23-Sep-2014, Repository Revision
- New register allocator optimization:
-G:+ConstantLoadOptimization
. - SPARC backend is able to run benchmark and passing most of the JTTs.
- Fix: Stamp: interface types can not be trusted except after explicit runtime checks.
- Changed format of suite specification from a properties file (
mx/projects
) to a Python file (mx/projects.py
).
- Added
TruffleRuntime#getCallTargets()
to get all call targets that were created and are still referenced. - Added
NeverValidAssumption
to complementAlwaysValidAssumption
. - Fixed a bug in
AssumedValue
that may not invalidate correctly. - New option,
-G:+/-TruffleCompilationExceptionsAreThrown
, that will throw anOptimizationFailedException
for compiler errors.
19-Aug-2014, Repository Revision
- Made initialization of Graal runtime lazy in hosted mode.
- Added supported for new
jrelibrary
dependency type inmx/projects
. - Java projects with compliance level higher than the JDKs specified by
JAVA_HOME
andEXTRA_JAVA_HOMES
are ignored oncemx/projects
has been processed. ResolvedJavaType.resolveMethod
now takes a context type used to perform access checks. It now works correctly regarding default methods.- Removed Java based compilation queue (
CompilationQueue.java
). - Enabled use of separate class loader (via
-XX:+UseGraalClassLoader
) for classes loaded fromgraal.jar
to hide them from application classes.
- Change API for stack walking to a visitor:
TruffleRuntime#iterateFrames
replacesTruffleRuntime#getStackTrace
- New flag
-G:+TraceTruffleCompilationCallTree
to 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:+TraceTruffleCompilationAST
to print the AST before compilation. - New experimental
TypedObject
interface added. - Renamed flag
-G:+TruffleSplittingEnabled
to-G:+TruffleSplitting
- New flag
-G:+TruffleSplittingNew
to enable the experimental splitting mode based on function arguments. - New flag
-G:+TruffleSplittingTypedInstanceStamps
to enable splitting forTypedObject
instances. - New flag
-G:+TruffleSplittingClassInstanceStamps
to enable splitting for Java object instances exceptTypedObject
. - New flag
-G:TruffleSplittingStartCallCount=3
which sets the number of minimal calls until splitting is performed. - New flag
-G:-TruffleSplittingAggressive
if enabled splits every function call. - Added
isVisited
method forBranchProfile
. - Added new
ConditionProfile
,BinaryConditionProfile
andCountingConditionProfile
utility classes to profile if conditions.
9-May-2014, Repository Revision
- Explicit support for oop compression/uncompression in high level graph.
- LIRGenerator refactoring.
- Explicit types for inputs (InputType enum).
- Added graal.version system property to Graal enabled VM builds.
- Transitioned to JDK 8 as minimum JDK level for Graal.
- Added support for stack introspection.
- New MatchRule facility to convert multiple HIR nodes into specialized LIR
- The method
CallTarget#call
takes 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
CallNode
toDirectCallNode
. - Renamed
TruffleRuntime#createCallNode
toTruffleRuntime#createDirectCallNode
. - Added
IndirectCallNode
for calls with a changingCallTarget
. - Added
TruffleRuntime#createIndirectCallNode
to create anIndirectCallNode
. DirectCallNode#inline
was renamed toDirectCallNode#forceInlining()
.- Removed deprecated
Node#adoptChild
.
25-Mar-2014, Repository Revision
- Use HotSpot stubs for certain array copy operations.
- New methods for querying memory usage of individual objects and object graphs in Graal API (
MetaAccessProvider#getMemorySize
,MetaUtil#getMemorySizeRecursive
). - Added tiered configuration (C1 + Graal).
- Initial security model for Graal GRAAL-22.
- New (tested) invariant that equality comparisons for
JavaType
/JavaMethod
/JavaField
values use.equals()
instead of==
. - Made graph caching compilation-local.
- Added AllocSpy tool for analyzing allocation in Graal using the Java Allocation Instrumenter.
- Initial support for memory arithmetic operations on x86.
- Expanded Debug logging/dumping API to avoid allocation when this Debug facilities are not enabled.
- New API
TruffleRuntime#createCallNode
to create call nodes and to give the runtime system control over its implementation. - New API
RootNode#getCachedCallNodes
to get a weak set ofCallNode
s 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
CallTarget
s as caller to theRootNode
.CallNode#registerCallTarget
. - Improved API for counting nodes in Truffle ASTs.
NodeUtil#countNodes
can be used with aNodeFilter
. - New API to declare the cost of a Node for use in runtime environment specific heuristics. See
NodeCost
,Node#getCost
andNodeInfo#cost
. - Removed old API for
NodeInfo#Kind
andNodeInfo#kind
. As a replacement the newNodeCost
API can be used. - Changed
Node#replace
reason parameter type toCharSequence
(to enable lazy string building) - Deprecated
Node#adoptChild
andNode#adoptChildren
, no longer needed in node constructor - New
Node#insert
method for inserting new nodes into the tree (formerlyadoptChild
) - New
Node#adoptChildren
helper method that adopts all (direct and indirect) children of a node - New API
Node#atomic
for atomic tree operations - Made
Node#replace
thread-safe
5-Feb-2014, Repository Revision
- Initial version of a dynamic Java compiler written in Java.
- Support for multiple co-existing GPU backends (GRAAL-1).
- Fixed a compiler bug when running RuneScape (GRAAL-7).
- Bug fixes (GRAAL-4, GRAAL-5).
- Initial version of a multi-language framework on top of Graal.
- Update of the Truffle Inlining API.