Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
a26d37a
Lays the foundation for the incoming EspressoLibs substitutions. This…
Aug 11, 2025
179fce7
Substitution for the TruffleFileSystem:
Jul 25, 2025
9908dfb
Various substitutions for native methods used early on in micronaut H…
Jul 25, 2025
095ded3
Refactor of TruffleIO:
Jul 25, 2025
2669d98
fixup! Substitution for the TruffleFileSystem:
Aug 11, 2025
5f1ca1b
Networking Support for EspressoLibs
Aug 12, 2025
9054156
Selector and Poller implementation for EspressoLibs
Aug 8, 2025
646a1c7
IO and additional FileSystem substitutions:
Aug 8, 2025
932d106
Low-level Runtime substitutions:
Aug 8, 2025
c6abb7d
Add NativeMemory abstraction to Espresso.
mukel Dec 17, 2024
64b987a
Introduction of full no-native access mode
Aug 13, 2025
21c8990
beginning of AWT substitutions
Jul 14, 2025
678d323
Merge branch 'a2p/virtual-native-memory' into et/e/full_no_native
Jul 18, 2025
894c166
Introduction of NativeMemory to EspressoLibs:
Jul 22, 2025
465b8f9
[GR-67928] No-Native-Espresso with virtualized memory
Aug 13, 2025
0c7d3c6
re-apply changes from PR 20085
simongruenbacher Jul 23, 2025
446f101
able to compile and run HelloWorld
simongruenbacher Aug 1, 2025
e99454c
Fix module loading problem
simongruenbacher Aug 5, 2025
fa891da
Cleanup and set os.name to 'Web Image'
simongruenbacher Aug 5, 2025
b5fa9d2
support decoding non-deflated zip files in webimage
simongruenbacher Aug 22, 2025
a4980b0
gracefully fail in image reader when file channel unsupported
simongruenbacher Sep 8, 2025
479742e
use guest file system for class loading in espresso
simongruenbacher Sep 8, 2025
c3f074f
remove redundant security manager version fix
simongruenbacher Sep 11, 2025
d9c3fb8
remove hotfix for GR-48016
simongruenbacher Sep 11, 2025
c7ffa02
set webimage substitutions to match status after merged PR GR-69033
simongruenbacher Sep 11, 2025
7b19450
(1) remove stdin index to be added in no-native branch (2) integrate …
simongruenbacher Sep 12, 2025
1ddf2aa
apply suggested changes to unaligned unsafe support
simongruenbacher Sep 23, 2025
9ae13dd
revert TruffleFile changes
simongruenbacher Sep 29, 2025
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
8 changes: 8 additions & 0 deletions ci/common.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,14 @@ local common_json = import "../common.json";
} else {},
},

espresso:: {
downloads+: {
EXTRA_JAVA_HOMES+: {
pathlist+: [jdks_data["oraclejdk21"], jdks_data["oraclejdk25"]],
}
}
},

sulong:: self.cmake + {
packages+: if self.os == "windows" then {
msvc_source: "==14.0",
Expand Down
2 changes: 1 addition & 1 deletion common.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"Jsonnet files should not include this file directly but use ci/common.jsonnet instead."
],

"mx_version": "7.58.9",
"mx_version": "7.59.0",

"COMMENT.jdks": "When adding or removing JDKs keep in sync with JDKs in ci/common.jsonnet",
"jdks": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,10 @@ public static JavaVersion forVersion(String version) {
}
}

public Runtime.Version toRunTimeVersion() {
return Runtime.Version.parse(toString());
}

private static JavaVersion forVersion(Runtime.Version version) {
return forVersion(version.feature());
}
Expand Down
2 changes: 1 addition & 1 deletion espresso/ci/ci_common/common.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ local benchmark_suites = ['dacapo', 'renaissance', 'scala-dacapo'];
local that = self,

// platform-specific snippets
common: graal_common.deps.sulong + {
common: graal_common.deps.sulong + graal_common.deps.espresso + {
python_version: '3',
environment+: {
GRAALVM_CHECK_EXPERIMENTAL_OPTIONS: "true",
Expand Down
36 changes: 35 additions & 1 deletion espresso/mx.espresso/suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,41 @@
"sourceDirs": ["src"],
# Contains classes in sun.nio.* that only compile with javac.
"forceJavac": "true",
"javaCompliance": "8+",
"javaCompliance": "21+",
"patchModule": "java.base",
"checkPackagePrefix": False, # Contains classes in java.io and sun.nio.
"checkstyle": "com.oracle.truffle.espresso",
},

"com.oracle.truffle.espresso.io.jdk21": {
"subDir": "src",
"sourceDirs": ["src"],
"dependencies": [
"com.oracle.truffle.espresso.io",
],
# Contains classes in sun.nio.* that only compile with javac.
"overlayTarget": "com.oracle.truffle.espresso.io",
"forceJavac": "true",
"multiReleaseJarVersion": "21",
"patchModule": "java.base",
"javaCompliance": "21",
"checkPackagePrefix": False, # Contains classes in java.io and sun.nio.
"checkstyle": "com.oracle.truffle.espresso",
},

"com.oracle.truffle.espresso.io.jdk25": {
"subDir": "src",
"sourceDirs": ["src"],
"dependencies": [
"com.oracle.truffle.espresso.io",
],
# Contains classes in sun.nio.* that only compile with javac.
"spotbugs": "false", # inorder to pass the gate
"overlayTarget": "com.oracle.truffle.espresso.io",
"forceJavac": "true",
"multiReleaseJarVersion": "25",
"patchModule": "java.base",
"javaCompliance": "25",
"checkPackagePrefix": False, # Contains classes in java.io and sun.nio.
"checkstyle": "com.oracle.truffle.espresso",
},
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/*
* Copyright (c) 2023, 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.
*
* 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 sun.nio.ch;

import java.io.IOException;

public class DefaultPollerProvider extends PollerProvider {

@Override
Poller readPoller() throws IOException {
return new TrufflePoller(true);
}

@Override
Poller writePoller() throws IOException {
return new TrufflePoller(false);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
/*
* Copyright (c) 2023, 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.
*
* 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 sun.nio.ch;

import java.io.IOException;
import java.nio.channels.SelectionKey;

public class TrufflePoller extends Poller {
private final int id;
private final int event;

TrufflePoller(boolean read) {
super(read);
this.event = (read) ? SelectionKey.OP_READ : SelectionKey.OP_WRITE;
id = init();
}

@Override
void implRegister(int fdVal) throws IOException {
register(id, fdVal, event);
}

@Override
void implDeregister(int fdVal) {
deregister(id, fdVal);
}

@Override
int poll(int timeout) throws IOException {
doSelect(id, timeout);
int[] fds = getReadyFds(id);
for (int i = 0; i < fds.length; i++) {
polled(fds[i]);
}
return fds.length;
}

static native int init();

static native void deregister(int id, int fd);

static native void register(int id, int fd, int newEvents);

static native int doSelect(int id, long timeout);

static native int[] getReadyFds(int id);

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/*
* Copyright (c) 2023, 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.
*
* 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 sun.nio.fs;

import java.io.Closeable;
import java.io.FileDescriptor;
import java.nio.channels.FileChannel;

import sun.nio.ch.FileChannelImpl;

public class NewFileChannelHelper {
public static FileChannel open(FileDescriptor fd, String path,
boolean readable, boolean writable,
boolean sync, boolean direct, Closeable parent) {
return FileChannelImpl.open(fd, path, readable, writable, direct, parent);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/*
* Copyright (c) 2023, 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.
*
* 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 sun.nio.ch;

import java.io.IOException;

public class DefaultPollerProvider extends PollerProvider {
@Override
Poller readPoller(boolean subPoller) throws IOException {
if (subPoller) {
// the concept of subPoller relies on virtual threads which are not supported thus we
// should not reach here.
throw new IllegalStateException("should not reach here");
}
return new TrufflePoller(true);
}

@Override
Poller writePoller(boolean subPoller) throws IOException {
if (subPoller) {
// same reasoning as above
throw new IllegalStateException("should not reach here");
}
return new TrufflePoller(false);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
/*
* Copyright (c) 2023, 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.
*
* 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 sun.nio.ch;

import java.io.IOException;
import java.nio.channels.SelectionKey;

public class TrufflePoller extends Poller {
private final int id;
private final int event;

TrufflePoller(boolean read) {
super();
this.event = (read) ? SelectionKey.OP_READ : SelectionKey.OP_WRITE;
id = init();
}

@Override
void implRegister(int fdVal) throws IOException {
// this registeration must be one shot now
register(id, fdVal, event);
}

@Override
void implDeregister(int fdVal, boolean polled) {
if (!polled) {
deregister(id, fdVal);
}
}

@Override
int poll(int timeout) throws IOException {
doSelect(id, timeout);
int[] fds = getReadyFds(id);
for (int i = 0; i < fds.length; i++) {
polled(fds[i]);
}
return fds.length;
}

static native int init();

static native void deregister(int id, int fd);

static native void register(int id, int fd, int newEvents);

static native int doSelect(int id, long timeout);

static native int[] getReadyFds(int id);

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/*
* Copyright (c) 2023, 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.
*
* 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 sun.nio.fs;

import java.io.Closeable;
import java.io.FileDescriptor;
import java.nio.channels.FileChannel;

import sun.nio.ch.FileChannelImpl;

public class NewFileChannelHelper {
public static FileChannel open(FileDescriptor fd, String path,
boolean readable, boolean writable,
boolean sync, boolean direct, Closeable parent) {
return FileChannelImpl.open(fd, path, readable, writable, sync, direct, parent);
}
}
Loading