-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Sam Gammon <sam@elide.dev>
- Loading branch information
Showing
31 changed files
with
431 additions
and
313 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
packages/engine/src/main/kotlin/elide/runtime/interop/InteropProxyObject.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/* | ||
* Copyright (c) 2024-2025 Elide Technologies, Inc. | ||
* | ||
* Licensed under the MIT license (the "License"); you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at | ||
* | ||
* https://opensource.org/license/mit/ | ||
* | ||
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on | ||
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
* License for the specific language governing permissions and limitations under the License. | ||
*/ | ||
package elide.runtime.interop | ||
|
||
import org.graalvm.polyglot.proxy.ProxyObject | ||
|
||
/** | ||
* ## Interoperable Proxy Object | ||
* | ||
* Describes a [ProxyObject] which is usable by guest languages. | ||
*/ | ||
public sealed interface InteropProxyObject : ProxyObject |
26 changes: 26 additions & 0 deletions
26
packages/engine/src/main/kotlin/elide/runtime/interop/ReadOnlyProxyObject.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* | ||
* Copyright (c) 2024-2025 Elide Technologies, Inc. | ||
* | ||
* Licensed under the MIT license (the "License"); you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at | ||
* | ||
* https://opensource.org/license/mit/ | ||
* | ||
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on | ||
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
* License for the specific language governing permissions and limitations under the License. | ||
*/ | ||
package elide.runtime.interop | ||
|
||
import org.graalvm.polyglot.Value | ||
import org.graalvm.polyglot.proxy.ProxyObject | ||
|
||
/** | ||
* ## Read-only Proxy Object | ||
* | ||
* Interop base which defines a [ProxyObject] that forbids writes and deletes. | ||
*/ | ||
public interface ReadOnlyProxyObject : SealedProxyObject { | ||
override fun putMember(key: String?, value: Value?): Unit = Unit | ||
override fun removeMember(key: String?): Boolean = false | ||
} |
25 changes: 25 additions & 0 deletions
25
packages/engine/src/main/kotlin/elide/runtime/interop/SealedProxyObject.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/* | ||
* Copyright (c) 2024-2025 Elide Technologies, Inc. | ||
* | ||
* Licensed under the MIT license (the "License"); you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at | ||
* | ||
* https://opensource.org/license/mit/ | ||
* | ||
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on | ||
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
* License for the specific language governing permissions and limitations under the License. | ||
*/ | ||
package elide.runtime.interop | ||
|
||
import org.graalvm.polyglot.proxy.ProxyObject | ||
|
||
/** | ||
* ## Sealed Proxy Object | ||
* | ||
* Describes a [ProxyObject] which has a known suite of properties ahead of time. | ||
*/ | ||
public interface SealedProxyObject : InteropProxyObject { | ||
override fun getMemberKeys(): Array<String> | ||
override fun hasMember(key: String): Boolean = key in memberKeys | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+0 Bytes
(100%)
packages/graalvm-js/src/main/resources/META-INF/elide/embedded/runtime/js/js.vfs.tar
Binary file not shown.
Oops, something went wrong.