Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
336 commits
Select commit Hold shift + click to select a range
0f233c1
AWFY benchmark uses small heap value.
rakachan May 7, 2021
f813596
Provide frame slots always in the default scope implementation. (GR-3…
entlicher May 7, 2021
1c3f19b
All built-in packages must be registered before information is used t…
May 7, 2021
c7c061b
[GR-30679] Enable traversing compilation queue.
boris-spas May 10, 2021
1248d07
SDK: report resources exhausted and any other unknown exceptions in l…
steve-s May 7, 2021
c344a81
fix merge bug in fetching already loaded inner classes
javeleon May 10, 2021
521bde3
No need to have a fallback to lookup scope provider node from root node
javeleon May 10, 2021
d1eaf77
[GR-19768] Update Truffle import.
May 10, 2021
267cf14
avoid passing bytecodeNode around explicitly and move getBytecodeNode…
javeleon May 10, 2021
c5e2d92
Minor style changes
May 10, 2021
9b7b0ae
remove accidental usage of non-public JDK API
dougxc Apr 25, 2021
52709cf
append devkit packages instead of overriding all other packages
dougxc Apr 29, 2021
a0b6829
suppressed deprecation warnings
dougxc Apr 28, 2021
354d435
update overlay
dougxc Apr 29, 2021
6b7cda1
add a guard to every jsonnet defined builder to avoid running it if o…
dougxc Apr 29, 2021
b779a68
avoid issues with javac —release option
dougxc Apr 28, 2021
3f9b69f
pass --add-exports in args file on Windows (GR-31100)
dougxc Apr 30, 2021
07e742f
remove deprecated instantiation of wrapper classes for primitives (#3…
dougxc May 2, 2021
c303979
adapt to VM symbol additions and changes
dougxc May 2, 2021
0a6df89
added missing requireConcealed attributes
dougxc May 8, 2021
7f77be7
remove hard coded assumptions about mx build location and layout
dougxc Apr 1, 2021
c948d66
reduce gate noise for DynamicConstantTest
dougxc Apr 28, 2021
dc66d1d
dump phases as a tree for -Dgraal.ShowConfiguration=verbose
dougxc May 5, 2021
ea7b5ab
Add regression test for race condition in DSL generated code
steve-s Apr 12, 2021
1745ed8
Fix DSL cached data race with memory fence in executeAndSpecialize
steve-s Apr 16, 2021
0e89a68
CachedDataRaceTest: fewer repetitions & upper bound for the threads c…
steve-s Apr 29, 2021
7829f37
CachedDataRaceTest: gracefully shutdown the executor service
steve-s Apr 29, 2021
a26d874
remove duplicate interface
javeleon May 10, 2021
7eee498
Add PolyglotProxy to polyglot context heap boundaries.
jchalou May 5, 2021
4e5f7b8
bump timeout for graalDaily and graalWeekly jobs to 1:30:00
dougxc May 10, 2021
3974499
Refactor: Make fields of debugentry.Range final
zakkak Mar 18, 2021
5fabaa6
Refactor: Make debugentry.Range.fileEntry final
zakkak Mar 18, 2021
e361a1e
Make ClassEntry.processMethod return the added MethodEntry
zakkak Mar 23, 2021
90c03c7
Refactor: Restructure DebugMethodInfo, DebugCodeInfo and DebugLineInfo
zakkak Mar 23, 2021
b384283
Associate Ranges with MethodEntries
zakkak Mar 23, 2021
8390fd2
Fix NativeImageDebugLineInfo.ownerType() to get original from substs
zakkak Mar 23, 2021
f485a3c
Refactor: Migrate isDeoptTarget to DebugMethodInfo
zakkak Mar 23, 2021
8500f43
Refactor: Make MethodEntry fields final
zakkak Mar 23, 2021
bdb9490
Refactor: Avoid Qualified types in ClassEntry
zakkak Mar 23, 2021
70792d9
Remove redundant lookup for fileEntry ClassEntry.makePrimaryRange(...)
zakkak Mar 23, 2021
94957c4
Enhance MethodEntries creation and verification
zakkak Apr 8, 2021
606f225
Refactor: MethodEntry.compareTo
zakkak May 10, 2021
37e0d9d
Optimize NativeImageDebugInfoProvider.paramTypes and paramNames
zakkak May 10, 2021
e9e0d48
Refactor: Use HostedMethod.isDeoptTarget()
zakkak May 10, 2021
e85e3f6
Refactor: make listIsSorted static
zakkak May 10, 2021
84bdfd7
no need for making method public
javeleon May 10, 2021
cd1fa4a
handle loader constraint recording internally in class registries
javeleon May 10, 2021
f41d2de
improve remove method hooks and always throw exception when hook was …
javeleon May 10, 2021
cc581aa
Use synchronized blocks where appropriate. Add comments about concur…
javeleon May 10, 2021
a69abb9
CI: Don't run on markdown changes
zakkak May 10, 2021
766ee0d
Fix typo.
woess May 10, 2021
dfc5727
[GR-30679] Update graal to get the traversing compilation queue
eregon May 11, 2021
9fc1169
method renames and a few minor refactorings and logging improvements
javeleon May 11, 2021
bc6227f
properly handle concurrency in JDK cache plugin and clean up thread g…
javeleon May 11, 2021
d457bc2
only inject hotswap.jar when jdwp options is set, log when injection …
javeleon May 11, 2021
0ea2102
Refactor: Use ArrayList instead of LinkedList
zakkak May 11, 2021
4fe62b8
Style fix (eclipseformat)
olpaw May 11, 2021
bb18542
[GR-30969] Make child node arrays of BytecodeNode instrumentable.
javeleon May 11, 2021
7b2f61f
Update URL in comment to new llvm-project github repo.
rschatz May 10, 2021
fb1f662
Avoid insensitive wording in test code.
rschatz May 10, 2021
541e9c8
Remove external image from README.md.
rschatz May 10, 2021
e4a5a97
minor formatting fix
javeleon May 11, 2021
ae0ee3b
Fix potential null return in LLVMLanguage.parse when racing with GC.
rschatz May 11, 2021
2e9db59
[GR-30962] Pass Xmx1g and Xms1g to awfy peak benchmarks.
rakachan May 11, 2021
77bb21f
Lazy cache cleanup when weak references in LLVM code cache die.
rschatz May 11, 2021
9bc7e12
Move CachedDataRaceTest to the correct directory
steve-s May 11, 2021
a607279
Exclude PolyglotLanguageContext and PolyglotContextImpl from context …
jchalou May 10, 2021
c9fa093
Adjust to lazy resolution of NinjaProject.buildDependencies
pejovica May 11, 2021
d1558fd
[GR-31281] Fix potential null return in LLVMLanguage.parse when racin…
rschatz May 11, 2021
9c523b0
Avoid unnecessary CompilerToVM call and IllegalArgumentException when…
woess May 10, 2021
768ede3
[GR-31263] Make DynamicObjectLibary.putWithFlags more robust.
woess May 11, 2021
3c0d87f
Reduce distracting suspends on function exits. (GR-31240)
entlicher May 7, 2021
3e9680a
[GR-21590] Update imports
msimacek May 11, 2021
0ff43c7
[GR-31251] Substitute insensitive wording in LLVM runtime.
rschatz May 11, 2021
dba176d
[GR-31118] Improve polyglot context heap boundaries.
jchalou May 12, 2021
4470d70
[GR-22460] Prepare for new mx output directory becoming default.
dougxc May 12, 2021
b1b6ac0
[GR-31008] Disable experimental FIPS mode.
cstancu May 12, 2021
09612a1
[GR-28827] All built-in packages must be registered before informatio…
May 12, 2021
d5ec6c8
[GR-31289] Avoid unnecessary VM call and exception when canonicalizin…
woess May 12, 2021
93d958c
remove the need for a special extra reloader thread
javeleon May 12, 2021
cba655b
Merge branch 'master' into ag/GR-29730-hotswap-api
javeleon May 12, 2021
3a5c569
unused import
javeleon May 12, 2021
bf1cd3d
[GR-31317] Having native projects in mx itself doesn't work.
pejovica May 12, 2021
81bf17e
Move StaticProperty to the new staticobject project.
ansalond Feb 22, 2021
5525533
StaticProperty cannot depend on the UnsafeAccess class.
ansalond Feb 22, 2021
d07e4dd
StaticProperty cannot depend on the JavaKind class.
ansalond Feb 22, 2021
2d0c9fb
StaticProperty cannot depend on the StaticObject class.
ansalond Feb 22, 2021
6f0a34c
Generate subtypes of StaticObject for primitive and object field stor…
ansalond Feb 22, 2021
30842e0
Controversial: do not reuse shapes on class redefinition.
ansalond Feb 28, 2021
1b84b3d
Support for Native Image.
ansalond Mar 3, 2021
a22e6cd
Generated classes are not in the super class package.
ansalond Mar 4, 2021
e75ca12
Support JDK11.
ansalond Mar 4, 2021
d45e243
Remove unsafe accesses from StaticObject.
ansalond Mar 12, 2021
ba54cd0
StaticObject.lock does not need to be volatile.
ansalond Mar 13, 2021
3bd99e2
Simplify StaticObject constructors.
ansalond Mar 13, 2021
b980634
Generate subtypes of StaticObject also for array and foreign object s…
ansalond Mar 13, 2021
9a8238b
Do not expose generated field offset and storage class.
ansalond Mar 13, 2021
b915d73
Move array and foreign object shape and property definitions to Array…
ansalond Apr 1, 2021
67edd60
Improve assertions.
ansalond Apr 6, 2021
07049d0
Workarounds to support AOT compilation.
ansalond Apr 9, 2021
1592a59
Improve visibility of the foreign object marker.
ansalond Apr 12, 2021
3e1fd8f
Refactor constructors.
ansalond Apr 12, 2021
0e262d9
Add shape checks to property accesses.
ansalond Apr 12, 2021
c07f5e2
Support class redefinition.
ansalond Apr 12, 2021
a41eb12
Fix style.
ansalond Apr 12, 2021
acb5f7b
Fix formatting.
ansalond Apr 12, 2021
2a6647d
Run awfy benchmarks also with disabled shape checks.
ansalond Apr 8, 2021
8b7759e
Run native awfy benchmarks also with disabled shape checks.
ansalond Apr 8, 2021
c9d4f32
Allocate one shape generator per (storage; factory) pair.
ansalond Apr 13, 2021
65fc4d9
Revert changes to support class redefinition.
ansalond Apr 14, 2021
5e2b47d
Use TypeCheckNode.
ansalond Apr 15, 2021
3677a93
Remove unused import.
ansalond Apr 15, 2021
3e56df0
Improve the internal API of ShapeGenerator.
ansalond Apr 15, 2021
a66a2d6
Do not allow adding the same static property more than once.
ansalond Apr 15, 2021
ddf9707
Add some tests for the static object model.
ansalond Dec 4, 2020
416ce14
Remove unused fields and imports.
ansalond Apr 16, 2021
fc28d04
Move fields to store generated classes from `ShapeGenerator` to `Arra…
ansalond Apr 16, 2021
1dbb29e
Add the field-based storage strategy.
ansalond Apr 16, 2021
59aecd2
Run benchmarks also with field-based storage.
ansalond Apr 16, 2021
51c2ef3
Rename distribution to avoid redefinition.
ansalond Apr 16, 2021
0c75708
Remove unused imports introduced by a rebase.
ansalond Apr 16, 2021
be739eb
The Shape holds a compilation-final reference to the storage factory.
ansalond Apr 21, 2021
793aad8
Suppress warning relative to double-checked locking.
ansalond Apr 21, 2021
8085578
To be consistent with other builders used in Truffle, make `Builder` …
ansalond Apr 30, 2021
1989dfa
Rename `DefaultStaticObjectFactory`.
ansalond Apr 30, 2021
e9bcb1e
Ensure that only known implementations can create subclasses of Stati…
ansalond May 4, 2021
2bfb2ff
Make the constructor of StaticProperty protected and create a public …
ansalond May 4, 2021
2748ac3
Store extended properties in a LinkedHashMap.
ansalond May 4, 2021
82a2849
Use Integer.compareUnsigned().
ansalond May 4, 2021
578e717
Revert semplifications to the InternalUtils substitution.
ansalond May 4, 2021
6aaf2a2
Support InternalUtils method when using array-based storage.
ansalond May 4, 2021
16888dc
Fix check for array-based storage used for unit tests.
ansalond May 4, 2021
0f6e776
Remove recursive call from `EspressoInterop.asInstant()`.
ansalond May 5, 2021
5221af2
Remove outdated class.
ansalond May 5, 2021
17b0f4b
Add assertions that methods in `StaticShape.Builder` are not reachabl…
ansalond May 5, 2021
f2bb3aa
Simplify EspressoReferenceArrayStoreNode.
ansalond May 7, 2021
cc62f02
Simplify assertion.
ansalond May 7, 2021
8b78873
Remove unnecessary truffle boundary.
ansalond May 7, 2021
0ed74ad
Give more meaningful names to local variables.
ansalond May 7, 2021
7f18ab5
Simplify code and explain why we must call `this.clone()`.
ansalond May 7, 2021
97e0cd7
Call `super.clone()` rather than `Object.clone()`.
ansalond May 7, 2021
d214421
The `shape` field is already set by `clone()`.
ansalond May 7, 2021
4d2b329
Do not allocate String arrays all the times.
ansalond May 7, 2021
493a14c
Fix computation of max stack and max locals.
ansalond May 7, 2021
64b49d6
Explain why `disableShapeChecks` is not a static final field.
ansalond May 7, 2021
70948eb
Simplify check for properties inserted multiple times.
ansalond May 7, 2021
cf389c0
Remove empty and unreachable line.
ansalond May 7, 2021
713c385
Fix comment.
ansalond May 7, 2021
acefe26
Use more extreme test value.
ansalond May 7, 2021
99079c5
Test what happens when assigning a value to an object of the wrong sh…
ansalond May 7, 2021
c340dc8
Cloning a StaticObject should never throw an exception.
ansalond May 7, 2021
57c311e
Suppress warning for unused variable.
ansalond May 7, 2021
a9054d0
Add a truffle boundary on `clone()`.
ansalond May 7, 2021
a59a067
Use more extreme test values.
ansalond May 10, 2021
4df8d50
Remove unnecessary check for properties registered multiple times.
ansalond May 10, 2021
c132381
Turn check into an assertion.
ansalond May 10, 2021
0926ea8
Avoid unreachable assignment.
ansalond May 10, 2021
d030af8
Compute frames of generated methods with jumps.
ansalond May 10, 2021
e91ca09
Static properties must return their name and if they are final.
ansalond May 10, 2021
ded768e
Simplify code.
ansalond May 11, 2021
12c8a6a
Change handling of property name and isFinal.
ansalond May 11, 2021
0dfab9a
Align builds list entries.
ansalond May 12, 2021
cef64c5
Add an abstract method to get the property id.
ansalond May 12, 2021
ecece8f
Improve AbsNode canonicalization
kethomassen Apr 20, 2021
9861cea
[GR-30689] Fix DSL cached data race.
steve-s May 12, 2021
e050c60
Fix checks on property registration and the tests.
ansalond May 12, 2021
fc84188
lookup instrumentable node when getting scope in call frame
javeleon May 12, 2021
2ee9188
Improve checks on property id.
ansalond May 12, 2021
5fc2a55
[GR-31238] [GR-31240] Provide frame slots in the default scope and re…
entlicher May 12, 2021
7cbb4ce
Add GraphEffectList.ensureFloatingAdded
gergo- May 12, 2021
3109623
Fix add of already added node in read elimination
gergo- May 12, 2021
1ea3e7c
Add LoopConditionProfile#create() for convenience
eregon May 12, 2021
54640cd
[GR-31263] Make DynamicObjectLibary.putWithFlags more robust.
woess May 12, 2021
b437425
[GR-31277] Debug types refactoring.
olpaw May 12, 2021
307f2ca
[GR-31356] Add LoopConditionProfile#create() for convenience.
eregon May 12, 2021
9a44294
[GR-31285] Workaround missing JFR events using trace compilation deta…
tzezula May 12, 2021
1d89b86
Redo native-image deoptimization entrypoint logic.
teshull Apr 27, 2021
a5ca5bd
[GR-31024] Redo DeoptEntry logic.
teshull May 13, 2021
e1a1564
group non-static fields together
javeleon May 13, 2021
e297bcb
Simplify patching inner class names and avoid making a loader constra…
javeleon May 13, 2021
596650f
Memory allocation failure should not be an internal error.
iamstolis May 13, 2021
a158000
Adding a regression test of memory allocation failure.
iamstolis May 13, 2021
0ffe2cf
Simplify array load/store bytecodes.
mukel May 9, 2021
89f1a45
Add explicit accessors in BytecodeStream to handle wide and short byt…
mukel May 11, 2021
0ebf4da
Handle WIDE modifier explicitly to avoid extra branches in the interp…
mukel May 11, 2021
9a2970d
Profile negative array length exceptions.
mukel May 11, 2021
375dce1
Increase loop reporting stride to 256.
mukel May 11, 2021
fa2351f
Move noForeignObject assumption invalidation out of the common tail, …
mukel May 11, 2021
a0a7e9e
Use unsigned comparison for bounds check.
mukel May 11, 2021
08bcc8a
Hoist locals and operand stack array lengths.
mukel May 11, 2021
dc38af6
Fix BCI increment for bytecodes with the WIDE modifier.
mukel May 11, 2021
3a13e73
Document numeric suffixes in BytecodeStream.
mukel May 12, 2021
5af8da9
Simplify the invalidation of noForeignObjects assumption.
mukel May 12, 2021
3af32dd
Save bci before executing trapping bytecodes.
mukel May 13, 2021
dc5f036
Simpilfy return bytecodes.
mukel May 13, 2021
7c9813d
Save the current bci before triggering the debugger hook.
mukel May 14, 2021
2592dcb
Bench suite added automatically by mx
loicottet May 6, 2021
34ed8ae
Change default values.
ansalond May 14, 2021
a639df9
Root methods must be treated as invoked
May 15, 2021
40b6448
[GR-31347] Improve AbsNode canonicalization.
gergo- May 17, 2021
17ad130
svm: do not fail if the phases to be removed are not there in the fir…
zapster May 17, 2021
08d28c8
Add substitution for PhantomReference.refersTo0.
christianhaeubl May 17, 2021
1ed7ca4
Make isolate listener support visible.
christianhaeubl May 17, 2021
d45e99e
Distinguish stack overflow and out of memory errors without a message…
jchalou May 10, 2021
31e8f1d
[GR-31200] Don't add nodes twice in read elimination.
gergo- May 17, 2021
d2f0941
[GR-31309] Cannot invoke default methods of interfaces implemented in…
tzezula May 17, 2021
7a82709
Load generated classes with a custom class loader.
ansalond May 17, 2021
9aa0edd
Store array and foreign shapes in EspressoLanguage.
ansalond May 17, 2021
a55d731
[GR-31155] Update visualvm to build number 998.
soufianenassih May 17, 2021
5757143
Store the klass of all foreign fields, also of those that are null.
ansalond May 17, 2021
dfca9fc
Store array and foreign shapes in instance fields.
ansalond May 17, 2021
20fa0e2
Revert "Store array and foreign shapes in instance fields."
ansalond May 17, 2021
1f99944
Revert "Store the klass of all foreign fields, also of those that are…
ansalond May 17, 2021
389079b
`StaticObject.rawForeignObject()` now requires `EspressoLanguage`.
ansalond May 17, 2021
d1fa8c7
Store array and foreign shapes in instance fields.
ansalond May 17, 2021
4577fbb
[GR-31242] SDK: report resources exhausted and any other unknown exce…
steve-s May 17, 2021
c1492ad
With AOT, the storage class of the parent shape is not loaded by a `G…
ansalond May 17, 2021
0891987
Do not call method that should never be part of compilation.
ansalond May 17, 2021
fab0902
[GR-31259] Tune Espresso interpreter.
mukel May 17, 2021
ca44c1c
Revert "Store array and foreign shapes in instance fields."
ansalond May 17, 2021
9a76a98
Revert "Do not call method that should never be part of compilation."
ansalond May 17, 2021
365d98d
Revert "`StaticObject.rawForeignObject()` now requires `EspressoLangu…
ansalond May 17, 2021
d9042de
[GR-31422] Root methods must be treated as invoked.
May 17, 2021
145ccef
Merge remote-tracking branch 'origin/master' into da/static_object_3
ansalond May 17, 2021
e81575d
Use unsigned comparison for bounds check.
ansalond May 17, 2021
f422d95
Mark array types of elemental-type-supertypes as reachable
May 17, 2021
e13e9a5
[GR-31370] Wasm: Memory allocation failure should not be an internal …
iamstolis May 17, 2021
44a1ff6
[GR-24401] Generalize the object model of Espresso.
ansalond May 18, 2021
f910811
[GR-30564] SVM: do not fail if the phases to be removed are not there…
zapster May 18, 2021
ca787d3
ivs: add duplication method
davleopo May 17, 2021
7baeb52
Merge branch 'master' into ag/GR-29730-hotswap-api
javeleon May 18, 2021
c6ee7b4
Reorder phases before the compilation.
May 11, 2021
7270e21
update comment to clarify class renaming in relation to class loader …
javeleon May 18, 2021
f88cd1e
[GR-31245] Remove unnecessary code in BytecodeParser.
May 18, 2021
5c6d29b
Adjust com.oracle.truffle.nfi.native project to mx changes
pejovica May 18, 2021
889ca5c
[GR-31041] Support PhantomReference.refersTo0.
christianhaeubl May 18, 2021
e101aaa
[GR-31349] IVs: add duplication method.
davleopo May 18, 2021
51c2127
[GR-29730] New Espresso HotSwap API.
javeleon May 18, 2021
48d7e7f
[GR-31354] Improve detection of JDK dependent native projects.
pejovica May 18, 2021
eacbea8
[GR-31075] Add bench-suite default datapoint for benchmarks.
loicottet May 18, 2021
ba037b0
[GR-31285] Workaround missing JFR events using trace compilation deta…
tzezula May 18, 2021
29d856e
[GR-31309] Cannot invoke default methods of interfaces implemented in…
tzezula May 18, 2021
a7fcb95
[GR-31165] Mark array types of elemental-type-supertypes as reachable.
May 19, 2021
0601f96
fix npe
javeleon May 19, 2021
8a2b6a5
[GR-31464] Fix NPE in EspressoContext#lookup.
javeleon May 19, 2021
fa32be9
Initial Module substitution rework
May 6, 2021
5527b98
Minor style changes
May 10, 2021
4caa1df
Add feature to synthesize the boot module layer
Jun 2, 2021
8e1dd0c
Merge old Target_java_lang_Module with new version
Jun 2, 2021
0683d4f
Style fix
Jun 2, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ on:
paths-ignore:
- '.travis.yml'
- '.github/workflows/quarkus.yml'
- '**.md'
pull_request:
paths-ignore:
- '.travis.yml'
- '.github/workflows/quarkus.yml'
- '**.md'
workflow_dispatch: []

env:
Expand Down
11 changes: 10 additions & 1 deletion ci.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,19 @@ local espresso = import 'espresso/ci.jsonnet';

# Sulong
local sulong = import 'sulong/ci.jsonnet';

# Add a guard to `build` that prevents it from running in the gate
# for a PR that only touches *.md flles.
local add_markdown_guard(build) = build + {
guard+: {
excludes+: ["**.md"]
}
};

{
# ensure that entries in common.jsonnet can be resolved
_checkCommon: (import 'common.jsonnet'),
ci_resources:: (import 'ci-resources.libsonnet'),
specVersion: "2",
builds: compiler.builds + wasm.builds + espresso.builds + sulong.builds
builds: [add_markdown_guard(b) for b in (compiler.builds + wasm.builds + espresso.builds + sulong.builds)]
}
2 changes: 1 addition & 1 deletion compiler/ci_common/benchmark-suites.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

// suite definitions
// *****************
awfy: cc.compiler_benchmark + c.heap.default + {
awfy: cc.compiler_benchmark + c.heap.small + {
suite:: "awfy",
run+: [
c.hwlocIfNuma(self.is_numa, $.mx_benchmark + ["awfy:*"] + $.bench_arguments, node=self.numa_nodes[0])
Expand Down
4 changes: 2 additions & 2 deletions compiler/ci_common/gate.hocon
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ gateCmd : ["mx", "--strict-compliance"] ${gateCmdSuffix}

graalWeekly: ${graal-weekly-notifications} {
targets: ["weekly"]
timelimit: "45:00"
timelimit: "1:30:00"
}
graalDaily: ${graal-weekly-notifications} {
targets: ["daily"]
timelimit: "45:00"
timelimit: "1:30:00"
}
gateTest : {
environment : {
Expand Down
3 changes: 3 additions & 0 deletions compiler/mx.compiler/mx_compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -694,6 +694,9 @@ def _unittest_config_participant(config):
if _get_XX_option_value(vmArgs, 'TypeProfileWidth', None) is None:
vmArgs.append('-XX:TypeProfileWidth=8')

# TODO: GR-31197, this should be removed.
vmArgs.append('-Dpolyglot.engine.DynamicCompilationThresholds=false')
vmArgs.append('-Dpolyglot.engine.AllowExperimentalOptions=true')
return (vmArgs, mainClass, mainClassArgs)

mx_unittest.add_config_participant(_unittest_config_participant)
Expand Down
5 changes: 5 additions & 0 deletions compiler/mx.compiler/suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -1785,6 +1785,11 @@
"dependencies" : [
"org.graalvm.compiler.truffle.test",
],
"requiresConcealed" : {
"jdk.internal.vm.ci" : [
"jdk.vm.ci.meta",
],
},
"annotationProcessors" : [
"GRAAL_PROCESSOR",
"truffle:TRUFFLE_DSL_PROCESSOR"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
/*
* Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.graalvm.compiler.core.common.util;

import java.util.Formatter;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;

/**
* An ordered list of compiler phases.
*
* @param <T> the type of a phase in the plan
*/
public interface PhasePlan<T> {

/**
* Gets an unmodifiable view on the phases in this plan.
*/
List<T> getPhases();

/**
* Gets a name for a phase in the plan.
*
* This should be in the format of a qualified Java class name.
*/
default String getPhaseName(T phase) {
return phase.getClass().getName();
}

/**
* Utility for formatting a plan as a string.
*/
final class Printer {
private static final String CONNECTING_INDENT = "\u2502 "; // "| "
private static final String EMPTY_INDENT = " ";
private static final String CHILD = "\u251c\u2500\u2500 "; // "|-- "
private static final String LAST_CHILD = "\u2514\u2500\u2500 "; // "`-- "

final Map<String, String> abbreviations = new HashMap<>();

/**
* Prints {@code plan} to {@code buf}.
*
* @return {@code buf}
*/
public <T> Formatter printTo(PhasePlan<T> plan, Formatter buf) {
return printPlan(Printer.CHILD, Printer.LAST_CHILD, plan, buf);
}

/**
* Prints {@code plan} to a string and returns it.
*/
public <T> String toString(PhasePlan<T> plan) {
return printPlan(Printer.CHILD, Printer.LAST_CHILD, plan, new Formatter()).toString();
}

@SuppressWarnings("unchecked")
private <T> Formatter printPlan(String indent, String indentLast, PhasePlan<T> plan, Formatter buf) {
for (Iterator<T> iter = plan.getPhases().iterator(); iter.hasNext();) {
T phase = iter.next();
String className = plan.getPhaseName(phase);
boolean hasNext = iter.hasNext();
buf.format("%s%s%n", hasNext ? indent : indentLast, abbreviate(className));
if (phase instanceof PhasePlan) {
PhasePlan<T> subPlan = (PhasePlan<T>) phase;
String prefix = hasNext ? CONNECTING_INDENT : EMPTY_INDENT;
printPlan(prefix + indent, prefix + indentLast, subPlan, buf);
}
}
return buf;
}

private static int firstCapitalAfterPeriod(String s) {
for (int i = 1; i < s.length(); i++) {
if (s.charAt(i - 1) == '.' && Character.isUpperCase(s.charAt(i))) {
return i;
}
}
return 0;
}

private String abbreviate(String className) {
String abbreviation = abbreviations.get(className);
if (abbreviation == null) {
int simpleClassNameStart = firstCapitalAfterPeriod(className);
String simpleClassName = className.substring(simpleClassNameStart);
String packageName = simpleClassNameStart != 0 ? className.substring(0, simpleClassNameStart - 1) : "";
if (abbreviations.values().contains(simpleClassName)) {
abbreviation = simpleClassName + " [" + packageName + "]";
} else {
abbreviation = simpleClassName;
}
abbreviations.put(className, abbreviation);
}
return abbreviation;
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
/*
* Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.graalvm.compiler.core.test;

import org.graalvm.compiler.nodes.StructuredGraph;
import org.graalvm.compiler.nodes.calc.AbsNode;
import org.graalvm.compiler.nodes.calc.NegateNode;
import org.junit.Assert;
import org.junit.Test;

public class AbsCanonicalizationTest extends GraalCompilerTest {
public static double absReference(double x) {
return Math.abs(x);
}

public static double absAbs(double x) {
return Math.abs(Math.abs(x));
}

public static double absNegate(double x) {
return Math.abs(-x);
}

@Test
public void testAbsNegate() {
StructuredGraph graph = parseEager("absNegate", StructuredGraph.AllowAssumptions.YES);
createInliningPhase().apply(graph, getDefaultHighTierContext());
createCanonicalizerPhase().apply(graph, getProviders());

StructuredGraph referenceGraph = parseEager("absReference", StructuredGraph.AllowAssumptions.YES);
assertEquals(referenceGraph, graph);
Assert.assertEquals(0, graph.getNodes().filter(NegateNode.class).count());

testAgainstExpected(graph.method(), new Result(absNegate(-Double.MAX_VALUE), null), (Object) null, Double.MAX_VALUE);
testAgainstExpected(graph.method(), new Result(absNegate(0d), null), (Object) null, 0d);
testAgainstExpected(graph.method(), new Result(absNegate(Double.MAX_VALUE), null), (Object) null, Double.MAX_VALUE);
}

@Test
public void testAbsAbs() {
StructuredGraph graph = parseEager("absAbs", StructuredGraph.AllowAssumptions.YES);
createInliningPhase().apply(graph, getDefaultHighTierContext());
createCanonicalizerPhase().apply(graph, getProviders());

StructuredGraph referenceGraph = parseEager("absReference", StructuredGraph.AllowAssumptions.YES);
assertEquals(referenceGraph, graph);
Assert.assertEquals(1, graph.getNodes().filter(AbsNode.class).count());

testAgainstExpected(graph.method(), new Result(absAbs(-Double.MAX_VALUE), null), (Object) null, Double.MAX_VALUE);
testAgainstExpected(graph.method(), new Result(absAbs(0d), null), (Object) null, 0d);
testAgainstExpected(graph.method(), new Result(absAbs(Double.MAX_VALUE), null), (Object) null, Double.MAX_VALUE);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
import java.util.List;
import java.util.Map;

import org.graalvm.compiler.java.BytecodeParser.BytecodeParserError;
import org.graalvm.compiler.serviceprovider.JavaVersionUtil;
import org.junit.Assume;
import org.junit.Test;
Expand All @@ -40,6 +39,7 @@
import org.objectweb.asm.MethodVisitor;
import org.objectweb.asm.Type;

import jdk.vm.ci.meta.ConstantPool;
import jdk.vm.ci.meta.ResolvedJavaMethod;

/**
Expand Down Expand Up @@ -240,20 +240,30 @@ protected byte[] generateClass(String internalClassName) {
@SuppressWarnings("try")
@Test
public void test() throws Throwable {
boolean jvmciCompatibilityChecked = false;
for (TestGenerator e : generators.values()) {
Class<?> testClass = getClass(e.className);
ResolvedJavaMethod run = getResolvedJavaMethod(testClass, "run");
try {
Result actual = executeActual(run, null);
if (VERBOSE) {
System.out.println(run.format("%H.%n(%p)") + " -> " + actual);
}
} catch (BytecodeParserError err) {
Throwable cause = err.getCause();
Assume.assumeFalse("running on JVMCI that does not support CONSTANT_Dynamic", String.valueOf(cause).contains("Unknown JvmConstant tag 17"));
throw err;
if (!jvmciCompatibilityChecked) {
checkJVMCICompatibility(run);
jvmciCompatibilityChecked = true;
}
Result actual = executeActual(run, null);
if (VERBOSE) {
System.out.println(run.format("%H.%n(%p)") + " -> " + actual);
}
test(run, null);
}
}

private static void checkJVMCICompatibility(ResolvedJavaMethod run) {
ConstantPool cp = run.getConstantPool();
for (int i = 0; i < cp.length(); i++) {
try {
cp.lookupConstant(i);
} catch (Throwable t) {
Assume.assumeFalse("running on JVMCI that does not support CONSTANT_Dynamic", String.valueOf(t).contains("Unknown JvmConstant tag 17"));
}
}
}
}
Loading