[VM] Remove support for --no-sound-null-safety mode

This CL removes support for --no-sound-null-safety option, the VM will
only run sound null safety code.

First part of deleting support for legacy and unsound null safe code.

TEST=CI

Change-Id: I9dbed10a18ef102533d6af516ff5075297d17b74
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/357183
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
This commit is contained in:
asiva
2024-04-05 19:38:12 +00:00
committed by Commit Queue
parent 6e11b5dd40
commit 8e2acda7d6
31 changed files with 107 additions and 422 deletions
+1 -35
View File
@@ -3812,41 +3812,7 @@ DART_EXPORT void Dart_SetDartLibrarySourcesKernel(
const intptr_t platform_kernel_size);
/**
* Detect the null safety opt-in status.
*
* When running from source, it is based on the opt-in status of `script_uri`.
* When running from a kernel buffer, it is based on the mode used when
* generating `kernel_buffer`.
* When running from an appJIT or AOT snapshot, it is based on the mode used
* when generating `snapshot_data`.
*
* \param script_uri Uri of the script that contains the source code
*
* \param package_config Uri of the package configuration file (either in format
* of .packages or .dart_tool/package_config.json) for the null safety
* detection to resolve package imports against. If this parameter is not
* passed the package resolution of the parent isolate should be used.
*
* \param original_working_directory current working directory when the VM
* process was launched, this is used to correctly resolve the path specified
* for package_config.
*
* \param snapshot_data Buffer containing the snapshot data of the
* isolate or NULL if no snapshot is provided. If provided, the buffers must
* remain valid until the isolate shuts down.
*
* \param snapshot_instructions Buffer containing the snapshot instructions of
* the isolate or NULL if no snapshot is provided. If provided, the buffers
* must remain valid until the isolate shuts down.
*
* \param kernel_buffer A buffer which contains a kernel/DIL program. Must
* remain valid until isolate shutdown.
*
* \param kernel_buffer_size The size of `kernel_buffer`.
*
* \return Returns true if the null safety is opted in by the input being
* run `script_uri`, `snapshot_data` or `kernel_buffer`.
*
* Always return true as the VM only supports strong null safety.
*/
DART_EXPORT bool Dart_DetectNullSafety(const char* script_uri,
const char* package_config,