dart-sdk/pkg
Daco Harkes c1467ab5d3 [vm/ffi] Change asFunction and lookFunction to extension methods
This prevents them from being called dynamically.
Moreover, it prevents asFunction from being called on a non-NativeFunction type argument, simplifying the amount of manual checks.

Note that this CL had to change the CFE and analzyer, and their tests (including mock_sdk) as well.

This can potentially be a breaking change, as the extension methods are only visible when `dart:ffi` is imported, while methods on objects are always visible.

Issue: https://github.com/dart-lang/sdk/issues/35903

Change-Id: I1e291f154228d5d9a34b21a022088bf493f6557d
Cq-Include-Trybots: luci.dart.try:vm-ffi-android-debug-arm-try,vm-ffi-android-debug-arm64-try,app-kernel-linux-debug-x64-try,vm-kernel-linux-debug-ia32-try,vm-kernel-win-debug-x64-try,vm-kernel-win-debug-ia32-try,vm-kernel-precomp-linux-debug-x64-try,vm-dartkb-linux-release-x64-abi-try,vm-kernel-precomp-android-release-arm64-try,vm-kernel-asan-linux-release-x64-try,vm-kernel-linux-release-simarm-try,vm-kernel-linux-release-simarm64-try,vm-kernel-precomp-android-release-arm_x64-try,vm-kernel-precomp-obfuscate-linux-release-x64-try,dart-sdk-linux-try,analyzer-analysis-server-linux-try,analyzer-linux-release-try,front-end-linux-release-x64-try,vm-kernel-precomp-win-release-x64-try,vm-kernel-mac-debug-x64-try,analyzer-nnbd-linux-release-try,dart2js-nnbd-linux-x64-chrome-try,ddc-nnbd-linux-release-chrome-try,front-end-nnbd-linux-release-x64-try,vm-kernel-nnbd-linux-debug-x64-try,vm-kernel-nnbd-linux-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135463
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-02-14 15:46:37 +00:00
..
_fe_analyzer_shared [dart2js] Normalize DartTypes. 2020-02-14 01:59:12 +00:00
_js_interop_checks Add the first Kernel check for invalid JS interop 2020-01-28 22:39:10 +00:00
analysis_server tests for missing getter/setter available suggestions 2020-02-13 22:46:39 +00:00
analysis_server_client Update generators to not produce type annotations for variable declarations 2020-01-25 16:31:15 +00:00
analysis_tool [analyzer] enable implicit-casts: false for several projects 2019-08-13 16:26:41 +00:00
analyzer [vm/ffi] Change asFunction and lookFunction to extension methods 2020-02-14 15:46:37 +00:00
analyzer_cli Support for --default-language-version flag in analyzer_cli. 2020-02-11 23:38:35 +00:00
analyzer_fe_comparison [CFE] Fix crash caused by name clash of loadLibrary tearoff method 2019-12-06 09:29:19 +00:00
analyzer_plugin Stop using 'factory something() => null;' in most cases. 2020-02-12 22:58:57 +00:00
async_helper Migrate lib_2/async to NNBD. 2020-01-09 22:04:37 +00:00
build_integration
compiler [dart2js] Add normalization to RTI. 2020-02-14 01:59:12 +00:00
dart2js_tools Use source-maps in test runner to expand JavaScript stack traces. 2020-01-24 20:00:13 +00:00
dart2native [vm] Refactor debug info handling code into a new package. 2020-01-23 10:14:17 +00:00
dart_internal Widen the SDK constraint on dart_internal to include 2.7.0. 2019-12-06 00:54:30 +00:00
dartdev The initial dartdev pub * command - pass on all arguments from the 'dartdev pub *' invocation directly to 'pub *'. 2020-02-13 20:43:38 +00:00
dartfix Convert dartfix to use underscores rather than hyphens for fix names 2020-01-26 22:56:36 +00:00
dev_compiler [dart2js] Migrate js patch file to NNBD. 2020-02-14 00:03:27 +00:00
diagnostic
expect [test] Update copied mirrors tests for Dart 3. 2020-01-23 18:09:37 +00:00
front_end [CFE] Use package config v2 2020-02-12 10:07:25 +00:00
frontend_server Fix expression compiler tests on windows 2020-02-12 16:20:27 +00:00
js Fix pub.dev URLs throughout SDK repo 2019-11-20 11:30:48 +00:00
js_ast [dart2js] Defer ground type recipes until assembly 2019-10-11 20:12:06 +00:00
kernel [CFE] Add support looking up extension members to LibraryIndex 2020-02-14 15:46:37 +00:00
meta typos 2020-01-02 23:09:17 +00:00
modular_test [dartdevc] Cleanup all temporary nnbd modular tests 2019-12-18 00:43:44 +00:00
native_stack_traces [pkg/native_stack_traces] Find instruction sections via dynamic symbols. 2020-02-07 11:34:59 +00:00
nnbd_migration Migration: test to make sure exact nullability isn't applied too much. 2020-02-13 20:23:18 +00:00
smith Revert "[vm] AOT blobs snapshots are obsolete. Remove dead code." 2020-02-14 06:40:31 +00:00
sourcemap_testing Move ID testing infrastructure into _fe_analyzer_shared. 2019-11-01 12:39:00 +00:00
status_file [vm] DBC is obsolete. Remove dead code. 2019-10-27 18:18:29 +00:00
telemetry [analyzer] send additional data to crash reporting 2019-11-27 00:16:50 +00:00
test_runner Revert "[vm] AOT blobs snapshots are obsolete. Remove dead code." 2020-02-14 06:40:31 +00:00
testing [CFE] Messages test doesn't allow status updates for spelling tests 2020-01-24 10:15:26 +00:00
vm [vm/ffi] Change asFunction and lookFunction to extension methods 2020-02-14 15:46:37 +00:00
vm_service Reland "[ VM / Service ] Added getClientName, setClientName and requireResumeApproval RPCs" 2020-02-05 18:14:39 +00:00
.gitignore [analyzer] update the pkg/.gitignore file to ignore the pkg/analysis_server/language_model/ dir 2019-07-26 21:28:51 +00:00
BUILD.gn
pkg.status [dartdev] add a dartdev 'create' command 2020-02-02 02:23:13 +00:00