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

Implement InterpreterProxy #175

Merged
merged 164 commits into from
Feb 9, 2024
Merged

Implement InterpreterProxy #175

merged 164 commits into from
Feb 9, 2024

Conversation

MariusDoe
Copy link
Contributor

@MariusDoe MariusDoe commented Dec 21, 2023

InterpreterProxy for TruffleSqueak

This is the first step towards a working InterpreterProxy for trufflesqueak.

This PR is part of the project InterpreterProxy for TruffleSqueak in the Reverse Engineering lecture (WT 2023/24) at HPI.

Try it

Watch the demo

screencast.mp4

Note: Manually copying plugins from OsVM is no longer needed since a6be20b

  1. get Opensmalltalk-VM
  2. copy a supported plugin like SqueakSSL.so from ..Squeak/bin/ to ..trufflesqueak/languages/smalltalk/lib/
  3. Try the plugins
SqueakSSLTest run: #testFaceBookAPI.
UUIDPrimitivesTest run: #testCreation.

Additions

Description Files
Add native-side InterpreterProxy and headers InterpreterProxy.c, include/, CMakeLists.txt
Add node to handle ffi calls to external plugins PrimExternalCallNode.java
InterpreterProxy method and state implementation InterpreterProxy.java
Utility for marshalling closures and interfacing with NFI NFIUtils.java
Wrappers for native array types NativeObjectStorage.java, ByteStorage.java,
IntStorage.java, LongStorage.java,
ShortStorage.java, PostPrimitiveCleanup.java

Modifications

Description Files
Add sources of interpreter proxy to build chain mx_trufflesqueak.py, suite.py
Adjust checkstyle to allow for suppressed warnings for
field that cannot be made local
.checkstyle_checks.xml
Add helper for uncached execute of new object node SqueakObjectNewNode.java
Hook named primitive lookup to create new external call node PrimitiveNodeFactory.java
Create helper function to get garbage collection count for alle beans MiscUtils.java
Add helpers for allocation of primitive array types UnsafeUtils.java

Coverage of Interpreter Proxy methods (As of: 09.02.2024)

  • Methods implemented: 70/136
  • 10 Plugins covered: ClipboardExtendedPlugin, DropPlugin, FileDialogPlugin, InternetConfigPlugin, LocalePlugin, MIDIPlugin, SHA256Plugin, SecurityPlugin, SqueakSSL, UUIDPlugin

methods and plugins covered

DieKautz and others added 30 commits November 5, 2023 22:10
* Add numReceiverAndArguments to InterpreterProxy
* Turn InterpreterProxy into a singleton with mutable members
  frame and numReceiverAndArguments
* objectRegistry is now effectively static, so all primitive
  invocations share an oop namespace
* Implement most InterpreterProxy stubs required for SqueakSSL.so
@fniephaus fniephaus force-pushed the wip/interpreter-proxy branch from 381e07c to 692a26c Compare February 9, 2024 14:30
@fniephaus fniephaus merged commit 7b87b46 into dev Feb 9, 2024
16 of 17 checks passed
@fniephaus fniephaus deleted the wip/interpreter-proxy branch February 9, 2024 21:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants