Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@
but `false` on Windows. Use `FileSystemEntity.typeSync()` instead to get
portable behavior.

#### `dart:js_interop`

- Added a constructor to `JSSymbol`, as well as `JSSymbol.key`,
`JSSymbol.description`, and static methods for all well-known ECMAScript
symbols.

#### `dart:js_util`

- dart2wasm no longer supports `dart:js_util`. Any code that imports
Expand Down
28 changes: 14 additions & 14 deletions pkg/dart2wasm/test/ir_tests/interop.bool.wat
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
(module $module0
(type $#Top (struct
(field $field0 i32)))
(func $"dart2wasm._149 (import)" (import "dart2wasm" "_149") (param externref) (result i32))
(func $"dart2wasm._150 (import)" (import "dart2wasm" "_150") (param i32) (result externref))
(func $"dart2wasm._274 (import)" (import "dart2wasm" "_274") (param externref) (result externref))
(func $"dart2wasm._275 (import)" (import "dart2wasm" "_275") (param externref) (result externref))
(func $"dart2wasm._167 (import)" (import "dart2wasm" "_167") (param externref) (result i32))
(func $"dart2wasm._168 (import)" (import "dart2wasm" "_168") (param i32) (result externref))
(func $"dart2wasm._292 (import)" (import "dart2wasm" "_292") (param externref) (result externref))
(func $"dart2wasm._293 (import)" (import "dart2wasm" "_293") (param externref) (result externref))
(global $"C2 false" (ref $#Top) <...>)
(global $"C40 true" (ref $#Top) <...>)
(global $"boolValueNullable initialized" (mut i32) <...>)
Expand All @@ -17,23 +17,23 @@
(func $"testBoolConstant <noInline>"
(local $var0 externref)
i32.const 1
call $"dart2wasm._150 (import)"
call $"dart2wasm._274 (import)"
call $"dart2wasm._168 (import)"
call $"dart2wasm._292 (import)"
local.tee $var0
call $isDartNull
if (result i32)
call $"_throwArgumentNullError <noInline>"
unreachable
else
local.get $var0
call $"dart2wasm._149 (import)"
call $"dart2wasm._167 (import)"
end
call $"sinkBool <noInline>"
)
(func $"testBoolConstantNullable <noInline>"
(local $var0 externref)
ref.null noextern
call $"dart2wasm._275 (import)"
call $"dart2wasm._293 (import)"
local.tee $var0
call $isDartNull
if (result (ref null $#Top))
Expand All @@ -42,24 +42,24 @@
global.get $"C40 true"
global.get $"C2 false"
local.get $var0
call $"dart2wasm._149 (import)"
call $"dart2wasm._167 (import)"
select (ref $#Top)
end
call $"sinkBoolNullable <noInline>"
)
(func $"testBoolValue <noInline>"
(local $var0 externref)
call $"boolValue implicit getter"
call $"dart2wasm._150 (import)"
call $"dart2wasm._274 (import)"
call $"dart2wasm._168 (import)"
call $"dart2wasm._292 (import)"
local.tee $var0
call $isDartNull
if (result i32)
call $"_throwArgumentNullError <noInline>"
unreachable
else
local.get $var0
call $"dart2wasm._149 (import)"
call $"dart2wasm._167 (import)"
end
call $"sinkBool <noInline>"
)
Expand Down Expand Up @@ -91,7 +91,7 @@
local.get $var0
call $jsifyRaw
end
call $"dart2wasm._275 (import)"
call $"dart2wasm._293 (import)"
local.tee $var1
call $isDartNull
if (result (ref null $#Top))
Expand All @@ -100,7 +100,7 @@
global.get $"C40 true"
global.get $"C2 false"
local.get $var1
call $"dart2wasm._149 (import)"
call $"dart2wasm._167 (import)"
select (ref $#Top)
end
call $"sinkBoolNullable <noInline>"
Expand Down
26 changes: 13 additions & 13 deletions pkg/dart2wasm/test/ir_tests/interop.double.wat
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
(type $_Type (sub $#Top (struct
(field $field0 i32)
(field $isDeclaredNullable i32))))
(func $"dart2wasm._147 (import)" (import "dart2wasm" "_147") (param externref) (result f64))
(func $"dart2wasm._148 (import)" (import "dart2wasm" "_148") (param f64) (result externref))
(func $"dart2wasm._274 (import)" (import "dart2wasm" "_274") (param f64) (result externref))
(func $"dart2wasm._275 (import)" (import "dart2wasm" "_275") (param externref) (result externref))
(func $"dart2wasm._165 (import)" (import "dart2wasm" "_165") (param externref) (result f64))
(func $"dart2wasm._166 (import)" (import "dart2wasm" "_166") (param f64) (result externref))
(func $"dart2wasm._292 (import)" (import "dart2wasm" "_292") (param f64) (result externref))
(func $"dart2wasm._293 (import)" (import "dart2wasm" "_293") (param externref) (result externref))
(global $"C319 _TopType" (ref $_TopType) <...>)
(global $"C66 WasmArray<WasmArray<_Type>>[729]" (ref $Array<WasmArray<_Type>>) <...>)
(global $"doubleValueNullable initialized" (mut i32) <...>)
Expand All @@ -30,46 +30,46 @@
(func $"testDoubleConstant <noInline>"
(local $var0 externref)
f64.const 1.1
call $"dart2wasm._274 (import)"
call $"dart2wasm._292 (import)"
local.tee $var0
call $isDartNull
if (result f64)
call $"_throwArgumentNullError <noInline>"
unreachable
else
local.get $var0
call $"dart2wasm._147 (import)"
call $"dart2wasm._165 (import)"
end
call $"sinkDouble <noInline>"
)
(func $"testDoubleConstantNullable <noInline>"
(local $var0 externref)
ref.null noextern
call $"dart2wasm._275 (import)"
call $"dart2wasm._293 (import)"
local.tee $var0
call $isDartNull
if (result (ref null $BoxedDouble))
ref.null none
else
i32.const 84
local.get $var0
call $"dart2wasm._147 (import)"
call $"dart2wasm._165 (import)"
struct.new $BoxedDouble
end
call $"sinkDoubleNullable <noInline>"
)
(func $"testDoubleValue <noInline>"
(local $var0 externref)
call $"doubleValue implicit getter"
call $"dart2wasm._274 (import)"
call $"dart2wasm._292 (import)"
local.tee $var0
call $isDartNull
if (result f64)
call $"_throwArgumentNullError <noInline>"
unreachable
else
local.get $var0
call $"dart2wasm._147 (import)"
call $"dart2wasm._165 (import)"
end
call $"sinkDouble <noInline>"
)
Expand Down Expand Up @@ -121,7 +121,7 @@
if
local.get $var1
struct.get $BoxedDouble $value
call $"dart2wasm._148 (import)"
call $"dart2wasm._166 (import)"
br $label0
end
local.get $var1
Expand Down Expand Up @@ -177,15 +177,15 @@
unreachable
end $label0
end
call $"dart2wasm._275 (import)"
call $"dart2wasm._293 (import)"
local.tee $var5
call $isDartNull
if (result (ref null $BoxedDouble))
ref.null none
else
i32.const 84
local.get $var5
call $"dart2wasm._147 (import)"
call $"dart2wasm._165 (import)"
struct.new $BoxedDouble
end
call $"sinkDoubleNullable <noInline>"
Expand Down
12 changes: 6 additions & 6 deletions pkg/dart2wasm/test/ir_tests/interop.int.wat
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
(type $BoxedInt (sub final $#Top (struct
(field $field0 i32)
(field $value i64))))
(func $"dart2wasm._274 (import)" (import "dart2wasm" "_274") (param externref) (result externref))
(func $"dart2wasm._275 (import)" (import "dart2wasm" "_275") (param externref) (result externref))
(func $"dart2wasm._292 (import)" (import "dart2wasm" "_292") (param externref) (result externref))
(func $"dart2wasm._293 (import)" (import "dart2wasm" "_293") (param externref) (result externref))
(global $"intValueNullable initialized" (mut i32) <...>)
(global $intValueNullable (mut (ref null $BoxedInt)) <...>)
(func $_throwArgumentNullError <noInline> <...>)
Expand All @@ -17,7 +17,7 @@
(local $var0 externref)
i64.const 1
call $jsifyInt
call $"dart2wasm._274 (import)"
call $"dart2wasm._292 (import)"
local.tee $var0
call $isDartNull
if (result i64)
Expand All @@ -32,7 +32,7 @@
(func $"testIntConstantNullable <noInline>"
(local $var0 externref)
ref.null noextern
call $"dart2wasm._275 (import)"
call $"dart2wasm._293 (import)"
local.tee $var0
call $isDartNull
if (result (ref null $BoxedInt))
Expand All @@ -49,7 +49,7 @@
(local $var0 externref)
call $"intValue implicit getter"
call $jsifyInt
call $"dart2wasm._274 (import)"
call $"dart2wasm._292 (import)"
local.tee $var0
call $isDartNull
if (result i64)
Expand Down Expand Up @@ -88,7 +88,7 @@
local.get $var0
call $jsifyRaw
end
call $"dart2wasm._275 (import)"
call $"dart2wasm._293 (import)"
local.tee $var1
call $isDartNull
if (result (ref null $BoxedInt))
Expand Down
30 changes: 15 additions & 15 deletions pkg/dart2wasm/test/ir_tests/interop.num.wat
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
(type $_Type (sub $#Top (struct
(field $field0 i32)
(field $isDeclaredNullable i32))))
(func $"dart2wasm._147 (import)" (import "dart2wasm" "_147") (param externref) (result f64))
(func $"dart2wasm._148 (import)" (import "dart2wasm" "_148") (param f64) (result externref))
(func $"dart2wasm._274 (import)" (import "dart2wasm" "_274") (param externref) (result externref))
(func $"dart2wasm._275 (import)" (import "dart2wasm" "_275") (param externref) (result externref))
(func $"dart2wasm._165 (import)" (import "dart2wasm" "_165") (param externref) (result f64))
(func $"dart2wasm._166 (import)" (import "dart2wasm" "_166") (param f64) (result externref))
(func $"dart2wasm._292 (import)" (import "dart2wasm" "_292") (param externref) (result externref))
(func $"dart2wasm._293 (import)" (import "dart2wasm" "_293") (param externref) (result externref))
(table $dtable0 745 funcref)
(global $"C319 _TopType" (ref $_TopType) <...>)
(global $"C66 WasmArray<WasmArray<_Type>>[729]" (ref $Array<WasmArray<_Type>>) <...>)
Expand All @@ -33,46 +33,46 @@
(local $var0 externref)
i64.const 1
call $jsifyInt
call $"dart2wasm._274 (import)"
call $"dart2wasm._292 (import)"
local.tee $var0
call $isDartNull
if (result f64)
call $"_throwArgumentNullError <noInline>"
unreachable
else
local.get $var0
call $"dart2wasm._147 (import)"
call $"dart2wasm._165 (import)"
end
call $"sinkNum <noInline>"
)
(func $"testNumConstantDouble <noInline>"
(local $var0 externref)
f64.const 1.1
call $"dart2wasm._148 (import)"
call $"dart2wasm._274 (import)"
call $"dart2wasm._166 (import)"
call $"dart2wasm._292 (import)"
local.tee $var0
call $isDartNull
if (result f64)
call $"_throwArgumentNullError <noInline>"
unreachable
else
local.get $var0
call $"dart2wasm._147 (import)"
call $"dart2wasm._165 (import)"
end
call $"sinkNum <noInline>"
)
(func $"testNumConstantNullable <noInline>"
(local $var0 externref)
ref.null noextern
call $"dart2wasm._275 (import)"
call $"dart2wasm._293 (import)"
local.tee $var0
call $isDartNull
if (result (ref null $BoxedDouble))
ref.null none
else
i32.const 84
local.get $var0
call $"dart2wasm._147 (import)"
call $"dart2wasm._165 (import)"
struct.new $BoxedDouble
end
call $"sinkNumNullable <noInline>"
Expand All @@ -81,15 +81,15 @@
(local $var0 externref)
call $"numValue implicit getter"
call $jsifyNum
call $"dart2wasm._274 (import)"
call $"dart2wasm._292 (import)"
local.tee $var0
call $isDartNull
if (result f64)
call $"_throwArgumentNullError <noInline>"
unreachable
else
local.get $var0
call $"dart2wasm._147 (import)"
call $"dart2wasm._165 (import)"
end
call $"sinkNum <noInline>"
)
Expand Down Expand Up @@ -253,15 +253,15 @@
ref.null noextern
end $label0
end
call $"dart2wasm._275 (import)"
call $"dart2wasm._293 (import)"
local.tee $var5
call $isDartNull
if (result (ref null $BoxedDouble))
ref.null none
else
i32.const 84
local.get $var5
call $"dart2wasm._147 (import)"
call $"dart2wasm._165 (import)"
struct.new $BoxedDouble
end
call $"sinkNumNullable <noInline>"
Expand Down
12 changes: 6 additions & 6 deletions pkg/dart2wasm/test/ir_tests/interop.string.wat
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
(type $JSStringImpl (sub final $#Top (struct
(field $field0 i32)
(field $_ref externref))))
(func $"dart2wasm._274 (import)" (import "dart2wasm" "_274") (param externref) (result externref))
(func $"dart2wasm._275 (import)" (import "dart2wasm" "_275") (param externref) (result externref))
(func $"dart2wasm._292 (import)" (import "dart2wasm" "_292") (param externref) (result externref))
(func $"dart2wasm._293 (import)" (import "dart2wasm" "_293") (param externref) (result externref))
(global $.a (import "" "a") (ref extern))
(global $"stringValueNullable initialized" (mut i32) <...>)
(global $stringValueNullable (mut (ref null $JSStringImpl)) <...>)
Expand All @@ -18,7 +18,7 @@
(func $"testStringConstant <noInline>"
(local $var0 externref)
global.get $.a
call $"dart2wasm._274 (import)"
call $"dart2wasm._292 (import)"
local.tee $var0
call $isDartNull
if (result (ref $JSStringImpl))
Expand All @@ -33,7 +33,7 @@
(func $"testStringConstantNullable <noInline>"
(local $var0 externref)
ref.null noextern
call $"dart2wasm._275 (import)"
call $"dart2wasm._293 (import)"
local.tee $var0
call $isDartNull
if (result (ref null $JSStringImpl))
Expand All @@ -48,7 +48,7 @@
(local $var0 externref)
call $"stringValue implicit getter"
struct.get $JSStringImpl $_ref
call $"dart2wasm._274 (import)"
call $"dart2wasm._292 (import)"
local.tee $var0
call $isDartNull
if (result (ref $JSStringImpl))
Expand Down Expand Up @@ -85,7 +85,7 @@
local.get $var0
call $jsifyRaw
end
call $"dart2wasm._275 (import)"
call $"dart2wasm._293 (import)"
local.tee $var1
call $isDartNull
if (result (ref null $JSStringImpl))
Expand Down
Loading