656ff46efd
The dart2wasm compiler can use three different SDK platforms depending on compiler options: The default one, a JS compatibility target and a standalone target. Code for these platforms used to be in `_internal/` subdirectories, but parts of `_internal/wasm/lib` were also used by the other targets. To make it clearer which patches/internal libraries belong to which target, this restructures `_internal/wasm` as follows: Files only relevant for one target are in `js`, `js_compatibility` and `standalone`. Files used by all targets are in `common`, files used in the default and the JS compatibility target are in `js_common`. TEST=Refactor, covered by existing tests Change-Id: I2c63c04a5fd5ca88cd640889aa295bd1fb8cfc95 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/505441 Reviewed-by: Slava Egorov <vegorov@google.com> Reviewed-by: Martin Kustermann <kustermann@google.com> Commit-Queue: Martin Kustermann <kustermann@google.com> SLSA-Policy-Verified: SLSA Policy Verification Service <devtools-gerritcodereview-exitgate@google.com>
27 lines
749 B
Dart
27 lines
749 B
Dart
// Copyright (c) 2022, 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.
|
|
|
|
import 'dart:_wasm';
|
|
|
|
@pragma("wasm:entry-point")
|
|
final class BoxedBool extends bool {
|
|
@pragma("wasm:entry-point")
|
|
final WasmI32 value;
|
|
|
|
@pragma("wasm:entry-point")
|
|
external BoxedBool();
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return other is bool
|
|
? this ==
|
|
other // Intrinsic ==
|
|
: false;
|
|
}
|
|
|
|
bool operator &(bool other) => this & other; // Intrinsic &
|
|
bool operator ^(bool other) => this ^ other; // Intrinsic ^
|
|
bool operator |(bool other) => this | other; // Intrinsic |
|
|
}
|