Skip to content

[GR-80028] Remove PosixSupportLibrary. - #1204

Merged
graalvmbot merged 52 commits into
masterfrom
fa/GR-80028/remove_posix_lib
Oct 8, 2026
Merged

graalvmbot merged 52 commits into
masterfrom
fa/GR-80028/remove_posix_lib

Conversation

@graalvmbot

Copy link
Copy Markdown
Collaborator

Replace PosixSupportLibrary with ordinary Java methods and inheritance.

Following the migration from Truffle NFI to FFM, the POSIX backend implementations gain little from Truffle partial evaluation. Path and C-string conversions still benefit from cached TruffleString nodes, so this change moves those conversions into PosixSupportNodes at the call sites and executes backend operations behind @TruffleBoundary.
This reduces the amount of POSIX implementation code reachable for runtime compilation while keeping string conversions visible to partial evaluation.

In detail:

  1. NativePosixSupport represents paths and C strings as encoded bytes, stored in byte[] and copied to off-heap memory for native calls. Windows paths use UTF-16LE for the wide APIs.
  2. EmulatedPosixSupport uses java.lang.String.
  3. PosixSupportNodes converts between TruffleString and these backend representations.
  4. POSIX operations use ordinary Java methods annotated with @TruffleBoundary.

@oracle-contributor-agreement oracle-contributor-agreement Bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Oct 8, 2026
@graalvmbot
graalvmbot merged commit 130557e into master Oct 8, 2026
7 checks passed
@graalvmbot
graalvmbot deleted the fa/GR-80028/remove_posix_lib branch October 8, 2026 19:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OCA Verified All contributors have signed the Oracle Contributor Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants