-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Cherry-pick e4942db to beta
- Loading branch information
Showing
4 changed files
with
47 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// 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. | ||
// | ||
// Verifies that there are no deoptimizing IntConverter instructions | ||
// used when converting Pointer to TypedData. | ||
// Regression test for https://github.com/flutter/flutter/issues/97301. | ||
|
||
import "dart:ffi"; | ||
import "package:ffi/ffi.dart"; | ||
|
||
@pragma("vm:never-inline") | ||
Pointer<Uint32> foo() => calloc(4); | ||
|
||
main() { | ||
final Pointer<Uint32> offsetsPtr = foo(); | ||
|
||
for (var i = 0; i < 2; i++) { | ||
print(offsetsPtr.asTypedList(1)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// 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. | ||
// | ||
// Verifies that there are no deoptimizing IntConverter instructions | ||
// used when converting Pointer to TypedData. | ||
// Regression test for https://github.com/flutter/flutter/issues/97301. | ||
|
||
// @dart = 2.9 | ||
|
||
import "dart:ffi"; | ||
import "package:ffi/ffi.dart"; | ||
|
||
@pragma("vm:never-inline") | ||
Pointer<Uint32> foo() => calloc(4); | ||
|
||
main() { | ||
final Pointer<Uint32> offsetsPtr = foo(); | ||
|
||
for (var i = 0; i < 2; i++) { | ||
print(offsetsPtr.asTypedList(1)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,4 +28,4 @@ MAJOR 2 | |
MINOR 17 | ||
PATCH 0 | ||
PRERELEASE 69 | ||
PRERELEASE_PATCH 1 | ||
PRERELEASE_PATCH 2 |