03fd5927a4
dart2wasm imports strings as globals for which JavaScript engines would provide the respective values. The standalone target needs to support all WebAssembly runtimes, so it can't rely on this mechanism. Instead, this imports functions to convert a WebAssembly arrays of char codes or ASCII bytes into a string. For now, these functions have to return JS strings since the rest of the SDK relies on that. In the future, embedders would be able to return any string implementation as an externref. Because calling host functions is invalid in constant contexts, string constants can't be regular globals. For now, this uses the default non-eager constant implementation with one initialization function per string constant. Eventually, we should probably initialize these strings in a WASM start function instead. TEST=pkg/dart2wasm/test/standalone_test.dart Change-Id: I93b7c3846fbe99daa8ffa31e452f62672b61ce4b Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/495020 Reviewed-by: Nate Biggs <natebiggs@google.com> Reviewed-by: Martin Kustermann <kustermann@google.com> Commit-Queue: Nate Biggs <natebiggs@google.com>
18 lines
983 B
Plaintext
18 lines
983 B
Plaintext
# Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
|
|
# for details. All rights reserved. Use of this source code is governed by a
|
|
# BSD-style license that can be found in the LICENSE file.
|
|
# Sections in this file should contain "$compiler == dart2wasm".
|
|
|
|
[ $compiler == dart2wasm ]
|
|
inference_update_2/why_not_promoted_external_error_test: SkipByDesign # Non-JS-interop external members are not supported
|
|
number/separators_test: SkipByDesign # Wasm has real integers.
|
|
number/web_int_literals_test: SkipByDesign # Wasm has real integers.
|
|
vm/*: SkipByDesign # Tests for the VM.
|
|
|
|
[ $compiler == dart2wasm && $runtime == d8 ]
|
|
import/conditional_import_string_test: Skip # Timeout does not work with async module loading.
|
|
import/conditional_import_test: Skip # Timeout does not work with async module loading.
|
|
|
|
[ $compiler == dart2wasm && $dart2wasm_standalone ]
|
|
deferred/regression_22995_test: SkipByDesign # Standalone does not support --enable-deferred-loading.
|