[dart2wasm] Ensure the field in BoxedBool is non mutable
Change-Id: Idfa251e647f9d0205086d17334103a511366df7a Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/501460 Commit-Queue: Martin Kustermann <kustermann@google.com> Reviewed-by: Slava Egorov <vegorov@google.com>
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
(type $Array<Object?> (array (field (mut (ref null $#Top)))))
|
||||
(type $BoxedBool (sub final $#Top (struct
|
||||
(field $field0 i32)
|
||||
(field $value (mut i32)))))
|
||||
(field $value i32))))
|
||||
(type $BoxedInt (sub final $#Top (struct
|
||||
(field $field0 i32)
|
||||
(field $value i64))))
|
||||
|
||||
@@ -2,14 +2,15 @@
|
||||
// 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.
|
||||
|
||||
import 'dart:_wasm';
|
||||
|
||||
@pragma("wasm:entry-point")
|
||||
final class BoxedBool extends bool {
|
||||
// A boxed bool contains an unboxed bool.
|
||||
@pragma("wasm:entry-point")
|
||||
bool value = false;
|
||||
final WasmI32 value;
|
||||
|
||||
/// Dummy factory to silence error about missing superclass constructor.
|
||||
external factory BoxedBool();
|
||||
@pragma("wasm:entry-point")
|
||||
external BoxedBool();
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
|
||||
Reference in New Issue
Block a user