File tree Expand file tree Collapse file tree 5 files changed +55
-3
lines changed
runtime/vm/compiler/frontend Expand file tree Collapse file tree 5 files changed +55
-3
lines changed Original file line number Diff line number Diff line change 1- ## 2.16.0
1+ ## 2.16.1 - 2022-02-09
2+
3+ This is a patch release that fixes an AOT precompiler crash when building some
4+ Flutter apps (issue [ flutter/flutter #97301 ] [ ] ).
5+
6+ [ flutter/flutter#97301 ] : https://github.com/flutter/flutter/issues/97301
7+
8+ ## 2.16.0 - 2022-02-03
29
310### Core libraries
411
Original file line number Diff line number Diff line change @@ -1585,7 +1585,8 @@ FlowGraph* FlowGraphBuilder::BuildGraphOfRecognizedMethod(
15851585 // Initialize the result's data pointer field.
15861586 body += LoadLocal (typed_data_object);
15871587 body += LoadLocal (arg_pointer);
1588- body += LoadNativeField (Slot::Pointer_data_field ());
1588+ body += LoadUntagged (compiler::target::Pointer::data_field_offset ());
1589+ body += ConvertUntaggedToUnboxed (kUnboxedIntPtr );
15891590 body += StoreNativeField (Slot::TypedDataBase_data_field (),
15901591 StoreInstanceFieldInstr::Kind::kInitializing ,
15911592 kNoStoreBarrier );
Original file line number Diff line number Diff line change 1+ // Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
2+ // for details. All rights reserved. Use of this source code is governed by a
3+ // BSD-style license that can be found in the LICENSE file.
4+ //
5+ // Verifies that there are no deoptimizing IntConverter instructions
6+ // used when converting Pointer to TypedData.
7+ // Regression test for https://github.com/flutter/flutter/issues/97301.
8+
9+ import "dart:ffi" ;
10+ import "package:ffi/ffi.dart" ;
11+
12+ @pragma ("vm:never-inline" )
13+ Pointer <Uint32 > foo () => calloc (4 );
14+
15+ main () {
16+ final Pointer <Uint32 > offsetsPtr = foo ();
17+
18+ for (var i = 0 ; i < 2 ; i++ ) {
19+ print (offsetsPtr.asTypedList (1 ));
20+ }
21+ }
Original file line number Diff line number Diff line change 1+ // Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
2+ // for details. All rights reserved. Use of this source code is governed by a
3+ // BSD-style license that can be found in the LICENSE file.
4+ //
5+ // Verifies that there are no deoptimizing IntConverter instructions
6+ // used when converting Pointer to TypedData.
7+ // Regression test for https://github.com/flutter/flutter/issues/97301.
8+
9+ // @dart = 2.9
10+
11+ import "dart:ffi" ;
12+ import "package:ffi/ffi.dart" ;
13+
14+ @pragma ("vm:never-inline" )
15+ Pointer <Uint32 > foo () => calloc (4 );
16+
17+ main () {
18+ final Pointer <Uint32 > offsetsPtr = foo ();
19+
20+ for (var i = 0 ; i < 2 ; i++ ) {
21+ print (offsetsPtr.asTypedList (1 ));
22+ }
23+ }
Original file line number Diff line number Diff line change 2626CHANNEL stable
2727MAJOR 2
2828MINOR 16
29- PATCH 0
29+ PATCH 1
3030PRERELEASE 0
3131PRERELEASE_PATCH 0
You can’t perform that action at this time.
0 commit comments