Skip to content

Commit 4cec4fd

Browse files
dcharkescommit-bot@chromium.org
authored andcommitted
[vm/ffi] Mark Struct as entrypoint
Required so that we can access its slots in the compiler. Issue: #36730 Change-Id: Ib14aa73f5cb6b713c682693f95841773b1b4e5d9 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141121 Reviewed-by: Aske Simon Christensen <[email protected]> Commit-Queue: Daco Harkes <[email protected]>
1 parent 137aeeb commit 4cec4fd

File tree

6 files changed

+32
-2
lines changed

6 files changed

+32
-2
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// Copyright (c) 2020, 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+
// @dart = 2.6
6+
7+
// All imports must be in all FFI patch files to not depend on the order
8+
// the patches are applied.
9+
import "dart:_internal" show patch;
10+
import 'dart:typed_data';
11+
import 'dart:isolate';
12+
13+
@pragma("vm:entry-point")
14+
abstract class Struct extends NativeType {}

sdk/lib/libraries.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,8 @@
8787
"patches": [
8888
"_internal/vm/lib/ffi_patch.dart",
8989
"_internal/vm/lib/ffi_dynamic_library_patch.dart",
90-
"_internal/vm/lib/ffi_native_type_patch.dart"
90+
"_internal/vm/lib/ffi_native_type_patch.dart",
91+
"_internal/vm/lib/ffi_struct_patch.dart"
9192
]
9293
},
9394
"wasm": {

sdk/lib/libraries.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ vm:
9393
- "_internal/vm/lib/ffi_patch.dart"
9494
- "_internal/vm/lib/ffi_dynamic_library_patch.dart"
9595
- "_internal/vm/lib/ffi_native_type_patch.dart"
96+
- "_internal/vm/lib/ffi_struct_patch.dart"
9697

9798
wasm:
9899
uri: "wasm/wasm.dart"
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// Copyright (c) 2020, 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+
// All imports must be in all FFI patch files to not depend on the order
6+
// the patches are applied.
7+
import "dart:_internal" show patch;
8+
import 'dart:typed_data';
9+
import 'dart:isolate';
10+
11+
@pragma("vm:entry-point")
12+
abstract class Struct extends NativeType {}

sdk_nnbd/lib/libraries.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,8 @@
8787
"patches": [
8888
"_internal/vm/lib/ffi_patch.dart",
8989
"_internal/vm/lib/ffi_dynamic_library_patch.dart",
90-
"_internal/vm/lib/ffi_native_type_patch.dart"
90+
"_internal/vm/lib/ffi_native_type_patch.dart",
91+
"_internal/vm/lib/ffi_struct_patch.dart"
9192
]
9293
},
9394
"wasm": {

sdk_nnbd/lib/libraries.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ vm:
9393
- "_internal/vm/lib/ffi_patch.dart"
9494
- "_internal/vm/lib/ffi_dynamic_library_patch.dart"
9595
- "_internal/vm/lib/ffi_native_type_patch.dart"
96+
- "_internal/vm/lib/ffi_struct_patch.dart"
9697

9798
wasm:
9899
uri: "wasm/wasm.dart"

0 commit comments

Comments
 (0)