[dart2wasm] Emit code for assert initializers.

Change-Id: I0eb69de0027e51c7b821c2da045fe91d65ab4dc4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/278091
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Jackson Gardner <jacksongardner@google.com>
This commit is contained in:
Jackson Gardner 2023-01-05 00:23:40 +00:00 committed by Commit Queue
parent 3b1fbb9cd8
commit 4970f7fa82
3 changed files with 7 additions and 2 deletions

View file

@ -701,7 +701,9 @@ class CodeGenerator extends ExpressionVisitor1<w.ValueType, w.ValueType>
void visitInvalidInitializer(InvalidInitializer node) {}
@override
void visitAssertInitializer(AssertInitializer node) {}
void visitAssertInitializer(AssertInitializer node) {
visitStatement(node.statement);
}
@override
void visitLocalInitializer(LocalInitializer node) {

View file

@ -1,9 +1,9 @@
// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// VMOptions=--enable-asserts
// dart2jsOptions=--enable-asserts
// dart2wasmOptions=--enable-asserts
// Dart test program testing assert statements.

View file

@ -1,6 +1,9 @@
// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// VMOptions=--enable-asserts
// dart2jsOptions=--enable-asserts
// dart2wasmOptions=--enable-asserts
// @dart = 2.9