Skip to content

Webidl support #22

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

Closed
wants to merge 3 commits into from
Closed

Webidl support #22

wants to merge 3 commits into from

Conversation

j-f1
Copy link
Member

@j-f1 j-f1 commented Aug 2, 2020

Progress on #21. Currently broken and I might start over

It seems like the 2 most important changes are:

  • instanceof support (which is implemented hackily but is ultimiately necessary for properly type checking things)
    • I kinda want to re-implement this in a way that actually lets you provide the class object instead of pulling it off window.
  • JSValue encoding/decoding to seamlessly pass in and return Swift values

Unrelated changes:

  • instead of having type + 3 payload slots per object, have just type + two slots and interpret them as a combined double or two 32-bit ints depending on the type
    • this would cut down memory usage a bunch although I don‘t think it would really be a significant problem for a while
  • instead of passing around kind, payload1, payload2, payload3, pass around a DataView into the memory object, offset to the right location
    • this makes it easier to pass around blobs of memory I guess, but not sure what the perf implications are

mjburghard and others added 3 commits June 7, 2020 16:08
- Switched to passing a RawJSValue pointers.
- Added _instance_of function.
- Added _copy_typed_array_content function.
- Switched to using DataView to write memory.
- Switched to using Double instead of Int32 in JSValue.
@kateinoigakukun
Copy link
Member

@j-f1 Awesome progress! If you break this big change down into several small PRs, it would make it easy to review for me 🙏

@j-f1
Copy link
Member Author

j-f1 commented Aug 2, 2020

Will do! Closing in favor of #24 and future PRs

@j-f1 j-f1 closed this Aug 2, 2020
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