webassembly/proxy_js: Create a special "undefined" type for Python.

This adds a new undefined singleton to Python, that corresponds directly to
JavaScript `undefined`.  It's accessible via `js.undefined`.

Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
Damien George
2024-05-14 21:56:36 +10:00
parent 0148bbb495
commit aa2e3880c1
8 changed files with 35 additions and 10 deletions

View File

@@ -1,5 +1,5 @@
1
2
(<JsProxy 6>, 'Error', 'test')
(<JsProxy 7>, 'Error', 'test')
3
true Error test

View File

@@ -1,5 +1,5 @@
1
<JsProxy 1>
<JsProxy 2>
1
1
PyProxy { _ref: 3 }

View File

@@ -1,6 +1,6 @@
1
<JsProxy 1>
<JsProxy 2>
<JsProxy 3>
false
1
true

View File

@@ -1,2 +1,2 @@
<JsProxy 1>
<JsProxy 2>
2

View File

@@ -1,17 +1,17 @@
= TEST 1 ==========
1
<JsProxy 1>
<JsProxy 2>
py 1
<JsProxy 4>
<JsProxy 5>
py 2
2
resolved 123
3
= TEST 2 ==========
1
<JsProxy 5>
<JsProxy 6>
py 1
<JsProxy 8>
<JsProxy 9>
py 2
2
setTimeout resolved