Skip to content

Commit 003d943

Browse files
mkustermannCommit Queue
authored andcommitted
[dart2wasm] Temporarily make opaqueTrue a runtime decision
Issue #62113 Change-Id: Ib15328f935c63c28e8f5911ef9a035821eaf6685 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/475620 Reviewed-by: Nate Biggs <natebiggs@google.com> Commit-Queue: Martin Kustermann <kustermann@google.com>
1 parent 11059a9 commit 003d943

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

pkg/dart2js_runtime_metrics/lib/_opaque_bool_other.dart

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,12 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5+
// TODO(http://dartbug.com/62113): Remove this runtime decision once we can make
6+
// this a compile-time constant but still retain protobuf messages & fields.
7+
final _true = int.parse('1') == 1;
8+
59
/// See [_opaque_bool_dart2js.dart].
6-
bool get opaqueTrue => true;
10+
bool get opaqueTrue => _true;
711

812
/// See [_opaque_bool_dart2js.dart].
9-
bool get opaqueFalse => false;
13+
bool get opaqueFalse => !_true;

0 commit comments

Comments
 (0)