Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance Managed_Resource to allow implementation of in-memory caches #11577

Merged
merged 29 commits into from
Dec 3, 2024
Merged
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
5266a4b
Using Ref.new allow_gc=True to implement in-memory caches
JaroslavTulach Nov 18, 2024
d803b28
Hide operations with References behind @TruffleBoundary
JaroslavTulach Nov 18, 2024
38a20b4
Work with v and not this.value
JaroslavTulach Nov 18, 2024
0f437fc
Merging with latest develop
JaroslavTulach Nov 20, 2024
404e3cc
Fixing typo
JaroslavTulach Nov 20, 2024
5629e20
Using Ref.new to cache reference to EnsoHTTPResponseCache
JaroslavTulach Nov 20, 2024
b1d4b37
Removing (unused) support for Name.Special
JaroslavTulach Nov 20, 2024
0e42e9d
Fixing moved import
JaroslavTulach Nov 20, 2024
0b4e1f8
Providing access to bodyNode in the builtin methods
JaroslavTulach Nov 20, 2024
f5f1614
Enabling allow_gc in the caches
JaroslavTulach Nov 20, 2024
dad2bb6
Note in changelog
JaroslavTulach Nov 20, 2024
85e8b6d
Can no longer invoke Managed_Resource.with when Managed_Resource.fina…
JaroslavTulach Nov 27, 2024
e56b867
Backing out the Ref changes
JaroslavTulach Nov 28, 2024
3ca29aa
Merge tag '2024.5.1-nightly.2024.11.27' into wip/jtulach/ReferenceMan…
JaroslavTulach Nov 28, 2024
da2d438
Ref.new takes only one argument (again)
JaroslavTulach Nov 28, 2024
ae83008
Commenting out releaseAll call for now
JaroslavTulach Nov 28, 2024
276a885
Allow system controlled Managed_Resource
JaroslavTulach Nov 28, 2024
205811c
Merging with most recent develop
JaroslavTulach Nov 28, 2024
40aedfc
on_missing behavior for managed resources that get access after being…
JaroslavTulach Nov 28, 2024
2e91135
Updating micro-distribution with the new Managed_Resource builtins
JaroslavTulach Nov 28, 2024
786f156
Moving the GC related parts of RefTest to ManagedResourceTest
JaroslavTulach Nov 28, 2024
934ec5f
Better note in changelog
JaroslavTulach Nov 28, 2024
a3c07e0
Making public so the Fetch_Spec passes OK
JaroslavTulach Nov 28, 2024
a7890d2
Using Managed_Resource inside of EnsoSecretHelper
JaroslavTulach Nov 28, 2024
a1f7e6f
Radek demands use of False
JaroslavTulach Dec 2, 2024
873bac3
Return DataflowError on with of already finalized Managed_Resource
JaroslavTulach Dec 2, 2024
068d223
Rename to scheduleFinalizationOfSystemReferences
JaroslavTulach Dec 2, 2024
7daf941
Uninitialized_State payload is Text
JaroslavTulach Dec 2, 2024
ca7592b
Invoke the Managed_Resource.with an error if GCed
JaroslavTulach Dec 3, 2024
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
Prev Previous commit
Next Next commit
Merging with latest develop
JaroslavTulach committed Nov 20, 2024
commit 0f437fc2525319603927b17fdc7785b512c769fa
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@
@ExportLibrary(InteropLibrary.class)
@ExportLibrary(TypesLibrary.class)
@Builtin(pkg = "mutable", stdlibName = "Standard.Base.Runtime.Ref.Ref")
public final class Ref implements EnsoObject {
public final class Ref extends EnsoObject {
/**
* {@code 0} - regular reference to an object {@code 1} - reference via {@link SoftReference}
* {@code 2} - reference via {@link WeakReference}
@@ -99,4 +99,17 @@ private final Object unwrapValue(Object v) {
return v;
}
}

@ExportMessage
Object toDisplayString(
boolean allowSideEffects, @CachedLibrary(limit = "3") InteropLibrary interop) {
return interop.toDisplayString(value, allowSideEffects);
}

@TruffleBoundary
@Override
@ExportMessage.Ignore
public Object toDisplayString(boolean allowSideEffects) {
return toDisplayString(allowSideEffects, InteropLibrary.getUncached());
}
}
You are viewing a condensed version of this merge commit. You can view the full changes here.