Skip to content

Commit b85c8cd

Browse files
committed
[GR-38387] Require stable order of interop members.
PullRequest: graal/11667
2 parents 8535148 + 906c777 commit b85c8cd

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

truffle/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ This changelog summarizes major changes between Truffle versions relevant to lan
2121
* On HotSpot hosts the new optimizations will be applied to methods annotated with `@BytecodeInterpreterSwitch` only.
2222
* The annotation `@BytecodeInterpreterSwitchBoundary` was deprecated. Boundaries for the compilation are now inferred from directives like `CompilerDirective.transferToInterpreter()` and `@TruffleBoundary` automatically.
2323
* See the [HostOptimization.md](https://github.com/oracle/graal/blob/master/truffle/docs/HostCompilation.md) for further details.
24+
* GR-38387 Deterministic and declaration order of `InteropLibrary.getMembers()` is now required.
2425

2526
## Version 22.1.0
2627

truffle/src/com.oracle.truffle.api.interop/src/com/oracle/truffle/api/interop/InteropLibrary.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -630,6 +630,13 @@ public boolean hasMembers(Object receiver) {
630630
* like {@link #getSourceLocation(Object) source location} in case of {@link #isScope(Object)
631631
* scope} variables, etc.
632632
* <p>
633+
* The order of member names needs to be:
634+
* <ul>
635+
* <li>deterministic, assuming the program execution is deterministic,</li>
636+
* <li>in the declaration order, when applicable,</li>
637+
* <li>multiple invocations of this method must return the same members in the same order as
638+
* long as no side-effecting operations were performed.</li>
639+
* </ul>
633640
* If the includeInternal argument is <code>true</code> then internal member names are returned
634641
* as well. Internal members are implementation specific and should not be exposed to guest
635642
* language application. An example of internal members are internal slots in ECMAScript.

0 commit comments

Comments
 (0)