-
Notifications
You must be signed in to change notification settings - Fork 40
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
Philippe/fix/176 #186
Philippe/fix/176 #186
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
JS Arrays now behave like Python Lists when in a Python context.
closes #150
closes #110