dart-sdk/pkg/vm
Clement Skau 0cd81027f4 Set correct fileUri on FfiNative fields.
`currentLibrary.fileUri` points to the library file (e.g. ui.dart)
and not the class-containing `part` file (e.g. compositing.dart).
This causes `fileOffset` out-of-bounds and `location` to fail.

Failing stack trace:
Unhandled exception: Crash when compiling null, at character offset null:
RangeError (offset): Invalid value: Not in inclusive range 0..1257: 1543
#0      RangeError.checkValueInInterval (dart:core/errors.dart:282:7)
#1      Source.getLocation (package:kernel/ast.dart:13919:16)
#2      Component.getLocation (package:kernel/ast.dart:13692:31)
#3      _getLocationInComponent (package:kernel/ast.dart:14212:22)
#4      Field._getLocationInEnclosingFile (package:kernel/ast.dart:2363:12)
#5      TreeNode._getLocationInEnclosingFile (package:kernel/ast.dart:206:20)
#6      TreeNode.location (package:kernel/ast.dart:202:12)
#7      _FfiUseSiteTransformer._ensureNativeTypeToDartType (package:vm/transformations/ffi_use_sites.dart:744:35)
[...]

TEST=Existing.
Change-Id: I17b3ab23abcb04aca046509e7cdbb177ed156e54
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/217186
Commit-Queue: Clement Skau <cskau@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2021-10-19 13:09:46 +00:00
..
bin [vm/infra] Nascent AOT IL tests infrastructure. 2021-09-30 13:19:42 +00:00
lib Set correct fileUri on FfiNative fields. 2021-10-19 13:09:46 +00:00
test [cfe/ffi] Move FFI transforms into folder 2021-10-19 07:25:09 +00:00
testcases/transformations [vm/ffi] Adds FFI transform FfiNative instance methods. 2021-10-12 10:58:44 +00:00
tool [vm/infra] Nascent AOT IL tests infrastructure. 2021-09-30 13:19:42 +00:00
analysis_options.yaml Revert "[cfe/vm] Enable prefer_final lints in pkg/vm" 2019-09-25 08:23:20 +00:00
LICENSE Update LICENSE 2021-04-07 10:28:38 +00:00
pubspec.yaml Revert "Remove explicit bool type hack." 2021-09-08 14:07:25 +00:00
README.md

This package hosts VM specific Dart code and helper scripts.