mirror of
https://github.com/dart-lang/sdk
synced 2024-09-16 00:09:49 +00:00
76e41bc4c5
TEST=ci Bug: https://github.com/dart-lang/sdk/issues/45525 Change-Id: I048a90eade678f610f0fd4451b099711a1faa957 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193750 Reviewed-by: Liam Appelbe <liama@google.com> Commit-Queue: Ryan Macnak <rmacnak@google.com>
27 lines
598 B
Dart
27 lines
598 B
Dart
// Copyright (c) 2021, 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=--optimization-counter-threshold=10 --no-background-compilation
|
|
|
|
import "package:expect/expect.dart";
|
|
|
|
dynamic a() {
|
|
return 23;
|
|
}
|
|
|
|
dynamic b() {
|
|
return 26;
|
|
}
|
|
|
|
@pragma("vm:never-inline")
|
|
dynamic foo() {
|
|
// BinarySmiOp(<<) marked truncating
|
|
return (a() << b()) & 0xFFFFFFF;
|
|
}
|
|
|
|
main() {
|
|
for (var i = 0; i < 20; i++) {
|
|
Expect.equals(201326592, foo());
|
|
}
|
|
}
|