Merged
Conversation
We convert py List to js Array and back. Type List supports a strict subset of type Array, not an intersection. So when we go py to js we convert List to true Array, and when we go the other way we drop all of Array that is not supported by List
registration into VM basic operations
operators and methods implemented, JSArrayProxyType introduced
zollqir
requested changes
Dec 13, 2023
zollqir
requested changes
Dec 20, 2023
Collaborator
zollqir
left a comment
There was a problem hiding this comment.
One comment to address regarding handling private slots.
In addition, we should replace all instances of _PyNumber_Index with PyNumber_Index. It looks like they changed the behaviour of PyNumber_Index in 3.10 to only return exactly type int rather than potentially returning a subtype, and made _PyNumber_Index to have the old behaviour. The difference shouldn't matter for us in this case as far as I can tell. This should fix the compilation failed CI in 3.8 & 3.9.
test_slice_assign_wrong_type() looks to be failing in python 3.12 on line 913: a[2:4] = 6, specifically on JSArrayProxy.cc:187 Py_SIZE(b), where b is a PyLong_Type being cast to a PyListObject
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
JS Arrays now behave like Python Lists when in a Python context.
closes #150
closes #110