mirror of
https://github.com/dart-lang/sdk
synced 2024-10-14 16:59:47 +00:00
[dart2wasm] Remove rednudant ref.as_non_null
s
With 3c4d4ad
we use non-nullable Wasm field types for non-nullable Dart
fields, so the `ref.as_non_null`s for getting async completer from a
async suspend state can be dropped.
Change-Id: I7857d9996f3415c42b83e4b8961f629e0dd070a7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/345180
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
Auto-Submit: Ömer Ağacan <omersa@google.com>
This commit is contained in:
parent
5cb4351c76
commit
9ebe37f55c
|
@ -774,8 +774,6 @@ class AsyncCodeGenerator extends CodeGenerator {
|
|||
b.local_get(suspendStateLocal);
|
||||
b.struct_get(
|
||||
asyncSuspendStateInfo.struct, FieldIndex.asyncSuspendStateCompleter);
|
||||
// Non-null Dart field represented as nullable Wasm field.
|
||||
b.ref_as_non_null();
|
||||
b.ref_null(translator.topInfo.struct);
|
||||
call(translator.completerComplete.reference);
|
||||
b.return_();
|
||||
|
@ -790,7 +788,6 @@ class AsyncCodeGenerator extends CodeGenerator {
|
|||
b.local_get(suspendStateLocal);
|
||||
b.struct_get(
|
||||
asyncSuspendStateInfo.struct, FieldIndex.asyncSuspendStateCompleter);
|
||||
b.ref_as_non_null();
|
||||
b.local_get(exceptionLocal);
|
||||
b.local_get(stackTraceLocal);
|
||||
call(translator.completerCompleteError.reference);
|
||||
|
@ -1205,8 +1202,6 @@ class AsyncCodeGenerator extends CodeGenerator {
|
|||
b.local_get(suspendStateLocal);
|
||||
b.struct_get(
|
||||
asyncSuspendStateInfo.struct, FieldIndex.asyncSuspendStateCompleter);
|
||||
// Non-null Dart field represented as nullable Wasm field.
|
||||
b.ref_as_non_null();
|
||||
b.local_get(suspendStateLocal);
|
||||
b.struct_get(asyncSuspendStateInfo.struct,
|
||||
FieldIndex.asyncSuspendStateCurrentReturnValue);
|
||||
|
@ -1264,8 +1259,6 @@ class AsyncCodeGenerator extends CodeGenerator {
|
|||
b.local_get(suspendStateLocal);
|
||||
b.struct_get(
|
||||
asyncSuspendStateInfo.struct, FieldIndex.asyncSuspendStateCompleter);
|
||||
// Non-null Dart field represented as nullable Wasm field.
|
||||
b.ref_as_non_null();
|
||||
}
|
||||
|
||||
final value = node.expression;
|
||||
|
|
Loading…
Reference in a new issue