Skip to content

Commit

Permalink
[GR-40518] [GR-42735] [GR-42122] [GR-42231] Espresso: Java 19 & 20 su…
Browse files Browse the repository at this point in the history
…pport.

PullRequest: graal/13566
  • Loading branch information
gilles-duboscq committed Jan 31, 2023
2 parents f1da8dd + 985d6e0 commit cfd323b
Show file tree
Hide file tree
Showing 82 changed files with 1,102 additions and 736 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -197,16 +197,13 @@ protected EncodedGraph lookupEncodedGraph(ResolvedJavaMethod method, BytecodePro
return result;
}

result = persistentGraphCache.get(method);
if (result == null) {
result = lookupOrCreatePersistentEncodedGraph(method, intrinsicBytecodeProvider);
// Cached graph from previous compilation may not have source positions, re-parse and
// store in compilation-local cache.
if (result != null && !result.trackNodeSourcePosition() && graph.trackNodeSourcePosition()) {
assert method.hasBytecodes();
result = createGraph(method, intrinsicBytecodeProvider);
assert result.trackNodeSourcePosition();
}
result = lookupOrCreatePersistentEncodedGraph(method, intrinsicBytecodeProvider);
// Cached graph from previous compilation may not have source positions, re-parse and
// store in compilation-local cache.
if (result != null && !result.trackNodeSourcePosition() && graph.trackNodeSourcePosition()) {
assert method.hasBytecodes();
result = createGraph(method, intrinsicBytecodeProvider);
assert result.trackNodeSourcePosition();
}

if (result != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ public void run(CallTree tree) {
}
if (child.isTrivial()) {
child.expand();
child.inline();
if (child.getState() == CallNode.State.Expanded) {
child.inline();
}
}
}
}
Expand Down
4 changes: 4 additions & 0 deletions espresso/ci/ci_common/common.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@ local benchmark_suites = ['dacapo', 'renaissance', 'scala-dacapo'];
jdk17_on_demand_bench_windows : graal_common.labsjdk17 + self.onDemandBench + base.windows_17,

jdk19_gate_linux : graal_common.labsjdk19 + graal_common.labsjdk19LLVM + self.gate + self.linux,
jdk19_weekly_linux : graal_common.labsjdk19 + graal_common.labsjdk19LLVM + self.weekly + self.linux,

jdk20_gate_linux : graal_common.labsjdk20 + graal_common.labsjdk20LLVM + self.gate + self.linux,
jdk20_daily_linux : graal_common.labsjdk20 + graal_common.labsjdk20LLVM + self.daily + self.linux,

// shared snippets
eclipse: {
Expand Down
29 changes: 28 additions & 1 deletion espresso/src/com.oracle.truffle.espresso.mokapot/include/jni.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 2022, 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
Expand Down Expand Up @@ -768,6 +768,11 @@ struct JNINativeInterface_ {

jobject (JNICALL *GetModule)
(JNIEnv* env, jclass clazz);

/* Virtual threads */

jboolean (JNICALL *IsVirtualThread)
(JNIEnv* env, jobject obj);
};

/*
Expand Down Expand Up @@ -1866,9 +1871,29 @@ struct JNIEnv_ {
return functions->GetModule(this, clazz);
}

/* Virtual threads */

jboolean IsVirtualThread(jobject obj) {
return functions->IsVirtualThread(this, obj);
}

#endif /* __cplusplus */
};

/*
* optionString may be any option accepted by the JVM, or one of the
* following:
*
* -D<name>=<value> Set a system property.
* -verbose[:class|gc|jni] Enable verbose output, comma-separated. E.g.
* "-verbose:class" or "-verbose:gc,class"
* Standard names include: gc, class, and jni.
* All nonstandard (VM-specific) names must begin
* with "X".
* vfprintf extraInfo is a pointer to the vfprintf hook.
* exit extraInfo is a pointer to the exit hook.
* abort extraInfo is a pointer to the abort hook.
*/
typedef struct JavaVMOption {
char *optionString;
void *extraInfo;
Expand Down Expand Up @@ -1963,6 +1988,8 @@ JNI_OnUnload(JavaVM *vm, void *reserved);
#define JNI_VERSION_1_8 0x00010008
#define JNI_VERSION_9 0x00090000
#define JNI_VERSION_10 0x000a0000
#define JNI_VERSION_19 0x00130000
#define JNI_VERSION_20 0x00140000

#ifdef __cplusplus
} /* extern "C" */
Expand Down
Loading

0 comments on commit cfd323b

Please sign in to comment.