File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
linker/shared/src/main/scala/org/scalajs/linker/backend/wasmemitter Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -102,13 +102,13 @@ const scalaJSHelpers = {
102
102
bF: (x) => x,
103
103
bD: (x) => x,
104
104
105
- // Unboxes (downcast, null is converted to the zero of the type)
106
- uZ: (x) => x | 0,
107
- uB: (x) => (x << 24) >> 24 ,
108
- uS: (x) => (x << 16) >> 16 ,
109
- uI: (x) => x | 0 ,
110
- uF: (x) => Math.fround(x) ,
111
- uD: (x) => + x,
105
+ // Unboxes (downcast, null is converted to the zero of the type as part of ToWebAssemblyValue )
106
+ uZ: (x) => x, // ToInt32 turns false into 0 and true into 1, so this is also an identity
107
+ uB: (x) => x ,
108
+ uS: (x) => x ,
109
+ uI: (x) => x,
110
+ uF: (x) => x ,
111
+ uD: (x) => x,
112
112
113
113
// Type tests
114
114
tZ: (x) => typeof x === 'boolean',
You can’t perform that action at this time.
0 commit comments