Skip to content

Commit 0d08676

Browse files
committed
Removed toDisplayString and hasLanguageId requirements for isScope.
1 parent 6d58185 commit 0d08676

File tree

2 files changed

+9
-13
lines changed

2 files changed

+9
-13
lines changed

truffle/CHANGELOG.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,7 @@ This changelog summarizes major changes between Truffle versions relevant to lan
5858
* GR-69614: Added `TruffleInstrument.Env.getHostLanguage()` returning the host language info. This allows instruments to lookup the top scope of the host language using `Env.getScope(LanguageInfo)`.
5959
* GR-71468: Significantly improve optimized performance of host proxy interfaces (`org.graalvm.polyglot.proxy.Proxy`).
6060
* GR-71088 Added `CompilerDirectives.EarlyInline` annotation that performs a conservative early inlining pass for methods before partial evaluation. This is intended to expose small branch/bytecode handlers and similar helpers to optimizations such as @ExplodeLoop, in particular for MERGE_EXPLODE bytecode interpreter loops.
61-
* GR-71088 Added `CompilerDirectives.EarlyEscapeAnalysis` annotation that runs partial escape analysis early before partial evaluation enabling partial-evaluation-constant scalar replacements.
62-
* GR-71402: Added `InteropLibrary#hasHostObject` and `InteropLibrary#getHostObject` for accessing the Java host-object representation of a Truffle guest object. Deprecated `Env#isHostObject`, `Env#isHostException`, `Env#isHostFunction`, `Env#isHostSymbol`, `Env#asHostObject`, and `Env#asHostException` in favor of the new InteropLibrary messages.
61+
* GR-71088 Added `CompilerDirectives.EarlyEscapeAnalysis` annotation that runs partial escape analysis early before partial evaluation enabling partial-evaluation-constant scalar replacements.
6362
* GR-71402: Added `InteropLibrary#isHostObject` and `InteropLibrary#asHostObject` for accessing the Java host-object representation of a Truffle guest object. Deprecated `Env#isHostObject`, `Env#isHostException`, `Env#isHostFunction`, `Env#isHostSymbol`, `Env#asHostObject`, and `Env#asHostException` in favor of the new InteropLibrary messages.
6463
* GR-71402: Added `InteropLibrary#hasStaticScope` and `InteropLibrary#getStaticScope` returning the static scope representing static or class-level members associated with the given meta object.
6564

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

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2518,7 +2518,7 @@ public Class<? extends TruffleLanguage<?>> getLanguage(Object receiver) throws U
25182518
* @see #toDisplayString(Object)
25192519
* @since 25.1
25202520
*/
2521-
@Abstract(ifExported = {"getLanguageId"}, ifExportedAsWarning = {"isScope", "hasLanguage"}, replacementOf = "hasLanguage(Object)", replacementMethod = "hasLanguageLegacy")
2521+
@Abstract(ifExported = {"getLanguageId"}, ifExportedAsWarning = {"hasLanguage"}, replacementOf = "hasLanguage(Object)", replacementMethod = "hasLanguageLegacy")
25222522
public boolean hasLanguageId(Object receiver) {
25232523
if (!hasLanguage(receiver)) {
25242524
return false;
@@ -2649,7 +2649,7 @@ public Object getMetaObject(Object receiver) throws UnsupportedMessageException
26492649
* @see TruffleLanguage#getLanguageView(Object, Object)
26502650
* @since 20.1
26512651
*/
2652-
@Abstract(ifExported = {"hasLanguageId", "getLanguageId", "hasLanguage", "getLanguage", "isScope"})
2652+
@Abstract(ifExported = {"hasLanguageId", "getLanguageId", "hasLanguage", "getLanguage"})
26532653
@TruffleBoundary
26542654
public Object toDisplayString(Object receiver, boolean allowSideEffects) {
26552655
if (allowSideEffects) {
@@ -2997,12 +2997,10 @@ public int identityHashCode(Object receiver) throws UnsupportedMessageException
29972997

29982998
/**
29992999
* Returns <code>true</code> if the value represents a scope object, else <code>false</code>.
3000-
* The scope object contains variables as {@link #getMembers(Object) members} and has a
3001-
* {@link InteropLibrary#toDisplayString(Object, boolean) scope display name}. It needs to be
3002-
* associated with a {@link #getLanguageId(Object) language}. The scope may return a
3003-
* {@link InteropLibrary#getSourceLocation(Object) source location} that indicates the range of
3004-
* the scope in the source code. The scope may have {@link #hasScopeParent(Object) parent
3005-
* scopes}.
3000+
* The scope object contains variables as {@link #getMembers(Object) members}. The scope may
3001+
* return a {@link InteropLibrary#getSourceLocation(Object) source location} that indicates the
3002+
* range of the scope in the source code. The scope may have {@link #hasScopeParent(Object)
3003+
* parent scopes}.
30063004
* <p>
30073005
* The {@link #getMembers(Object) members} of a scope represent all visible flattened variables,
30083006
* including all parent scopes, if any. The variables of the current scope must be listed first
@@ -3017,10 +3015,9 @@ public int identityHashCode(Object receiver) throws UnsupportedMessageException
30173015
* member elements providing the same {@link #asString(Object) name}.
30183016
* <p>
30193017
* This method must not cause any observable side-effects. If this method is implemented then
3020-
* also {@link #hasMembers(Object)} and {@link #toDisplayString(Object, boolean)} must be
3021-
* implemented and {@link #hasSourceLocation(Object)} is recommended.
3018+
* also {@link #hasMembers(Object)} must be implemented and {@link #hasSourceLocation(Object)}
3019+
* is recommended.
30223020
*
3023-
* @see #getLanguageId(Object)
30243021
* @see #getMembers(Object)
30253022
* @see #hasScopeParent(Object)
30263023
* @since 20.3

0 commit comments

Comments
 (0)