Skip to content

Commit 46bde32

Browse files
committed
Removed toDisplayString and hasLanguageId requirements for isScope.
1 parent 8d96e5b commit 46bde32

File tree

2 files changed

+9
-12
lines changed

2 files changed

+9
-12
lines changed

truffle/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ This changelog summarizes major changes between Truffle versions relevant to lan
6161
* GR-71088 Added `CompilerDirectives.EarlyEscapeAnalysis` annotation that runs partial escape analysis early before partial evaluation enabling partial-evaluation-constant scalar replacements.
6262
* GR-71870 Truffle DSL no longer supports mixed exclusive and shared inlined caches. Sharing will now be disabled if mixing was used. To resolve the new warnings it is typically necessary to use either `@Exclusive` or `@Shared` for all caches.
6363
* GR-71887: Bytecode DSL: Added a `ClearLocal` operation for fast clearing of local values.
64-
* 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.
64+
* GR-71088 Added `CompilerDirectives.EarlyEscapeAnalysis` annotation that runs partial escape analysis early before partial evaluation enabling partial-evaluation-constant scalar replacements.
6565
* 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.
6666
* GR-71402: Added `InteropLibrary#hasStaticScope` and `InteropLibrary#getStaticScope` returning the static scope representing static or class-level members associated with the given meta object.
6767

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)