blob: 468f03e6eaef71a4d7ac2f74a5deb2970b0f982c [file] [log] [blame]
// 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.
// Test various optimizations and deoptimizations of optimizing compiler..
// VMOptions=--no-background-compilation --optimization-counter-threshold=1000
// @dart = 2.9
import "package:expect/expect.dart";
@pragma('vm:never-inline')
testuint32(y) {
int x = y;
if (x != null) {
return x & 0xffff;
}
}
main() {
var s = 0;
testuint32(0x7fffffff);
for (int i = 0; i < 10000; ++i) {
testuint32(i);
}
Expect.equals(65535, testuint32(0x7fffffff));
Expect.equals(65535, testuint32(0x7f3452435245ffff));
}