Version 2.14.0-154.0.dev
Merge commit '95566976810e82abd3fb189a67d306602b9b93c9' into 'dev'
diff --git a/pkg/analysis_server/lib/src/analysis_server_abstract.dart b/pkg/analysis_server/lib/src/analysis_server_abstract.dart
index b884c5f..b890a41 100644
--- a/pkg/analysis_server/lib/src/analysis_server_abstract.dart
+++ b/pkg/analysis_server/lib/src/analysis_server_abstract.dart
@@ -40,6 +40,7 @@
import 'package:analyzer/src/dart/analysis/driver.dart' as analysis;
import 'package:analyzer/src/dart/analysis/file_byte_store.dart'
show EvictingFileByteStore;
+import 'package:analyzer/src/dart/analysis/file_content_cache.dart';
import 'package:analyzer/src/dart/analysis/performance_logger.dart';
import 'package:analyzer/src/dart/ast/element_locator.dart';
import 'package:analyzer/src/dart/ast/utilities.dart';
@@ -79,6 +80,7 @@
late final SearchEngine searchEngine;
late ByteStore byteStore;
+ late FileContentCache fileContentCache;
late analysis.AnalysisDriverScheduler analysisDriverScheduler;
@@ -181,6 +183,7 @@
this.analysisPerformanceLogger = PerformanceLog(sink);
byteStore = createByteStore(resourceProvider);
+ fileContentCache = FileContentCache(resourceProvider);
analysisDriverScheduler = analysis.AnalysisDriverScheduler(
analysisPerformanceLogger,
@@ -198,6 +201,7 @@
resourceProvider,
sdkManager,
byteStore,
+ fileContentCache,
analysisPerformanceLogger,
analysisDriverScheduler,
instrumentationService,
diff --git a/pkg/analysis_server/lib/src/context_manager.dart b/pkg/analysis_server/lib/src/context_manager.dart
index 7292d9a..83249b9 100644
--- a/pkg/analysis_server/lib/src/context_manager.dart
+++ b/pkg/analysis_server/lib/src/context_manager.dart
@@ -14,6 +14,7 @@
import 'package:analyzer/src/dart/analysis/byte_store.dart';
import 'package:analyzer/src/dart/analysis/driver.dart';
import 'package:analyzer/src/dart/analysis/driver_based_analysis_context.dart';
+import 'package:analyzer/src/dart/analysis/file_content_cache.dart';
import 'package:analyzer/src/dart/analysis/performance_logger.dart';
import 'package:analyzer/src/generated/java_engine.dart';
import 'package:analyzer/src/generated/sdk.dart';
@@ -138,6 +139,9 @@
/// The storage for cached results.
final ByteStore _byteStore;
+ /// The cache of file contents shared between context of the collection.
+ final FileContentCache _fileContentCache;
+
/// The logger used to create analysis contexts.
final PerformanceLog _performanceLog;
@@ -196,8 +200,14 @@
/// clean up when we destroy a context.
final bazelWatchedPathsPerFolder = <Folder, _BazelWatchedFiles>{};
- ContextManagerImpl(this.resourceProvider, this.sdkManager, this._byteStore,
- this._performanceLog, this._scheduler, this._instrumentationService,
+ ContextManagerImpl(
+ this.resourceProvider,
+ this.sdkManager,
+ this._byteStore,
+ this._fileContentCache,
+ this._performanceLog,
+ this._scheduler,
+ this._instrumentationService,
{required enableBazelWatcher})
: pathContext = resourceProvider.pathContext {
if (enableBazelWatcher) {
@@ -406,6 +416,7 @@
resourceProvider: resourceProvider,
scheduler: _scheduler,
sdkPath: sdkManager.defaultSdkDirectory,
+ fileContentCache: _fileContentCache,
);
for (var analysisContext in collection.contexts) {
diff --git a/pkg/analysis_server/test/src/services/completion/dart/completion_test.dart b/pkg/analysis_server/test/src/services/completion/dart/completion_test.dart
index f1a747c..03aca89 100644
--- a/pkg/analysis_server/test/src/services/completion/dart/completion_test.dart
+++ b/pkg/analysis_server/test/src/services/completion/dart/completion_test.dart
@@ -9,6 +9,7 @@
void main() {
defineReflectiveSuite(() {
+ defineReflectiveTests(ArgumentListCompletionTest);
defineReflectiveTests(ConstructorCompletionTest);
defineReflectiveTests(ExtensionCompletionTest);
defineReflectiveTests(PropertyAccessorCompletionTest);
@@ -16,6 +17,25 @@
}
@reflectiveTest
+class ArgumentListCompletionTest extends CompletionTestCase {
+ Future<void> test_functionWithVoidReturnType() async {
+ addTestFile('''
+void f(C c) {
+ c.m(^);
+}
+
+void g() {}
+
+class C {
+ void m(void Function() handler) {}
+}
+''');
+ await getSuggestions();
+ assertHasCompletion('g');
+ }
+}
+
+@reflectiveTest
class ConstructorCompletionTest extends CompletionTestCase {
Future<void> test_constructor_abstract() async {
addTestFile('''
diff --git a/pkg/analyzer/CHANGELOG.md b/pkg/analyzer/CHANGELOG.md
index 2bf63ff..2dd64a6 100644
--- a/pkg/analyzer/CHANGELOG.md
+++ b/pkg/analyzer/CHANGELOG.md
@@ -1,3 +1,11 @@
+## 1.8.0-dev
+* Added `StringInterpolation.firstString` and `lastString`, to express
+ explicitly that there are always (possibly empty) strings as the first
+ and the last elements of an interpolation.
+
+## 1.7.0
+* Require `meta: ^1.4.0`.
+
## 1.6.0
* Deprecated `AnalysisDriver` default constructor. Added `tmp1`. The goal
is to allow deprecating and removing unused parameters.
diff --git a/pkg/analyzer/lib/dart/ast/ast.dart b/pkg/analyzer/lib/dart/ast/ast.dart
index aafc82f..e415663 100644
--- a/pkg/analyzer/lib/dart/ast/ast.dart
+++ b/pkg/analyzer/lib/dart/ast/ast.dart
@@ -5152,7 +5152,18 @@
/// Clients may not extend, implement or mix-in this class.
abstract class StringInterpolation implements SingleStringLiteral {
/// Return the elements that will be composed to produce the resulting string.
+ /// The list includes [firstString] and [lastString].
NodeList<InterpolationElement> get elements;
+
+ /// Return the first element in this interpolation, which is always a string.
+ /// The string might be empty if there is no text before the first
+ /// interpolation expression (such as in `'$foo bar'`).
+ InterpolationString get firstString;
+
+ /// Return the last element in this interpolation, which is always a string.
+ /// The string might be empty if there is no text after the last
+ /// interpolation expression (such as in `'foo $bar'`).
+ InterpolationString get lastString;
}
/// A string literal expression.
diff --git a/pkg/analyzer/lib/dart/sdk/build_sdk_summary.dart b/pkg/analyzer/lib/dart/sdk/build_sdk_summary.dart
index c54627b..f1b3c13 100644
--- a/pkg/analyzer/lib/dart/sdk/build_sdk_summary.dart
+++ b/pkg/analyzer/lib/dart/sdk/build_sdk_summary.dart
@@ -116,7 +116,6 @@
);
}
return bundleBuilder.finish(
- astBytes: linkResult.astBytes,
resolutionBytes: linkResult.resolutionBytes,
sdk: PackageBundleSdk(
languageVersionMajor: languageVersion.major,
diff --git a/pkg/analyzer/lib/src/context/builder.dart b/pkg/analyzer/lib/src/context/builder.dart
index 5a65513..30ffcc7 100644
--- a/pkg/analyzer/lib/src/context/builder.dart
+++ b/pkg/analyzer/lib/src/context/builder.dart
@@ -13,6 +13,7 @@
import 'package:analyzer/src/dart/analysis/byte_store.dart';
import 'package:analyzer/src/dart/analysis/driver.dart'
show AnalysisDriver, AnalysisDriverScheduler;
+import 'package:analyzer/src/dart/analysis/file_content_cache.dart';
import 'package:analyzer/src/dart/analysis/performance_logger.dart';
import 'package:analyzer/src/dart/sdk/sdk.dart';
import 'package:analyzer/src/generated/engine.dart';
@@ -89,8 +90,12 @@
/// Return an analysis driver that is configured correctly to analyze code in
/// the directory with the given [path].
- AnalysisDriver buildDriver(ContextRoot contextRoot, Workspace workspace,
- {void Function(AnalysisOptionsImpl)? updateAnalysisOptions}) {
+ AnalysisDriver buildDriver(
+ ContextRoot contextRoot,
+ Workspace workspace, {
+ void Function(AnalysisOptionsImpl)? updateAnalysisOptions,
+ FileContentCache? fileContentCache,
+ }) {
String path = contextRoot.root;
var options = getAnalysisOptions(path, workspace, contextRoot: contextRoot);
@@ -124,6 +129,7 @@
enableIndex: enableIndex,
externalSummaries: summaryData,
retainDataForTesting: retainDataForTesting,
+ fileContentCache: fileContentCache,
);
declareVariablesInDriver(driver);
diff --git a/pkg/analyzer/lib/src/dart/analysis/analysis_context_collection.dart b/pkg/analyzer/lib/src/dart/analysis/analysis_context_collection.dart
index a2f9ed7..2335ded 100644
--- a/pkg/analyzer/lib/src/dart/analysis/analysis_context_collection.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/analysis_context_collection.dart
@@ -11,6 +11,7 @@
import 'package:analyzer/src/dart/analysis/context_builder.dart';
import 'package:analyzer/src/dart/analysis/driver.dart';
import 'package:analyzer/src/dart/analysis/driver_based_analysis_context.dart';
+import 'package:analyzer/src/dart/analysis/file_content_cache.dart';
import 'package:analyzer/src/dart/analysis/performance_logger.dart';
import 'package:analyzer/src/generated/engine.dart' show AnalysisOptionsImpl;
import 'package:cli_util/cli_util.dart';
@@ -39,6 +40,7 @@
bool retainDataForTesting = false,
String? sdkPath,
AnalysisDriverScheduler? scheduler,
+ FileContentCache? fileContentCache,
void Function(AnalysisOptionsImpl)? updateAnalysisOptions,
}) : resourceProvider =
resourceProvider ?? PhysicalResourceProvider.INSTANCE {
@@ -71,6 +73,7 @@
sdkPath: sdkPath,
scheduler: scheduler,
updateAnalysisOptions: updateAnalysisOptions,
+ fileContentCache: fileContentCache,
);
contexts.add(context);
}
diff --git a/pkg/analyzer/lib/src/dart/analysis/context_builder.dart b/pkg/analyzer/lib/src/dart/analysis/context_builder.dart
index a6313ef..9bec866 100644
--- a/pkg/analyzer/lib/src/dart/analysis/context_builder.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/context_builder.dart
@@ -15,6 +15,7 @@
import 'package:analyzer/src/dart/analysis/driver.dart'
show AnalysisDriver, AnalysisDriverScheduler;
import 'package:analyzer/src/dart/analysis/driver_based_analysis_context.dart';
+import 'package:analyzer/src/dart/analysis/file_content_cache.dart';
import 'package:analyzer/src/dart/analysis/performance_logger.dart'
show PerformanceLog;
import 'package:analyzer/src/generated/engine.dart' show AnalysisOptionsImpl;
@@ -47,6 +48,7 @@
String? sdkPath,
String? sdkSummaryPath,
void Function(AnalysisOptionsImpl)? updateAnalysisOptions,
+ FileContentCache? fileContentCache,
}) {
// TODO(scheglov) Remove this, and make `sdkPath` required.
sdkPath ??= getSdkPath();
@@ -91,6 +93,7 @@
AnalysisDriver driver = builder.buildDriver(
oldContextRoot,
contextRoot.workspace,
+ fileContentCache: fileContentCache,
updateAnalysisOptions: updateAnalysisOptions,
);
diff --git a/pkg/analyzer/lib/src/dart/analysis/driver.dart b/pkg/analyzer/lib/src/dart/analysis/driver.dart
index 774b215..5291a9c 100644
--- a/pkg/analyzer/lib/src/dart/analysis/driver.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/driver.dart
@@ -19,6 +19,7 @@
import 'package:analyzer/src/context/packages.dart';
import 'package:analyzer/src/dart/analysis/byte_store.dart';
import 'package:analyzer/src/dart/analysis/feature_set_provider.dart';
+import 'package:analyzer/src/dart/analysis/file_content_cache.dart';
import 'package:analyzer/src/dart/analysis/file_state.dart';
import 'package:analyzer/src/dart/analysis/file_tracker.dart';
import 'package:analyzer/src/dart/analysis/index.dart';
@@ -80,7 +81,7 @@
/// TODO(scheglov) Clean up the list of implicitly analyzed files.
class AnalysisDriver implements AnalysisDriverGeneric {
/// The version of data format, should be incremented on every format change.
- static const int DATA_VERSION = 140;
+ static const int DATA_VERSION = 141;
/// The length of the list returned by [_computeDeclaredVariablesSignature].
static const int _declaredVariablesSignatureLength = 4;
@@ -111,7 +112,7 @@
/// This [ContentCache] is consulted for a file content before reading
/// the content from the file.
- final FileContentOverlay? _contentOverlay;
+ final FileContentCache _fileContentCache;
/// The analysis options to analyze with.
AnalysisOptionsImpl _analysisOptions;
@@ -302,13 +303,15 @@
required SourceFactory sourceFactory,
required AnalysisOptionsImpl analysisOptions,
required Packages packages,
+ FileContentCache? fileContentCache,
bool enableIndex = false,
SummaryDataStore? externalSummaries,
bool retainDataForTesting = false,
}) : _scheduler = scheduler,
_resourceProvider = resourceProvider,
_byteStore = byteStore,
- _contentOverlay = FileContentOverlay(),
+ _fileContentCache =
+ fileContentCache ?? FileContentCache.ephemeral(resourceProvider),
_analysisOptions = analysisOptions,
enableIndex = enableIndex,
_logger = logger,
@@ -1806,7 +1809,6 @@
_fsState = FileSystemState(
_logger,
_byteStore,
- _contentOverlay,
_resourceProvider,
name,
sourceFactory,
@@ -1817,6 +1819,7 @@
_saltForElements,
featureSetProvider,
externalSummaries: _externalSummaries,
+ fileContentCache: _fileContentCache,
);
_fileTracker = FileTracker(_logger, _fsState, _changeHook);
}
diff --git a/pkg/analyzer/lib/src/dart/analysis/file_content_cache.dart b/pkg/analyzer/lib/src/dart/analysis/file_content_cache.dart
new file mode 100644
index 0000000..4e1e989
--- /dev/null
+++ b/pkg/analyzer/lib/src/dart/analysis/file_content_cache.dart
@@ -0,0 +1,105 @@
+// Copyright (c) 2021, 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.
+
+import 'dart:convert';
+import 'dart:typed_data';
+
+import 'package:analyzer/file_system/file_system.dart';
+import 'package:convert/convert.dart';
+import 'package:crypto/crypto.dart';
+
+/// Information about the content of a file.
+class FileContent {
+ final String path;
+ final bool exists;
+ final String content;
+ final String contentHash;
+
+ FileContent._(this.path, this.exists, this.content, this.contentHash);
+}
+
+/// The cache of information about content of files.
+abstract class FileContentCache {
+ final ResourceProvider _resourceProvider;
+
+ factory FileContentCache(ResourceProvider resourceProvider) {
+ return _FileContentCacheImpl(resourceProvider);
+ }
+
+ factory FileContentCache.ephemeral(ResourceProvider resourceProvider) {
+ return _FileContentCacheEphemeral(resourceProvider);
+ }
+
+ FileContentCache._(this._resourceProvider);
+
+ /// Return the content of the file with the given [path].
+ FileContent get(String path);
+
+ /// Discard the cache value for the file with the given [path].
+ void invalidate(String path) {}
+
+ void invalidateAll() {}
+
+ FileContent _read(String path) {
+ List<int> contentBytes;
+ String content;
+ bool exists;
+ try {
+ contentBytes = _resourceProvider.getFile(path).readAsBytesSync();
+ content = utf8.decode(contentBytes);
+ exists = true;
+ } catch (_) {
+ contentBytes = Uint8List(0);
+ content = '';
+ exists = false;
+ }
+
+ List<int> contentHashBytes = md5.convert(contentBytes).bytes;
+ String contentHash = hex.encode(contentHashBytes);
+
+ return FileContent._(path, exists, content, contentHash);
+ }
+}
+
+/// [FileContentCache] that caches never.
+class _FileContentCacheEphemeral extends FileContentCache {
+ _FileContentCacheEphemeral(ResourceProvider resourceProvider)
+ : super._(resourceProvider);
+
+ @override
+ FileContent get(String path) {
+ return _read(path);
+ }
+}
+
+/// [FileContentCache] that caches forever.
+class _FileContentCacheImpl extends FileContentCache {
+ final Map<String, FileContent> _pathToFile = {};
+
+ _FileContentCacheImpl(ResourceProvider resourceProvider)
+ : super._(resourceProvider);
+
+ @override
+ FileContent get(String path) {
+ var file = _pathToFile[path];
+
+ if (file != null) {
+ return file;
+ }
+
+ file = _read(path);
+ _pathToFile[path] = file;
+ return file;
+ }
+
+ @override
+ void invalidate(String path) {
+ _pathToFile.remove(path);
+ }
+
+ @override
+ void invalidateAll() {
+ _pathToFile.clear();
+ }
+}
diff --git a/pkg/analyzer/lib/src/dart/analysis/file_state.dart b/pkg/analyzer/lib/src/dart/analysis/file_state.dart
index e05a519..99f4c26 100644
--- a/pkg/analyzer/lib/src/dart/analysis/file_state.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/file_state.dart
@@ -2,7 +2,6 @@
// 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.
-import 'dart:convert';
import 'dart:typed_data';
import 'package:_fe_analyzer_shared/src/scanner/token_impl.dart'
@@ -17,6 +16,7 @@
import 'package:analyzer/src/dart/analysis/byte_store.dart';
import 'package:analyzer/src/dart/analysis/defined_names.dart';
import 'package:analyzer/src/dart/analysis/feature_set_provider.dart';
+import 'package:analyzer/src/dart/analysis/file_content_cache.dart';
import 'package:analyzer/src/dart/analysis/library_graph.dart';
import 'package:analyzer/src/dart/analysis/performance_logger.dart';
import 'package:analyzer/src/dart/analysis/referenced_names.dart';
@@ -38,7 +38,6 @@
import 'package:analyzer/src/workspace/workspace.dart';
import 'package:collection/collection.dart';
import 'package:convert/convert.dart';
-import 'package:crypto/crypto.dart';
import 'package:meta/meta.dart';
import 'package:pub_semver/pub_semver.dart';
@@ -125,7 +124,7 @@
Set<String>? _referencedNames;
List<int>? _unlinkedSignature;
String? _unlinkedKey;
- String? _astKey;
+ String? _informativeKey;
AnalysisDriverUnlinkedUnit? _driverUnlinkedUnit;
List<int>? _apiSignature;
@@ -376,12 +375,12 @@
return other is FileState && other.uri == uri;
}
- Uint8List getAstBytes({CompilationUnit? unit}) {
- var bytes = _fsState._byteStore.get(_astKey!) as Uint8List?;
+ Uint8List getInformativeBytes({CompilationUnit? unit}) {
+ var bytes = _fsState._byteStore.get(_informativeKey!) as Uint8List?;
if (bytes == null) {
unit ??= parse();
bytes = writeUnitInformative(unit);
- _fsState._byteStore.put(_astKey!, bytes);
+ _fsState._byteStore.put(_informativeKey!, bytes);
}
return bytes;
}
@@ -421,8 +420,12 @@
_invalidateCurrentUnresolvedData();
+ if (!allowCached) {
+ _fsState.markFileForReading(path);
+ }
+
{
- var rawFileState = _fsState._fileContentCache.get(path, allowCached);
+ var rawFileState = _fsState._fileContentCache.get(path);
_content = rawFileState.content;
_exists = rawFileState.exists;
_contentHash = rawFileState.contentHash;
@@ -440,7 +443,7 @@
var signatureHex = hex.encode(_unlinkedSignature!);
_unlinkedKey = '$signatureHex.unlinked2';
// TODO(scheglov) Use the path as the key, and store the signature.
- _astKey = '$signatureHex.ast';
+ _informativeKey = '$signatureHex.ast';
}
// Prepare bytes of the unlinked bundle - existing or new.
@@ -716,7 +719,6 @@
final ResourceProvider _resourceProvider;
final String contextName;
final ByteStore _byteStore;
- final FileContentOverlay? _contentOverlay;
final SourceFactory _sourceFactory;
final Workspace? _workspace;
final DeclaredVariables _declaredVariables;
@@ -767,15 +769,14 @@
int fileStamp = 0;
/// The cache of content of files, possibly shared with other file system
- /// states with the same resource provider and the content overlay.
- late final _FileContentCache _fileContentCache;
+ /// states.
+ final FileContentCache _fileContentCache;
late final FileSystemStateTestView _testView;
FileSystemState(
this._logger,
this._byteStore,
- this._contentOverlay,
this._resourceProvider,
this.contextName,
this._sourceFactory,
@@ -787,11 +788,8 @@
this._saltForElements,
this.featureSetProvider, {
this.externalSummaries,
- }) {
- _fileContentCache = _FileContentCache.getInstance(
- _resourceProvider,
- _contentOverlay,
- );
+ required FileContentCache fileContentCache,
+ }) : _fileContentCache = fileContentCache {
_testView = FileSystemStateTestView(this);
}
@@ -946,7 +944,7 @@
/// The file with the given [path] might have changed, so ensure that it is
/// read the next time it is refreshed.
void markFileForReading(String path) {
- _fileContentCache.remove(path);
+ _fileContentCache.invalidate(path);
}
void readPartsForLibraries() {
@@ -973,7 +971,7 @@
/// will be built.
void resetUriResolution() {
_sourceFactory.clearCache();
- _fileContentCache.clear();
+ _fileContentCache.invalidateAll();
_clearFiles();
}
@@ -1013,99 +1011,3 @@
.toSet();
}
}
-
-/// Information about the content of a file.
-class _FileContent {
- final String path;
- final bool exists;
- final String content;
- final String contentHash;
-
- _FileContent(this.path, this.exists, this.content, this.contentHash);
-}
-
-/// The cache of information about content of files.
-class _FileContentCache {
- /// Weak map of cache instances.
- ///
- /// Outer key is a [FileContentOverlay].
- /// Inner key is a [ResourceProvider].
- static final _instances = Expando<Expando<_FileContentCache>>();
-
- /// Weak map of cache instances.
- ///
- /// Key is a [ResourceProvider].
- static final _instances2 = Expando<_FileContentCache>();
-
- final ResourceProvider _resourceProvider;
- final FileContentOverlay? _contentOverlay;
- final Map<String, _FileContent> _pathToFile = {};
-
- _FileContentCache(this._resourceProvider, this._contentOverlay);
-
- void clear() {
- _pathToFile.clear();
- }
-
- /// Return the content of the file with the given [path].
- ///
- /// If [allowCached] is `true`, and the file is in the cache, return the
- /// cached data. Otherwise read the file, compute and cache the data.
- _FileContent get(String path, bool allowCached) {
- var file = allowCached ? _pathToFile[path] : null;
- if (file == null) {
- List<int> contentBytes;
- String? content;
- bool exists;
- try {
- if (_contentOverlay != null) {
- content = _contentOverlay![path];
- }
- if (content != null) {
- contentBytes = utf8.encode(content);
- } else {
- contentBytes = _resourceProvider.getFile(path).readAsBytesSync();
- content = utf8.decode(contentBytes);
- }
- exists = true;
- } catch (_) {
- contentBytes = Uint8List(0);
- content = '';
- exists = false;
- }
-
- List<int> contentHashBytes = md5.convert(contentBytes).bytes;
- String contentHash = hex.encode(contentHashBytes);
-
- file = _FileContent(path, exists, content, contentHash);
- _pathToFile[path] = file;
- }
- return file;
- }
-
- /// Remove the file with the given [path] from the cache.
- void remove(String path) {
- _pathToFile.remove(path);
- }
-
- static _FileContentCache getInstance(
- ResourceProvider resourceProvider, FileContentOverlay? contentOverlay) {
- Expando<_FileContentCache>? providerToInstance;
- if (contentOverlay != null) {
- providerToInstance = _instances[contentOverlay];
- if (providerToInstance == null) {
- providerToInstance = Expando<_FileContentCache>();
- _instances[contentOverlay] = providerToInstance;
- }
- } else {
- providerToInstance = _instances2;
- }
-
- var instance = providerToInstance[resourceProvider];
- if (instance == null) {
- instance = _FileContentCache(resourceProvider, contentOverlay);
- providerToInstance[resourceProvider] = instance;
- }
- return instance;
- }
-}
diff --git a/pkg/analyzer/lib/src/dart/analysis/library_context.dart b/pkg/analyzer/lib/src/dart/analysis/library_context.dart
index 8fc9a4a..a383d72 100644
--- a/pkg/analyzer/lib/src/dart/analysis/library_context.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/library_context.dart
@@ -112,7 +112,7 @@
var unitsInformativeBytes = <Uri, Uint8List>{};
for (var library in cycle.libraries) {
for (var file in library.libraryFiles) {
- unitsInformativeBytes[file.uri] = file.getAstBytes();
+ unitsInformativeBytes[file.uri] = file.getInformativeBytes();
}
}
diff --git a/pkg/analyzer/lib/src/dart/ast/ast.dart b/pkg/analyzer/lib/src/dart/ast/ast.dart
index e02e41b..ea7e858 100644
--- a/pkg/analyzer/lib/src/dart/ast/ast.dart
+++ b/pkg/analyzer/lib/src/dart/ast/ast.dart
@@ -9167,6 +9167,20 @@
/// Initialize a newly created string interpolation expression.
StringInterpolationImpl(List<InterpolationElement> elements) {
+ // TODO(scheglov) Replace asserts with appropriately typed parameters.
+ assert(elements.length > 2, 'Expected at last three elements.');
+ assert(
+ elements.first is InterpolationStringImpl,
+ 'The first element must be a string.',
+ );
+ assert(
+ elements[1] is InterpolationExpressionImpl,
+ 'The second element must be an expression.',
+ );
+ assert(
+ elements.last is InterpolationStringImpl,
+ 'The last element must be a string.',
+ );
_elements._initialize(this, elements);
}
@@ -9197,6 +9211,10 @@
Token get endToken => _elements.endToken!;
@override
+ InterpolationStringImpl get firstString =>
+ elements.first as InterpolationStringImpl;
+
+ @override
bool get isMultiline => _firstHelper.isMultiline;
@override
@@ -9205,6 +9223,10 @@
@override
bool get isSingleQuoted => _firstHelper.isSingleQuoted;
+ @override
+ InterpolationStringImpl get lastString =>
+ elements.last as InterpolationStringImpl;
+
StringLexemeHelper get _firstHelper {
var lastString = _elements.first as InterpolationString;
String lexeme = lastString.contents.lexeme;
diff --git a/pkg/analyzer/lib/src/summary2/bundle_reader.dart b/pkg/analyzer/lib/src/summary2/bundle_reader.dart
index c210b45..5dcfc27 100644
--- a/pkg/analyzer/lib/src/summary2/bundle_reader.dart
+++ b/pkg/analyzer/lib/src/summary2/bundle_reader.dart
@@ -34,10 +34,8 @@
final Map<String, LibraryReader> libraryMap = {};
- /// TODO(scheglov) Remove [astBytes].
BundleReader({
required LinkedElementFactory elementFactory,
- Uint8List? astBytes, // ignore: avoid_unused_constructor_parameters
required Uint8List resolutionBytes,
Map<Uri, Uint8List> unitsInformativeBytes = const {},
}) : _reader = SummaryDataReader(resolutionBytes),
diff --git a/pkg/analyzer/lib/src/summary2/bundle_writer.dart b/pkg/analyzer/lib/src/summary2/bundle_writer.dart
index 769e3f2..cb038b5 100644
--- a/pkg/analyzer/lib/src/summary2/bundle_writer.dart
+++ b/pkg/analyzer/lib/src/summary2/bundle_writer.dart
@@ -87,7 +87,6 @@
var bytes = _sink.flushAndTake();
return BundleWriterResult(
- astBytes: Uint8List(0),
resolutionBytes: bytes,
);
}
@@ -482,11 +481,9 @@
}
class BundleWriterResult {
- final Uint8List astBytes;
final Uint8List resolutionBytes;
BundleWriterResult({
- required this.astBytes,
required this.resolutionBytes,
});
}
diff --git a/pkg/analyzer/lib/src/summary2/link.dart b/pkg/analyzer/lib/src/summary2/link.dart
index cc67f58..8cb08c7 100644
--- a/pkg/analyzer/lib/src/summary2/link.dart
+++ b/pkg/analyzer/lib/src/summary2/link.dart
@@ -34,7 +34,6 @@
var linker = Linker(elementFactory);
linker.link(inputLibraries);
return LinkResult(
- astBytes: linker.astBytes,
resolutionBytes: linker.resolutionBytes,
);
}
@@ -49,7 +48,6 @@
late InheritanceManager3 inheritance; // TODO(scheglov) cache it
- late Uint8List astBytes;
late Uint8List resolutionBytes;
Linker(this.elementFactory);
@@ -229,7 +227,6 @@
}
var writeWriterResult = bundleWriter.finish();
- astBytes = writeWriterResult.astBytes;
resolutionBytes = writeWriterResult.resolutionBytes;
}
}
@@ -280,11 +277,11 @@
}
class LinkResult {
- final Uint8List astBytes;
+ @Deprecated('This field is not used anymore')
+ final Uint8List astBytes = Uint8List(0);
final Uint8List resolutionBytes;
LinkResult({
- required this.astBytes,
required this.resolutionBytes,
});
}
diff --git a/pkg/analyzer/lib/src/summary2/package_bundle_format.dart b/pkg/analyzer/lib/src/summary2/package_bundle_format.dart
index 6c964cc..f87e585 100644
--- a/pkg/analyzer/lib/src/summary2/package_bundle_format.dart
+++ b/pkg/analyzer/lib/src/summary2/package_bundle_format.dart
@@ -21,7 +21,7 @@
}
Uint8List finish({
- required Uint8List astBytes,
+ @Deprecated('This parameter is not used anymore') Uint8List? astBytes,
required Uint8List resolutionBytes,
PackageBundleSdk? sdk,
}) {
@@ -43,7 +43,6 @@
);
});
- sink.writeUint8List(astBytes);
sink.writeUint8List(resolutionBytes);
return sink.flushAndTake();
@@ -84,13 +83,9 @@
);
}
- reader.readUint8List(); // astBytes
_resolutionBytes = reader.readUint8List();
}
- @Deprecated('The linker does not need it anymore')
- Uint8List get astBytes => Uint8List(0);
-
Uint8List get resolutionBytes => _resolutionBytes;
PackageBundleSdk? get sdk => _sdk;
diff --git a/pkg/analyzer/pubspec.yaml b/pkg/analyzer/pubspec.yaml
index 117c8db..b3cbff8 100644
--- a/pkg/analyzer/pubspec.yaml
+++ b/pkg/analyzer/pubspec.yaml
@@ -1,5 +1,5 @@
name: analyzer
-version: 1.6.0
+version: 1.8.0-dev
description: This package provides a library that performs static analysis of Dart code.
homepage: https://github.com/dart-lang/sdk/tree/master/pkg/analyzer
@@ -13,7 +13,7 @@
convert: ^3.0.0
crypto: ^3.0.0
glob: ^2.0.0
- meta: ^1.3.0
+ meta: ^1.4.0
package_config: ^2.0.0
path: ^1.8.0
pub_semver: ^2.0.0
diff --git a/pkg/analyzer/test/dart/ast/ast_test.dart b/pkg/analyzer/test/dart/ast/ast_test.dart
index e3fd7f5..5fcfbc6 100644
--- a/pkg/analyzer/test/dart/ast/ast_test.dart
+++ b/pkg/analyzer/test/dart/ast/ast_test.dart
@@ -3,6 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
import 'package:analyzer/dart/analysis/features.dart';
+import 'package:analyzer/dart/analysis/utilities.dart';
import 'package:analyzer/dart/ast/ast.dart';
import 'package:analyzer/dart/ast/token.dart';
import 'package:analyzer/src/dart/ast/ast_factory.dart';
@@ -430,171 +431,155 @@
@reflectiveTest
class InterpolationStringTest extends ParserTestCase {
- InterpolationString interpolationString(
- String lexeme, String value, bool isFirst, bool isLast) {
- var node = AstTestFactory.interpolationString(lexeme, value);
- var nodes = <InterpolationElement>[
- if (!isFirst) AstTestFactory.interpolationString("'first", "first"),
- node,
- if (!isLast) AstTestFactory.interpolationString("last'", "last")
- ];
- var parent = AstTestFactory.string(nodes);
- assert(node.parent == parent);
- return node;
- }
+ /// This field is updated in [_parseStringInterpolation].
+ /// It is used in [_assertContentsOffsetEnd].
+ var _baseOffset = 0;
void test_contentsOffset_doubleQuote_first() {
- var node = interpolationString('"foo', "foo", true, true);
- expect(node.contentsOffset, '"'.length);
- expect(node.contentsEnd, '"'.length + "foo".length);
- }
-
- void test_contentsOffset_doubleQuote_firstLast() {
- var node = interpolationString('"foo"', "foo", true, true);
- expect(node.contentsOffset, '"'.length);
- expect(node.contentsEnd, '"'.length + "foo".length);
+ var interpolation = _parseStringInterpolation('"foo\$x last"');
+ var node = interpolation.firstString;
+ _assertContentsOffsetEnd(node, 1, 4);
}
void test_contentsOffset_doubleQuote_last() {
- var node = interpolationString('foo"', "foo", false, true);
- expect(node.contentsOffset, 0);
- expect(node.contentsEnd, "foo".length);
+ var interpolation = _parseStringInterpolation('"first \$x foo"');
+ var node = interpolation.lastString;
+ _assertContentsOffsetEnd(node, 9, 13);
}
void test_contentsOffset_doubleQuote_last_empty() {
- var node = interpolationString('"', "", false, true);
- expect(node.contentsOffset, 0);
- expect(node.contentsEnd, 0);
+ var interpolation = _parseStringInterpolation('"first \$x"');
+ var node = interpolation.lastString;
+ _assertContentsOffsetEnd(node, 9, 9);
}
void test_contentsOffset_doubleQuote_last_unterminated() {
- var node = interpolationString('foo', "foo", false, true);
- expect(node.contentsOffset, 0);
- expect(node.contentsEnd, "foo".length);
+ var interpolation = _parseStringInterpolation('"first \$x foo');
+ var node = interpolation.lastString;
+ _assertContentsOffsetEnd(node, 9, 13);
}
void test_contentsOffset_doubleQuote_multiline_first() {
- var node = interpolationString('"""\nfoo\n', "foo\n", true, true);
- expect(node.contentsOffset, '"""\n'.length);
- expect(node.contentsEnd, '"""\n'.length + "foo\n".length);
- }
-
- void test_contentsOffset_doubleQuote_multiline_firstLast() {
- var node = interpolationString('"""\nfoo\n"""', "foo\n", true, true);
- expect(node.contentsOffset, '"""\n'.length);
- expect(node.contentsEnd, '"""\n'.length + "foo\n".length);
+ var interpolation = _parseStringInterpolation('"""foo\n\$x last"""');
+ var node = interpolation.firstString;
+ _assertContentsOffsetEnd(node, 3, 7);
}
void test_contentsOffset_doubleQuote_multiline_last() {
- var node = interpolationString('foo\n"""', "foo\n", false, true);
- expect(node.contentsOffset, 0);
- expect(node.contentsEnd, "foo\n".length);
+ var interpolation = _parseStringInterpolation('"""first\$x foo\n"""');
+ var node = interpolation.lastString;
+ _assertContentsOffsetEnd(node, 10, 15);
}
void test_contentsOffset_doubleQuote_multiline_last_empty() {
- var node = interpolationString('"""', "", false, true);
- expect(node.contentsOffset, 0);
- expect(node.contentsEnd, 0);
+ var interpolation = _parseStringInterpolation('"""first\$x"""');
+ var node = interpolation.lastString;
+ _assertContentsOffsetEnd(node, 10, 10);
}
void test_contentsOffset_doubleQuote_multiline_last_unterminated() {
- var node = interpolationString('foo\n', "foo\n", false, true);
- expect(node.contentsOffset, 0);
- expect(node.contentsEnd, "foo\n".length);
+ var interpolation = _parseStringInterpolation('"""first\$x foo\n');
+ var node = interpolation.lastString;
+ _assertContentsOffsetEnd(node, 10, 15);
}
void test_contentsOffset_escapeCharacters() {
// Contents offset cannot use 'value' string, because of escape sequences.
- var node = interpolationString(r'"foo\nbar"', "foo\nbar", true, true);
- expect(node.contentsOffset, '"'.length);
- expect(node.contentsEnd, '"'.length + "foo\\nbar".length);
+ var interpolation = _parseStringInterpolation(r'"foo\nbar$x last"');
+ var node = interpolation.firstString;
+ _assertContentsOffsetEnd(node, 1, 9);
}
void test_contentsOffset_middle() {
- var node = interpolationString("foo", "foo", false, false);
- expect(node.contentsOffset, 0);
- expect(node.contentsEnd, "foo".length);
+ var interpolation =
+ _parseStringInterpolation(r'"first $x foo\nbar $y last"');
+ var node = interpolation.elements[2] as InterpolationString;
+ _assertContentsOffsetEnd(node, 9, 19);
}
void test_contentsOffset_middle_quoteBegin() {
- // This occurs in, for instance, `"$a'foo$b"`
- var node = interpolationString("'foo", "'foo", false, false);
- expect(node.contentsOffset, 0);
- expect(node.contentsEnd, "'foo".length);
+ var interpolation = _parseStringInterpolation('"first \$x \'foo\$y last"');
+ var node = interpolation.elements[2] as InterpolationString;
+ _assertContentsOffsetEnd(node, 9, 14);
}
void test_contentsOffset_middle_quoteBeginEnd() {
- // This occurs in, for instance, `"$a'foo'$b"`
- var node = interpolationString("'foo'", "'foo'", false, false);
- expect(node.contentsOffset, 0);
- expect(node.contentsEnd, "'foo'".length);
+ var interpolation =
+ _parseStringInterpolation('"first \$x \'foo\'\$y last"');
+ var node = interpolation.elements[2] as InterpolationString;
+ _assertContentsOffsetEnd(node, 9, 15);
}
void test_contentsOffset_middle_quoteEnd() {
- // This occurs in, for instance, `"${a}foo'$b"`
- var node = interpolationString("foo'", "foo'", false, false);
- expect(node.contentsOffset, 0);
- expect(node.contentsEnd, "foo'".length);
+ var interpolation = _parseStringInterpolation('"first \$x foo\'\$y last"');
+ var node = interpolation.elements[2] as InterpolationString;
+ _assertContentsOffsetEnd(node, 9, 14);
}
void test_contentsOffset_singleQuote_first() {
- var node = interpolationString("'foo", "foo", true, true);
- expect(node.contentsOffset, "'".length);
- expect(node.contentsEnd, "'".length + "foo".length);
- }
-
- void test_contentsOffset_singleQuote_firstLast() {
- var node = interpolationString("'foo'", "foo", true, true);
- expect(node.contentsOffset, "'".length);
- expect(node.contentsEnd, "'".length + "foo".length);
+ var interpolation = _parseStringInterpolation("'foo\$x last'");
+ var node = interpolation.firstString;
+ _assertContentsOffsetEnd(node, 1, 4);
}
void test_contentsOffset_singleQuote_last() {
- var node = interpolationString("foo'", "foo", false, true);
- expect(node.contentsOffset, 0);
- expect(node.contentsEnd, "foo".length);
+ var interpolation = _parseStringInterpolation("'first \$x foo'");
+ var node = interpolation.lastString;
+ _assertContentsOffsetEnd(node, 9, 13);
}
void test_contentsOffset_singleQuote_last_empty() {
- var node = interpolationString("'", "", false, true);
- expect(node.contentsOffset, 0);
- expect(node.contentsEnd, 0);
+ var interpolation = _parseStringInterpolation("'first \$x'");
+ var node = interpolation.lastString;
+ _assertContentsOffsetEnd(node, 9, 9);
}
void test_contentsOffset_singleQuote_last_unterminated() {
- var node = interpolationString("foo", "foo", false, true);
- expect(node.contentsOffset, 0);
- expect(node.contentsEnd, "foo".length);
+ var interpolation = _parseStringInterpolation("'first \$x");
+ var node = interpolation.lastString;
+ _assertContentsOffsetEnd(node, 9, 9);
}
void test_contentsOffset_singleQuote_multiline_first() {
- var node = interpolationString("'''\nfoo\n", "foo\n", true, true);
- expect(node.contentsOffset, "'''\n".length);
- expect(node.contentsEnd, "'''\n".length + "foo\n".length);
- }
-
- void test_contentsOffset_singleQuote_multiline_firstLast() {
- var node = interpolationString("'''\nfoo\n'''", "foo\n", true, true);
- expect(node.contentsOffset, "'''\n".length);
- expect(node.contentsEnd, "'''\n".length + "foo\n".length);
+ var interpolation = _parseStringInterpolation("'''foo\n\$x last'''");
+ var node = interpolation.firstString;
+ _assertContentsOffsetEnd(node, 3, 7);
}
void test_contentsOffset_singleQuote_multiline_last() {
- var node = interpolationString("foo\n'''", "foo\n", false, true);
- expect(node.contentsOffset, 0);
- expect(node.contentsEnd, "foo\n".length);
+ var interpolation = _parseStringInterpolation("'''first\$x foo\n'''");
+ var node = interpolation.lastString;
+ _assertContentsOffsetEnd(node, 10, 15);
}
void test_contentsOffset_singleQuote_multiline_last_empty() {
- var node = interpolationString("'''", "", false, true);
- expect(node.contentsOffset, 0);
- expect(node.contentsEnd, 0);
+ var interpolation = _parseStringInterpolation("'''first\$x'''");
+ var node = interpolation.lastString;
+ _assertContentsOffsetEnd(node, 10, 10);
}
void test_contentsOffset_singleQuote_multiline_last_unterminated() {
- var node = interpolationString("foo\n", "foo\n", false, true);
- expect(node.contentsOffset, 0);
- expect(node.contentsEnd, "foo\n".length);
+ var interpolation = _parseStringInterpolation("'''first\$x'''");
+ var node = interpolation.lastString;
+ _assertContentsOffsetEnd(node, 10, 10);
+ }
+
+ void _assertContentsOffsetEnd(InterpolationString node, int offset, int end) {
+ expect(node.contentsOffset, _baseOffset + offset);
+ expect(node.contentsEnd, _baseOffset + end);
+ }
+
+ StringInterpolation _parseStringInterpolation(String code) {
+ var unitCode = 'var x = ';
+ _baseOffset = unitCode.length;
+ unitCode += code;
+ var unit = parseString(
+ content: unitCode,
+ throwIfDiagnostics: false,
+ ).unit;
+ var declaration = unit.declarations[0] as TopLevelVariableDeclaration;
+ return declaration.variables.variables[0].initializer
+ as StringInterpolation;
}
}
@@ -1587,13 +1572,14 @@
@reflectiveTest
class StringInterpolationTest extends ParserTestCase {
void test_contentsOffsetEnd() {
- AstTestFactory.interpolationExpression(AstTestFactory.identifier3('bb'));
+ var bb = AstTestFactory.interpolationExpression(
+ AstTestFactory.identifier3('bb'));
// 'a${bb}ccc'
{
var ae = AstTestFactory.interpolationString("'a", "a");
var cToken = StringToken(TokenType.STRING, "ccc'", 10);
var cElement = astFactory.interpolationString(cToken, 'ccc');
- StringInterpolation node = AstTestFactory.string([ae, ae, cElement]);
+ StringInterpolation node = AstTestFactory.string([ae, bb, cElement]);
expect(node.contentsOffset, 1);
expect(node.contentsEnd, 10 + 4 - 1);
}
@@ -1602,7 +1588,7 @@
var ae = AstTestFactory.interpolationString("'''a", "a");
var cToken = StringToken(TokenType.STRING, "ccc'''", 10);
var cElement = astFactory.interpolationString(cToken, 'ccc');
- StringInterpolation node = AstTestFactory.string([ae, ae, cElement]);
+ StringInterpolation node = AstTestFactory.string([ae, bb, cElement]);
expect(node.contentsOffset, 3);
expect(node.contentsEnd, 10 + 4 - 1);
}
@@ -1611,7 +1597,7 @@
var ae = AstTestFactory.interpolationString('"""a', "a");
var cToken = StringToken(TokenType.STRING, 'ccc"""', 10);
var cElement = astFactory.interpolationString(cToken, 'ccc');
- StringInterpolation node = AstTestFactory.string([ae, ae, cElement]);
+ StringInterpolation node = AstTestFactory.string([ae, bb, cElement]);
expect(node.contentsOffset, 3);
expect(node.contentsEnd, 10 + 4 - 1);
}
@@ -1620,7 +1606,7 @@
var ae = AstTestFactory.interpolationString("r'a", "a");
var cToken = StringToken(TokenType.STRING, "ccc'", 10);
var cElement = astFactory.interpolationString(cToken, 'ccc');
- StringInterpolation node = AstTestFactory.string([ae, ae, cElement]);
+ StringInterpolation node = AstTestFactory.string([ae, bb, cElement]);
expect(node.contentsOffset, 2);
expect(node.contentsEnd, 10 + 4 - 1);
}
@@ -1629,7 +1615,7 @@
var ae = AstTestFactory.interpolationString("r'''a", "a");
var cToken = StringToken(TokenType.STRING, "ccc'''", 10);
var cElement = astFactory.interpolationString(cToken, 'ccc');
- StringInterpolation node = AstTestFactory.string([ae, ae, cElement]);
+ StringInterpolation node = AstTestFactory.string([ae, bb, cElement]);
expect(node.contentsOffset, 4);
expect(node.contentsEnd, 10 + 4 - 1);
}
@@ -1638,7 +1624,7 @@
var ae = AstTestFactory.interpolationString('r"""a', "a");
var cToken = StringToken(TokenType.STRING, 'ccc"""', 10);
var cElement = astFactory.interpolationString(cToken, 'ccc');
- StringInterpolation node = AstTestFactory.string([ae, ae, cElement]);
+ StringInterpolation node = AstTestFactory.string([ae, bb, cElement]);
expect(node.contentsOffset, 4);
expect(node.contentsEnd, 10 + 4 - 1);
}
@@ -1678,7 +1664,7 @@
}
void test_isRaw() {
- StringInterpolation node = AstTestFactory.string();
+ var node = parseStringLiteral('"first \$x last"') as StringInterpolation;
expect(node.isRaw, isFalse);
}
diff --git a/pkg/analyzer/test/generated/utilities_test.dart b/pkg/analyzer/test/generated/utilities_test.dart
index 57f5ce0..60aba02a 100644
--- a/pkg/analyzer/test/generated/utilities_test.dart
+++ b/pkg/analyzer/test/generated/utilities_test.dart
@@ -3,6 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
import 'package:analyzer/dart/analysis/features.dart';
+import 'package:analyzer/dart/analysis/utilities.dart';
import 'package:analyzer/dart/ast/ast.dart';
import 'package:analyzer/dart/ast/token.dart';
import 'package:analyzer/dart/ast/visitor.dart';
@@ -3356,8 +3357,10 @@
}
void test_stringInterpolation() {
- StringInterpolation node =
- AstTestFactory.string([AstTestFactory.interpolationExpression2("a")]);
+ var unit = parseString(content: 'var v = "first \$x last";').unit;
+ var declaration = unit.declarations[0] as TopLevelVariableDeclaration;
+ var variable = declaration.variables.variables[0];
+ var node = variable.initializer as StringInterpolation;
_assertReplace(
node, ListGetter_NodeReplacerTest_test_stringInterpolation(0));
}
diff --git a/pkg/analyzer/test/src/dart/analysis/file_state_test.dart b/pkg/analyzer/test/src/dart/analysis/file_state_test.dart
index 6e417e6..d307683 100644
--- a/pkg/analyzer/test/src/dart/analysis/file_state_test.dart
+++ b/pkg/analyzer/test/src/dart/analysis/file_state_test.dart
@@ -12,6 +12,7 @@
import 'package:analyzer/src/dart/analysis/byte_store.dart';
import 'package:analyzer/src/dart/analysis/experiments.dart';
import 'package:analyzer/src/dart/analysis/feature_set_provider.dart';
+import 'package:analyzer/src/dart/analysis/file_content_cache.dart';
import 'package:analyzer/src/dart/analysis/file_state.dart';
import 'package:analyzer/src/dart/analysis/library_graph.dart';
import 'package:analyzer/src/dart/analysis/performance_logger.dart';
@@ -83,7 +84,6 @@
fileSystemState = FileSystemState(
logger,
byteStore,
- contentOverlay,
resourceProvider,
'contextName',
sourceFactory,
@@ -93,6 +93,7 @@
Uint32List(0),
Uint32List(0),
featureSetProvider,
+ fileContentCache: FileContentCache.ephemeral(resourceProvider),
);
}
diff --git a/pkg/analyzer/test/src/summary/resynthesize_ast2_test.dart b/pkg/analyzer/test/src/summary/resynthesize_ast2_test.dart
index 57f9f33..758cfc0 100644
--- a/pkg/analyzer/test/src/summary/resynthesize_ast2_test.dart
+++ b/pkg/analyzer/test/src/summary/resynthesize_ast2_test.dart
@@ -81,7 +81,6 @@
var sdkLinkResult = link(elementFactory, inputLibraries, true);
return _sdkBundle = _SdkBundle(
- astBytes: sdkLinkResult.astBytes,
resolutionBytes: sdkLinkResult.resolutionBytes,
);
}
@@ -244,11 +243,9 @@
}
class _SdkBundle {
- final Uint8List astBytes;
final Uint8List resolutionBytes;
_SdkBundle({
- required this.astBytes,
required this.resolutionBytes,
});
}
diff --git a/pkg/analyzer_cli/lib/src/driver.dart b/pkg/analyzer_cli/lib/src/driver.dart
index 851918e..ad49da2 100644
--- a/pkg/analyzer_cli/lib/src/driver.dart
+++ b/pkg/analyzer_cli/lib/src/driver.dart
@@ -13,6 +13,7 @@
import 'package:analyzer/src/dart/analysis/byte_store.dart';
import 'package:analyzer/src/dart/analysis/driver.dart';
import 'package:analyzer/src/dart/analysis/driver_based_analysis_context.dart';
+import 'package:analyzer/src/dart/analysis/file_content_cache.dart';
import 'package:analyzer/src/dart/analysis/file_state.dart';
import 'package:analyzer/src/dart/analysis/results.dart';
import 'package:analyzer/src/generated/engine.dart';
@@ -485,6 +486,7 @@
class _AnalysisContextProvider {
final ResourceProvider _resourceProvider;
+ final FileContentCache _fileContentCache;
CommandLineOptions _commandLineOptions;
List<String> _pathList;
@@ -493,7 +495,8 @@
AnalysisContextCollectionImpl _collection;
DriverBasedAnalysisContext _analysisContext;
- _AnalysisContextProvider(this._resourceProvider);
+ _AnalysisContextProvider(this._resourceProvider)
+ : _fileContentCache = FileContentCache(_resourceProvider);
DriverBasedAnalysisContext get analysisContext {
return _analysisContext;
@@ -550,6 +553,7 @@
resourceProvider: _resourceProvider,
sdkPath: _commandLineOptions.dartSdkPath,
updateAnalysisOptions: _updateAnalysisOptions,
+ fileContentCache: _fileContentCache,
);
_setContextForPath(path);
diff --git a/pkg/analyzer_plugin/lib/src/utilities/completion/optype.dart b/pkg/analyzer_plugin/lib/src/utilities/completion/optype.dart
index 394b784..ef103f2c 100644
--- a/pkg/analyzer_plugin/lib/src/utilities/completion/optype.dart
+++ b/pkg/analyzer_plugin/lib/src/utilities/completion/optype.dart
@@ -308,6 +308,10 @@
}
if (0 <= index && index < parameters.length) {
var param = parameters[index];
+ var paramType = param.type;
+ if (paramType is FunctionType && paramType.returnType.isVoid) {
+ optype.includeVoidReturnSuggestions = true;
+ }
if (param.isNamed == true) {
var context = _argumentListContext(node);
optype.completionLocation = 'ArgumentList_${context}_named';
diff --git a/pkg/front_end/testcases/general/ffi_sample.dart.weak.transformed.expect b/pkg/front_end/testcases/general/ffi_sample.dart.weak.transformed.expect
index ade7adb..043e13c 100644
--- a/pkg/front_end/testcases/general/ffi_sample.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/ffi_sample.dart.weak.transformed.expect
@@ -12,7 +12,7 @@
: super ffi::Struct::_fromTypedDataBase(#typedDataBase)
;
static factory allocate(ffi::Allocator* allocator, core::double* x, core::double* y, ffi::Pointer<self::Coordinate*>* next) → self::Coordinate* {
- return let final self::Coordinate* #t1 = new self::Coordinate::#fromTypedDataBase(allocator.{ffi::Allocator::allocate}<self::Coordinate*>(self::Coordinate::#sizeOf)!) in block {
+ return let final self::Coordinate* #t1 = new self::Coordinate::#fromTypedDataBase(allocator.{ffi::Allocator::allocate}<self::Coordinate*>(self::Coordinate::#sizeOf){(core::int, {alignment: core::int?}) → ffi::Pointer<self::Coordinate*>}!) in block {
#t1.{self::Coordinate::x} = x;
#t1.{self::Coordinate::y} = y;
#t1.{self::Coordinate::next} = next;
@@ -31,21 +31,21 @@
abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
@#C8
get x() → core::double*
- return ffi::_loadDouble(this.{ffi::_Compound::_typedDataBase}, (#C10).{core::List::[]}(ffi::_abi()));
+ return ffi::_loadDouble(this.{ffi::_Compound::_typedDataBase}{core::Object}, (#C10).{core::List::[]}(ffi::_abi()){(core::int) → core::int*});
set x(core::double* #v) → void
- return ffi::_storeDouble(this.{ffi::_Compound::_typedDataBase}, (#C10).{core::List::[]}(ffi::_abi()), #v);
+ return ffi::_storeDouble(this.{ffi::_Compound::_typedDataBase}{core::Object}, (#C10).{core::List::[]}(ffi::_abi()){(core::int) → core::int*}, #v);
@#C8
get y() → core::double*
- return ffi::_loadDouble(this.{ffi::_Compound::_typedDataBase}, (#C12).{core::List::[]}(ffi::_abi()));
+ return ffi::_loadDouble(this.{ffi::_Compound::_typedDataBase}{core::Object}, (#C12).{core::List::[]}(ffi::_abi()){(core::int) → core::int*});
set y(core::double* #v) → void
- return ffi::_storeDouble(this.{ffi::_Compound::_typedDataBase}, (#C12).{core::List::[]}(ffi::_abi()), #v);
+ return ffi::_storeDouble(this.{ffi::_Compound::_typedDataBase}{core::Object}, (#C12).{core::List::[]}(ffi::_abi()){(core::int) → core::int*}, #v);
get next() → ffi::Pointer<self::Coordinate*>*
- return ffi::_fromAddress<self::Coordinate*>(ffi::_loadIntPtr(this.{ffi::_Compound::_typedDataBase}, (#C14).{core::List::[]}(ffi::_abi())));
+ return ffi::_fromAddress<self::Coordinate*>(ffi::_loadIntPtr(this.{ffi::_Compound::_typedDataBase}{core::Object}, (#C14).{core::List::[]}(ffi::_abi()){(core::int) → core::int*}));
set next(ffi::Pointer<self::Coordinate*>* #v) → void
- return ffi::_storeIntPtr(this.{ffi::_Compound::_typedDataBase}, (#C14).{core::List::[]}(ffi::_abi()), #v.{ffi::Pointer::address});
+ return ffi::_storeIntPtr(this.{ffi::_Compound::_typedDataBase}{core::Object}, (#C14).{core::List::[]}(ffi::_abi()){(core::int) → core::int*}, #v.{ffi::Pointer::address}{core::int});
@#C16
static get /*isNonNullableByDefault*/ #sizeOf() → core::int*
- return (#C19).{core::List::[]}(ffi::_abi());
+ return (#C19).{core::List::[]}(ffi::_abi()){(core::int) → core::int*};
}
static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/incremental/crash_05.yaml.world.1.expect b/pkg/front_end/testcases/incremental/crash_05.yaml.world.1.expect
index 25bf01a..98cc56f 100644
--- a/pkg/front_end/testcases/incremental/crash_05.yaml.world.1.expect
+++ b/pkg/front_end/testcases/incremental/crash_05.yaml.world.1.expect
@@ -13,13 +13,13 @@
;
@#C7
get yy() → dart.core::int
- return dart.ffi::_loadUint32(this.{dart.ffi::_Compound::_typedDataBase}, (#C9).{dart.core::List::[]}(dart.ffi::_abi()));
+ return dart.ffi::_loadUint32(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C9).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
@#C7
set yy(dart.core::int #externalFieldValue) → void
- return dart.ffi::_storeUint32(this.{dart.ffi::_Compound::_typedDataBase}, (#C9).{dart.core::List::[]}(dart.ffi::_abi()), #externalFieldValue);
+ return dart.ffi::_storeUint32(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C9).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue);
@#C11
static get #sizeOf() → dart.core::int*
- return (#C13).{dart.core::List::[]}(dart.ffi::_abi());
+ return (#C13).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
}
}
library from "org-dartlang-test:///main.dart" as main {
@@ -37,14 +37,14 @@
;
get xx() → lib::Y
return new lib::Y::#fromTypedDataBase( block {
- dart.core::Object #typedDataBase = this.{dart.ffi::_Compound::_typedDataBase};
- dart.core::int #offset = (#C9).{dart.core::List::[]}(dart.ffi::_abi());
- } =>#typedDataBase is dart.ffi::Pointer<dynamic> ?{dart.core::Object} dart.ffi::_fromAddress<lib::Y>(#typedDataBase.{dart.ffi::Pointer::address}.{dart.core::num::+}(#offset)) : let dart.typed_data::TypedData #typedData = dart._internal::unsafeCast<dart.typed_data::TypedData>(#typedDataBase) in #typedData.{dart.typed_data::TypedData::buffer}.{dart.typed_data::ByteBuffer::asUint8List}(#typedData.{dart.typed_data::TypedData::offsetInBytes}.{dart.core::num::+}(#offset), (#C13).{dart.core::List::[]}(dart.ffi::_abi())));
+ dart.core::Object #typedDataBase = this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object};
+ dart.core::int #offset = (#C9).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
+ } =>#typedDataBase is dart.ffi::Pointer<dynamic> ?{dart.core::Object} dart.ffi::_fromAddress<lib::Y>(#typedDataBase.{dart.ffi::Pointer::address}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}) : let dart.typed_data::TypedData #typedData = dart._internal::unsafeCast<dart.typed_data::TypedData>(#typedDataBase) in #typedData.{dart.typed_data::TypedData::buffer}{dart.typed_data::ByteBuffer}.{dart.typed_data::ByteBuffer::asUint8List}(#typedData.{dart.typed_data::TypedData::offsetInBytes}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}, (#C13).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}){([dart.core::int, dart.core::int?]) → dart.typed_data::Uint8List});
set xx(lib::Y #externalFieldValue) → void
- return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}, (#C9).{dart.core::List::[]}(dart.ffi::_abi()), #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}, #C8, (#C13).{dart.core::List::[]}(dart.ffi::_abi()));
+ return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C9).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C8, (#C13).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
@#C11
static get #sizeOf() → dart.core::int*
- return (#C13).{dart.core::List::[]}(dart.ffi::_abi());
+ return (#C13).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
}
}
constants {
diff --git a/pkg/front_end/testcases/incremental/crash_05.yaml.world.2.expect b/pkg/front_end/testcases/incremental/crash_05.yaml.world.2.expect
index 25bf01a..98cc56f 100644
--- a/pkg/front_end/testcases/incremental/crash_05.yaml.world.2.expect
+++ b/pkg/front_end/testcases/incremental/crash_05.yaml.world.2.expect
@@ -13,13 +13,13 @@
;
@#C7
get yy() → dart.core::int
- return dart.ffi::_loadUint32(this.{dart.ffi::_Compound::_typedDataBase}, (#C9).{dart.core::List::[]}(dart.ffi::_abi()));
+ return dart.ffi::_loadUint32(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C9).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
@#C7
set yy(dart.core::int #externalFieldValue) → void
- return dart.ffi::_storeUint32(this.{dart.ffi::_Compound::_typedDataBase}, (#C9).{dart.core::List::[]}(dart.ffi::_abi()), #externalFieldValue);
+ return dart.ffi::_storeUint32(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C9).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue);
@#C11
static get #sizeOf() → dart.core::int*
- return (#C13).{dart.core::List::[]}(dart.ffi::_abi());
+ return (#C13).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
}
}
library from "org-dartlang-test:///main.dart" as main {
@@ -37,14 +37,14 @@
;
get xx() → lib::Y
return new lib::Y::#fromTypedDataBase( block {
- dart.core::Object #typedDataBase = this.{dart.ffi::_Compound::_typedDataBase};
- dart.core::int #offset = (#C9).{dart.core::List::[]}(dart.ffi::_abi());
- } =>#typedDataBase is dart.ffi::Pointer<dynamic> ?{dart.core::Object} dart.ffi::_fromAddress<lib::Y>(#typedDataBase.{dart.ffi::Pointer::address}.{dart.core::num::+}(#offset)) : let dart.typed_data::TypedData #typedData = dart._internal::unsafeCast<dart.typed_data::TypedData>(#typedDataBase) in #typedData.{dart.typed_data::TypedData::buffer}.{dart.typed_data::ByteBuffer::asUint8List}(#typedData.{dart.typed_data::TypedData::offsetInBytes}.{dart.core::num::+}(#offset), (#C13).{dart.core::List::[]}(dart.ffi::_abi())));
+ dart.core::Object #typedDataBase = this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object};
+ dart.core::int #offset = (#C9).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
+ } =>#typedDataBase is dart.ffi::Pointer<dynamic> ?{dart.core::Object} dart.ffi::_fromAddress<lib::Y>(#typedDataBase.{dart.ffi::Pointer::address}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}) : let dart.typed_data::TypedData #typedData = dart._internal::unsafeCast<dart.typed_data::TypedData>(#typedDataBase) in #typedData.{dart.typed_data::TypedData::buffer}{dart.typed_data::ByteBuffer}.{dart.typed_data::ByteBuffer::asUint8List}(#typedData.{dart.typed_data::TypedData::offsetInBytes}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}, (#C13).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}){([dart.core::int, dart.core::int?]) → dart.typed_data::Uint8List});
set xx(lib::Y #externalFieldValue) → void
- return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}, (#C9).{dart.core::List::[]}(dart.ffi::_abi()), #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}, #C8, (#C13).{dart.core::List::[]}(dart.ffi::_abi()));
+ return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C9).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C8, (#C13).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
@#C11
static get #sizeOf() → dart.core::int*
- return (#C13).{dart.core::List::[]}(dart.ffi::_abi());
+ return (#C13).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
}
}
constants {
diff --git a/pkg/front_end/testcases/incremental/crash_06.yaml.world.1.expect b/pkg/front_end/testcases/incremental/crash_06.yaml.world.1.expect
index bb7e809..19019c9 100644
--- a/pkg/front_end/testcases/incremental/crash_06.yaml.world.1.expect
+++ b/pkg/front_end/testcases/incremental/crash_06.yaml.world.1.expect
@@ -31,14 +31,14 @@
;
get yy() → str::Y
return new str::Y::#fromTypedDataBase( block {
- dart.core::Object #typedDataBase = this.{dart.ffi::_Compound::_typedDataBase};
- dart.core::int #offset = (#C8).{dart.core::List::[]}(dart.ffi::_abi());
- } =>#typedDataBase is dart.ffi::Pointer<dynamic> ?{dart.core::Object} dart.ffi::_fromAddress<str::Y>(#typedDataBase.{dart.ffi::Pointer::address}.{dart.core::num::+}(#offset)) : let dart.typed_data::TypedData #typedData = dart._internal::unsafeCast<dart.typed_data::TypedData>(#typedDataBase) in #typedData.{dart.typed_data::TypedData::buffer}.{dart.typed_data::ByteBuffer::asUint8List}(#typedData.{dart.typed_data::TypedData::offsetInBytes}.{dart.core::num::+}(#offset), (#C8).{dart.core::List::[]}(dart.ffi::_abi())));
+ dart.core::Object #typedDataBase = this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object};
+ dart.core::int #offset = (#C8).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
+ } =>#typedDataBase is dart.ffi::Pointer<dynamic> ?{dart.core::Object} dart.ffi::_fromAddress<str::Y>(#typedDataBase.{dart.ffi::Pointer::address}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}) : let dart.typed_data::TypedData #typedData = dart._internal::unsafeCast<dart.typed_data::TypedData>(#typedDataBase) in #typedData.{dart.typed_data::TypedData::buffer}{dart.typed_data::ByteBuffer}.{dart.typed_data::ByteBuffer::asUint8List}(#typedData.{dart.typed_data::TypedData::offsetInBytes}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}, (#C8).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}){([dart.core::int, dart.core::int?]) → dart.typed_data::Uint8List});
set yy(str::Y #externalFieldValue) → void
- return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}, (#C8).{dart.core::List::[]}(dart.ffi::_abi()), #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}, #C7, (#C8).{dart.core::List::[]}(dart.ffi::_abi()));
+ return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C8).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C7, (#C8).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
@#C10
static get #sizeOf() → dart.core::int*
- return (#C8).{dart.core::List::[]}(dart.ffi::_abi());
+ return (#C8).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
}
class Y extends dart.ffi::Struct {
synthetic constructor •() → str::Y
@@ -51,7 +51,7 @@
external set zz(invalid-type #externalFieldValue) → void;
@#C10
static get #sizeOf() → dart.core::int*
- return (#C8).{dart.core::List::[]}(dart.ffi::_abi());
+ return (#C8).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
}
}
constants {
diff --git a/pkg/front_end/testcases/incremental/crash_06.yaml.world.2.expect b/pkg/front_end/testcases/incremental/crash_06.yaml.world.2.expect
index bb7e809..19019c9 100644
--- a/pkg/front_end/testcases/incremental/crash_06.yaml.world.2.expect
+++ b/pkg/front_end/testcases/incremental/crash_06.yaml.world.2.expect
@@ -31,14 +31,14 @@
;
get yy() → str::Y
return new str::Y::#fromTypedDataBase( block {
- dart.core::Object #typedDataBase = this.{dart.ffi::_Compound::_typedDataBase};
- dart.core::int #offset = (#C8).{dart.core::List::[]}(dart.ffi::_abi());
- } =>#typedDataBase is dart.ffi::Pointer<dynamic> ?{dart.core::Object} dart.ffi::_fromAddress<str::Y>(#typedDataBase.{dart.ffi::Pointer::address}.{dart.core::num::+}(#offset)) : let dart.typed_data::TypedData #typedData = dart._internal::unsafeCast<dart.typed_data::TypedData>(#typedDataBase) in #typedData.{dart.typed_data::TypedData::buffer}.{dart.typed_data::ByteBuffer::asUint8List}(#typedData.{dart.typed_data::TypedData::offsetInBytes}.{dart.core::num::+}(#offset), (#C8).{dart.core::List::[]}(dart.ffi::_abi())));
+ dart.core::Object #typedDataBase = this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object};
+ dart.core::int #offset = (#C8).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
+ } =>#typedDataBase is dart.ffi::Pointer<dynamic> ?{dart.core::Object} dart.ffi::_fromAddress<str::Y>(#typedDataBase.{dart.ffi::Pointer::address}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}) : let dart.typed_data::TypedData #typedData = dart._internal::unsafeCast<dart.typed_data::TypedData>(#typedDataBase) in #typedData.{dart.typed_data::TypedData::buffer}{dart.typed_data::ByteBuffer}.{dart.typed_data::ByteBuffer::asUint8List}(#typedData.{dart.typed_data::TypedData::offsetInBytes}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}, (#C8).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}){([dart.core::int, dart.core::int?]) → dart.typed_data::Uint8List});
set yy(str::Y #externalFieldValue) → void
- return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}, (#C8).{dart.core::List::[]}(dart.ffi::_abi()), #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}, #C7, (#C8).{dart.core::List::[]}(dart.ffi::_abi()));
+ return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C8).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C7, (#C8).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
@#C10
static get #sizeOf() → dart.core::int*
- return (#C8).{dart.core::List::[]}(dart.ffi::_abi());
+ return (#C8).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
}
class Y extends dart.ffi::Struct {
synthetic constructor •() → str::Y
@@ -51,7 +51,7 @@
external set zz(invalid-type #externalFieldValue) → void;
@#C10
static get #sizeOf() → dart.core::int*
- return (#C8).{dart.core::List::[]}(dart.ffi::_abi());
+ return (#C8).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
}
}
constants {
diff --git a/pkg/front_end/testcases/incremental/ffi_01.yaml.world.1.expect b/pkg/front_end/testcases/incremental/ffi_01.yaml.world.1.expect
index 9aa86a1..5efe877 100644
--- a/pkg/front_end/testcases/incremental/ffi_01.yaml.world.1.expect
+++ b/pkg/front_end/testcases/incremental/ffi_01.yaml.world.1.expect
@@ -24,21 +24,21 @@
abstract member-signature get runtimeType() → dart.core::Type*; -> dart.core::Object::runtimeType
@#C8
get x() → dart.core::double*
- return dart.ffi::_loadDouble(this.{dart.ffi::_Compound::_typedDataBase}, (#C10).{dart.core::List::[]}(dart.ffi::_abi()));
+ return dart.ffi::_loadDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C10).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
set x(dart.core::double* #v) → void
- return dart.ffi::_storeDouble(this.{dart.ffi::_Compound::_typedDataBase}, (#C10).{dart.core::List::[]}(dart.ffi::_abi()), #v);
+ return dart.ffi::_storeDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C10).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #v);
@#C8
get y() → dart.core::double*
- return dart.ffi::_loadDouble(this.{dart.ffi::_Compound::_typedDataBase}, (#C12).{dart.core::List::[]}(dart.ffi::_abi()));
+ return dart.ffi::_loadDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C12).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
set y(dart.core::double* #v) → void
- return dart.ffi::_storeDouble(this.{dart.ffi::_Compound::_typedDataBase}, (#C12).{dart.core::List::[]}(dart.ffi::_abi()), #v);
+ return dart.ffi::_storeDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C12).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #v);
get next() → dart.ffi::Pointer<lib::Coordinate*>*
- return dart.ffi::_fromAddress<lib::Coordinate*>(dart.ffi::_loadIntPtr(this.{dart.ffi::_Compound::_typedDataBase}, (#C14).{dart.core::List::[]}(dart.ffi::_abi())));
+ return dart.ffi::_fromAddress<lib::Coordinate*>(dart.ffi::_loadIntPtr(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C14).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}));
set next(dart.ffi::Pointer<lib::Coordinate*>* #v) → void
- return dart.ffi::_storeIntPtr(this.{dart.ffi::_Compound::_typedDataBase}, (#C14).{dart.core::List::[]}(dart.ffi::_abi()), #v.{dart.ffi::Pointer::address});
+ return dart.ffi::_storeIntPtr(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C14).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #v.{dart.ffi::Pointer::address}{dart.core::int});
@#C16
static get /*isNonNullableByDefault*/ #sizeOf() → dart.core::int*
- return (#C19).{dart.core::List::[]}(dart.ffi::_abi());
+ return (#C19).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
}
}
library from "org-dartlang-test:///main.dart" as main {
diff --git a/pkg/front_end/testcases/incremental/ffi_01.yaml.world.2.expect b/pkg/front_end/testcases/incremental/ffi_01.yaml.world.2.expect
index 42aba72..c4bbfa3 100644
--- a/pkg/front_end/testcases/incremental/ffi_01.yaml.world.2.expect
+++ b/pkg/front_end/testcases/incremental/ffi_01.yaml.world.2.expect
@@ -24,21 +24,21 @@
abstract member-signature get runtimeType() → dart.core::Type*; -> dart.core::Object::runtimeType
@#C8
get x() → dart.core::double*
- return dart.ffi::_loadDouble(this.{dart.ffi::_Compound::_typedDataBase}, (#C10).{dart.core::List::[]}(dart.ffi::_abi()));
+ return dart.ffi::_loadDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C10).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
set x(dart.core::double* #v) → void
- return dart.ffi::_storeDouble(this.{dart.ffi::_Compound::_typedDataBase}, (#C10).{dart.core::List::[]}(dart.ffi::_abi()), #v);
+ return dart.ffi::_storeDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C10).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #v);
@#C8
get y() → dart.core::double*
- return dart.ffi::_loadDouble(this.{dart.ffi::_Compound::_typedDataBase}, (#C12).{dart.core::List::[]}(dart.ffi::_abi()));
+ return dart.ffi::_loadDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C12).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
set y(dart.core::double* #v) → void
- return dart.ffi::_storeDouble(this.{dart.ffi::_Compound::_typedDataBase}, (#C12).{dart.core::List::[]}(dart.ffi::_abi()), #v);
+ return dart.ffi::_storeDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C12).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #v);
get next() → dart.ffi::Pointer<lib::Coordinate*>*
- return dart.ffi::_fromAddress<lib::Coordinate*>(dart.ffi::_loadIntPtr(this.{dart.ffi::_Compound::_typedDataBase}, (#C14).{dart.core::List::[]}(dart.ffi::_abi())));
+ return dart.ffi::_fromAddress<lib::Coordinate*>(dart.ffi::_loadIntPtr(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C14).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}));
set next(dart.ffi::Pointer<lib::Coordinate*>* #v) → void
- return dart.ffi::_storeIntPtr(this.{dart.ffi::_Compound::_typedDataBase}, (#C14).{dart.core::List::[]}(dart.ffi::_abi()), #v.{dart.ffi::Pointer::address});
+ return dart.ffi::_storeIntPtr(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C14).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #v.{dart.ffi::Pointer::address}{dart.core::int});
@#C16
static get /*isNonNullableByDefault*/ #sizeOf() → dart.core::int*
- return (#C19).{dart.core::List::[]}(dart.ffi::_abi());
+ return (#C19).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
}
}
library from "org-dartlang-test:///main.dart" as main {
diff --git a/pkg/front_end/testcases/incremental/ffi_02.yaml.world.1.expect b/pkg/front_end/testcases/incremental/ffi_02.yaml.world.1.expect
index 5d0efe7..257f48a 100644
--- a/pkg/front_end/testcases/incremental/ffi_02.yaml.world.1.expect
+++ b/pkg/front_end/testcases/incremental/ffi_02.yaml.world.1.expect
@@ -24,21 +24,21 @@
abstract member-signature get runtimeType() → dart.core::Type*; -> dart.core::Object::runtimeType
@#C8
get x() → dart.core::double*
- return dart.ffi::_loadDouble(this.{dart.ffi::_Compound::_typedDataBase}, (#C10).{dart.core::List::[]}(dart.ffi::_abi()));
+ return dart.ffi::_loadDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C10).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
set x(dart.core::double* #v) → void
- return dart.ffi::_storeDouble(this.{dart.ffi::_Compound::_typedDataBase}, (#C10).{dart.core::List::[]}(dart.ffi::_abi()), #v);
+ return dart.ffi::_storeDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C10).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #v);
@#C8
get y() → dart.core::double*
- return dart.ffi::_loadDouble(this.{dart.ffi::_Compound::_typedDataBase}, (#C12).{dart.core::List::[]}(dart.ffi::_abi()));
+ return dart.ffi::_loadDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C12).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
set y(dart.core::double* #v) → void
- return dart.ffi::_storeDouble(this.{dart.ffi::_Compound::_typedDataBase}, (#C12).{dart.core::List::[]}(dart.ffi::_abi()), #v);
+ return dart.ffi::_storeDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C12).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #v);
get next() → dart.ffi::Pointer<lib::Coordinate*>*
- return dart.ffi::_fromAddress<lib::Coordinate*>(dart.ffi::_loadIntPtr(this.{dart.ffi::_Compound::_typedDataBase}, (#C14).{dart.core::List::[]}(dart.ffi::_abi())));
+ return dart.ffi::_fromAddress<lib::Coordinate*>(dart.ffi::_loadIntPtr(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C14).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}));
set next(dart.ffi::Pointer<lib::Coordinate*>* #v) → void
- return dart.ffi::_storeIntPtr(this.{dart.ffi::_Compound::_typedDataBase}, (#C14).{dart.core::List::[]}(dart.ffi::_abi()), #v.{dart.ffi::Pointer::address});
+ return dart.ffi::_storeIntPtr(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C14).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #v.{dart.ffi::Pointer::address}{dart.core::int});
@#C16
static get /*isNonNullableByDefault*/ #sizeOf() → dart.core::int*
- return (#C19).{dart.core::List::[]}(dart.ffi::_abi());
+ return (#C19).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
}
}
library from "org-dartlang-test:///main.dart" as main {
diff --git a/pkg/front_end/testcases/incremental/no_outline_change_35.yaml.world.1.expect b/pkg/front_end/testcases/incremental/no_outline_change_35.yaml.world.1.expect
index 9aa86a1..5efe877 100644
--- a/pkg/front_end/testcases/incremental/no_outline_change_35.yaml.world.1.expect
+++ b/pkg/front_end/testcases/incremental/no_outline_change_35.yaml.world.1.expect
@@ -24,21 +24,21 @@
abstract member-signature get runtimeType() → dart.core::Type*; -> dart.core::Object::runtimeType
@#C8
get x() → dart.core::double*
- return dart.ffi::_loadDouble(this.{dart.ffi::_Compound::_typedDataBase}, (#C10).{dart.core::List::[]}(dart.ffi::_abi()));
+ return dart.ffi::_loadDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C10).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
set x(dart.core::double* #v) → void
- return dart.ffi::_storeDouble(this.{dart.ffi::_Compound::_typedDataBase}, (#C10).{dart.core::List::[]}(dart.ffi::_abi()), #v);
+ return dart.ffi::_storeDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C10).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #v);
@#C8
get y() → dart.core::double*
- return dart.ffi::_loadDouble(this.{dart.ffi::_Compound::_typedDataBase}, (#C12).{dart.core::List::[]}(dart.ffi::_abi()));
+ return dart.ffi::_loadDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C12).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
set y(dart.core::double* #v) → void
- return dart.ffi::_storeDouble(this.{dart.ffi::_Compound::_typedDataBase}, (#C12).{dart.core::List::[]}(dart.ffi::_abi()), #v);
+ return dart.ffi::_storeDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C12).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #v);
get next() → dart.ffi::Pointer<lib::Coordinate*>*
- return dart.ffi::_fromAddress<lib::Coordinate*>(dart.ffi::_loadIntPtr(this.{dart.ffi::_Compound::_typedDataBase}, (#C14).{dart.core::List::[]}(dart.ffi::_abi())));
+ return dart.ffi::_fromAddress<lib::Coordinate*>(dart.ffi::_loadIntPtr(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C14).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}));
set next(dart.ffi::Pointer<lib::Coordinate*>* #v) → void
- return dart.ffi::_storeIntPtr(this.{dart.ffi::_Compound::_typedDataBase}, (#C14).{dart.core::List::[]}(dart.ffi::_abi()), #v.{dart.ffi::Pointer::address});
+ return dart.ffi::_storeIntPtr(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C14).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #v.{dart.ffi::Pointer::address}{dart.core::int});
@#C16
static get /*isNonNullableByDefault*/ #sizeOf() → dart.core::int*
- return (#C19).{dart.core::List::[]}(dart.ffi::_abi());
+ return (#C19).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
}
}
library from "org-dartlang-test:///main.dart" as main {
diff --git a/pkg/front_end/testcases/incremental/no_outline_change_35.yaml.world.2.expect b/pkg/front_end/testcases/incremental/no_outline_change_35.yaml.world.2.expect
index 32b8ad5..a21321e 100644
--- a/pkg/front_end/testcases/incremental/no_outline_change_35.yaml.world.2.expect
+++ b/pkg/front_end/testcases/incremental/no_outline_change_35.yaml.world.2.expect
@@ -24,21 +24,21 @@
abstract member-signature get runtimeType() → dart.core::Type*; -> dart.core::Object::runtimeType
@#C8
get x() → dart.core::double*
- return dart.ffi::_loadDouble(this.{dart.ffi::_Compound::_typedDataBase}, (#C10).{dart.core::List::[]}(dart.ffi::_abi()));
+ return dart.ffi::_loadDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C10).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
set x(dart.core::double* #v) → void
- return dart.ffi::_storeDouble(this.{dart.ffi::_Compound::_typedDataBase}, (#C10).{dart.core::List::[]}(dart.ffi::_abi()), #v);
+ return dart.ffi::_storeDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C10).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #v);
@#C8
get y() → dart.core::double*
- return dart.ffi::_loadDouble(this.{dart.ffi::_Compound::_typedDataBase}, (#C12).{dart.core::List::[]}(dart.ffi::_abi()));
+ return dart.ffi::_loadDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C12).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
set y(dart.core::double* #v) → void
- return dart.ffi::_storeDouble(this.{dart.ffi::_Compound::_typedDataBase}, (#C12).{dart.core::List::[]}(dart.ffi::_abi()), #v);
+ return dart.ffi::_storeDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C12).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #v);
get next() → dart.ffi::Pointer<lib::Coordinate*>*
- return dart.ffi::_fromAddress<lib::Coordinate*>(dart.ffi::_loadIntPtr(this.{dart.ffi::_Compound::_typedDataBase}, (#C14).{dart.core::List::[]}(dart.ffi::_abi())));
+ return dart.ffi::_fromAddress<lib::Coordinate*>(dart.ffi::_loadIntPtr(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C14).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}));
set next(dart.ffi::Pointer<lib::Coordinate*>* #v) → void
- return dart.ffi::_storeIntPtr(this.{dart.ffi::_Compound::_typedDataBase}, (#C14).{dart.core::List::[]}(dart.ffi::_abi()), #v.{dart.ffi::Pointer::address});
+ return dart.ffi::_storeIntPtr(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C14).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #v.{dart.ffi::Pointer::address}{dart.core::int});
@#C16
static get /*isNonNullableByDefault*/ #sizeOf() → dart.core::int*
- return (#C19).{dart.core::List::[]}(dart.ffi::_abi());
+ return (#C19).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
}
}
library from "org-dartlang-test:///main.dart" as main {
diff --git a/pkg/front_end/testcases/incremental/no_outline_change_35.yaml.world.3.expect b/pkg/front_end/testcases/incremental/no_outline_change_35.yaml.world.3.expect
index cf35c48..ae7eb63 100644
--- a/pkg/front_end/testcases/incremental/no_outline_change_35.yaml.world.3.expect
+++ b/pkg/front_end/testcases/incremental/no_outline_change_35.yaml.world.3.expect
@@ -25,21 +25,21 @@
abstract member-signature get runtimeType() → dart.core::Type*; -> dart.core::Object::runtimeType
@#C8
get x() → dart.core::double*
- return dart.ffi::_loadDouble(this.{dart.ffi::_Compound::_typedDataBase}, (#C10).{dart.core::List::[]}(dart.ffi::_abi()));
+ return dart.ffi::_loadDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C10).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
set x(dart.core::double* #v) → void
- return dart.ffi::_storeDouble(this.{dart.ffi::_Compound::_typedDataBase}, (#C10).{dart.core::List::[]}(dart.ffi::_abi()), #v);
+ return dart.ffi::_storeDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C10).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #v);
@#C8
get y() → dart.core::double*
- return dart.ffi::_loadDouble(this.{dart.ffi::_Compound::_typedDataBase}, (#C12).{dart.core::List::[]}(dart.ffi::_abi()));
+ return dart.ffi::_loadDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C12).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
set y(dart.core::double* #v) → void
- return dart.ffi::_storeDouble(this.{dart.ffi::_Compound::_typedDataBase}, (#C12).{dart.core::List::[]}(dart.ffi::_abi()), #v);
+ return dart.ffi::_storeDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C12).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #v);
get next() → dart.ffi::Pointer<lib::Coordinate*>*
- return dart.ffi::_fromAddress<lib::Coordinate*>(dart.ffi::_loadIntPtr(this.{dart.ffi::_Compound::_typedDataBase}, (#C14).{dart.core::List::[]}(dart.ffi::_abi())));
+ return dart.ffi::_fromAddress<lib::Coordinate*>(dart.ffi::_loadIntPtr(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C14).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}));
set next(dart.ffi::Pointer<lib::Coordinate*>* #v) → void
- return dart.ffi::_storeIntPtr(this.{dart.ffi::_Compound::_typedDataBase}, (#C14).{dart.core::List::[]}(dart.ffi::_abi()), #v.{dart.ffi::Pointer::address});
+ return dart.ffi::_storeIntPtr(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C14).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #v.{dart.ffi::Pointer::address}{dart.core::int});
@#C16
static get /*isNonNullableByDefault*/ #sizeOf() → dart.core::int*
- return (#C19).{dart.core::List::[]}(dart.ffi::_abi());
+ return (#C19).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
}
}
library from "org-dartlang-test:///main.dart" as main {
diff --git a/pkg/front_end/testcases/incremental/no_outline_change_48_ffi.yaml.world.1.expect b/pkg/front_end/testcases/incremental/no_outline_change_48_ffi.yaml.world.1.expect
index b1ca0cd..aed934d 100644
--- a/pkg/front_end/testcases/incremental/no_outline_change_48_ffi.yaml.world.1.expect
+++ b/pkg/front_end/testcases/incremental/no_outline_change_48_ffi.yaml.world.1.expect
@@ -13,25 +13,25 @@
;
@#C8
get y1() → dart.core::int
- return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}, (#C10).{dart.core::List::[]}(dart.ffi::_abi()));
+ return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C10).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
@#C8
set y1(dart.core::int #externalFieldValue) → void
- return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}, (#C10).{dart.core::List::[]}(dart.ffi::_abi()), #externalFieldValue);
+ return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C10).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue);
@#C8
get y2() → dart.core::int
- return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}, (#C12).{dart.core::List::[]}(dart.ffi::_abi()));
+ return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C12).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
@#C8
set y2(dart.core::int #externalFieldValue) → void
- return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}, (#C12).{dart.core::List::[]}(dart.ffi::_abi()), #externalFieldValue);
+ return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C12).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue);
@#C13
get y3() → dart.core::int
- return dart.ffi::_loadUint64(this.{dart.ffi::_Compound::_typedDataBase}, (#C16).{dart.core::List::[]}(dart.ffi::_abi()));
+ return dart.ffi::_loadUint64(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C16).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
@#C13
set y3(dart.core::int #externalFieldValue) → void
- return dart.ffi::_storeUint64(this.{dart.ffi::_Compound::_typedDataBase}, (#C16).{dart.core::List::[]}(dart.ffi::_abi()), #externalFieldValue);
+ return dart.ffi::_storeUint64(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C16).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue);
@#C18
static get #sizeOf() → dart.core::int*
- return (#C21).{dart.core::List::[]}(dart.ffi::_abi());
+ return (#C21).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
}
}
library from "org-dartlang-test:///main.dart" as main {
@@ -49,27 +49,27 @@
;
get x1() → lib::Y
return new lib::Y::#fromTypedDataBase( block {
- dart.core::Object #typedDataBase = this.{dart.ffi::_Compound::_typedDataBase};
- dart.core::int #offset = (#C10).{dart.core::List::[]}(dart.ffi::_abi());
- } =>#typedDataBase is dart.ffi::Pointer<dynamic> ?{dart.core::Object} dart.ffi::_fromAddress<lib::Y>(#typedDataBase.{dart.ffi::Pointer::address}.{dart.core::num::+}(#offset)) : let dart.typed_data::TypedData #typedData = dart._internal::unsafeCast<dart.typed_data::TypedData>(#typedDataBase) in #typedData.{dart.typed_data::TypedData::buffer}.{dart.typed_data::ByteBuffer::asUint8List}(#typedData.{dart.typed_data::TypedData::offsetInBytes}.{dart.core::num::+}(#offset), (#C21).{dart.core::List::[]}(dart.ffi::_abi())));
+ dart.core::Object #typedDataBase = this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object};
+ dart.core::int #offset = (#C10).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
+ } =>#typedDataBase is dart.ffi::Pointer<dynamic> ?{dart.core::Object} dart.ffi::_fromAddress<lib::Y>(#typedDataBase.{dart.ffi::Pointer::address}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}) : let dart.typed_data::TypedData #typedData = dart._internal::unsafeCast<dart.typed_data::TypedData>(#typedDataBase) in #typedData.{dart.typed_data::TypedData::buffer}{dart.typed_data::ByteBuffer}.{dart.typed_data::ByteBuffer::asUint8List}(#typedData.{dart.typed_data::TypedData::offsetInBytes}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}, (#C21).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}){([dart.core::int, dart.core::int?]) → dart.typed_data::Uint8List});
set x1(lib::Y #externalFieldValue) → void
- return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}, (#C10).{dart.core::List::[]}(dart.ffi::_abi()), #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}, #C9, (#C21).{dart.core::List::[]}(dart.ffi::_abi()));
+ return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C10).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C9, (#C21).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
get x2() → lib::Y
return new lib::Y::#fromTypedDataBase( block {
- dart.core::Object #typedDataBase = this.{dart.ffi::_Compound::_typedDataBase};
- dart.core::int #offset = (#C21).{dart.core::List::[]}(dart.ffi::_abi());
- } =>#typedDataBase is dart.ffi::Pointer<dynamic> ?{dart.core::Object} dart.ffi::_fromAddress<lib::Y>(#typedDataBase.{dart.ffi::Pointer::address}.{dart.core::num::+}(#offset)) : let dart.typed_data::TypedData #typedData = dart._internal::unsafeCast<dart.typed_data::TypedData>(#typedDataBase) in #typedData.{dart.typed_data::TypedData::buffer}.{dart.typed_data::ByteBuffer::asUint8List}(#typedData.{dart.typed_data::TypedData::offsetInBytes}.{dart.core::num::+}(#offset), (#C21).{dart.core::List::[]}(dart.ffi::_abi())));
+ dart.core::Object #typedDataBase = this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object};
+ dart.core::int #offset = (#C21).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
+ } =>#typedDataBase is dart.ffi::Pointer<dynamic> ?{dart.core::Object} dart.ffi::_fromAddress<lib::Y>(#typedDataBase.{dart.ffi::Pointer::address}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}) : let dart.typed_data::TypedData #typedData = dart._internal::unsafeCast<dart.typed_data::TypedData>(#typedDataBase) in #typedData.{dart.typed_data::TypedData::buffer}{dart.typed_data::ByteBuffer}.{dart.typed_data::ByteBuffer::asUint8List}(#typedData.{dart.typed_data::TypedData::offsetInBytes}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}, (#C21).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}){([dart.core::int, dart.core::int?]) → dart.typed_data::Uint8List});
set x2(lib::Y #externalFieldValue) → void
- return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}, (#C21).{dart.core::List::[]}(dart.ffi::_abi()), #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}, #C9, (#C21).{dart.core::List::[]}(dart.ffi::_abi()));
+ return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C21).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C9, (#C21).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
@#C8
get x3() → dart.core::int
- return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}, (#C28).{dart.core::List::[]}(dart.ffi::_abi()));
+ return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C28).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
@#C8
set x3(dart.core::int #externalFieldValue) → void
- return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}, (#C28).{dart.core::List::[]}(dart.ffi::_abi()), #externalFieldValue);
+ return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C28).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue);
@#C18
static get #sizeOf() → dart.core::int*
- return (#C31).{dart.core::List::[]}(dart.ffi::_abi());
+ return (#C31).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
}
}
constants {
diff --git a/pkg/front_end/testcases/incremental/no_outline_change_48_ffi.yaml.world.2.expect b/pkg/front_end/testcases/incremental/no_outline_change_48_ffi.yaml.world.2.expect
index 75e87b0..4c4686b 100644
--- a/pkg/front_end/testcases/incremental/no_outline_change_48_ffi.yaml.world.2.expect
+++ b/pkg/front_end/testcases/incremental/no_outline_change_48_ffi.yaml.world.2.expect
@@ -13,25 +13,25 @@
;
@#C8
get y1() → dart.core::int
- return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}, (#C10).{dart.core::List::[]}(dart.ffi::_abi()));
+ return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C10).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
@#C8
set y1(dart.core::int #externalFieldValue) → void
- return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}, (#C10).{dart.core::List::[]}(dart.ffi::_abi()), #externalFieldValue);
+ return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C10).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue);
@#C11
get y3() → dart.core::int
- return dart.ffi::_loadUint64(this.{dart.ffi::_Compound::_typedDataBase}, (#C14).{dart.core::List::[]}(dart.ffi::_abi()));
+ return dart.ffi::_loadUint64(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C14).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
@#C11
set y3(dart.core::int #externalFieldValue) → void
- return dart.ffi::_storeUint64(this.{dart.ffi::_Compound::_typedDataBase}, (#C14).{dart.core::List::[]}(dart.ffi::_abi()), #externalFieldValue);
+ return dart.ffi::_storeUint64(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C14).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue);
@#C8
get y2() → dart.core::int
- return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}, (#C17).{dart.core::List::[]}(dart.ffi::_abi()));
+ return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C17).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
@#C8
set y2(dart.core::int #externalFieldValue) → void
- return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}, (#C17).{dart.core::List::[]}(dart.ffi::_abi()), #externalFieldValue);
+ return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C17).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue);
@#C19
static get #sizeOf() → dart.core::int*
- return (#C21).{dart.core::List::[]}(dart.ffi::_abi());
+ return (#C21).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
}
}
library from "org-dartlang-test:///main.dart" as main {
@@ -49,27 +49,27 @@
;
get x1() → lib::Y
return new lib::Y::#fromTypedDataBase( block {
- dart.core::Object #typedDataBase = this.{dart.ffi::_Compound::_typedDataBase};
- dart.core::int #offset = (#C10).{dart.core::List::[]}(dart.ffi::_abi());
- } =>#typedDataBase is dart.ffi::Pointer<dynamic> ?{dart.core::Object} dart.ffi::_fromAddress<lib::Y>(#typedDataBase.{dart.ffi::Pointer::address}.{dart.core::num::+}(#offset)) : let dart.typed_data::TypedData #typedData = dart._internal::unsafeCast<dart.typed_data::TypedData>(#typedDataBase) in #typedData.{dart.typed_data::TypedData::buffer}.{dart.typed_data::ByteBuffer::asUint8List}(#typedData.{dart.typed_data::TypedData::offsetInBytes}.{dart.core::num::+}(#offset), (#C21).{dart.core::List::[]}(dart.ffi::_abi())));
+ dart.core::Object #typedDataBase = this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object};
+ dart.core::int #offset = (#C10).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
+ } =>#typedDataBase is dart.ffi::Pointer<dynamic> ?{dart.core::Object} dart.ffi::_fromAddress<lib::Y>(#typedDataBase.{dart.ffi::Pointer::address}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}) : let dart.typed_data::TypedData #typedData = dart._internal::unsafeCast<dart.typed_data::TypedData>(#typedDataBase) in #typedData.{dart.typed_data::TypedData::buffer}{dart.typed_data::ByteBuffer}.{dart.typed_data::ByteBuffer::asUint8List}(#typedData.{dart.typed_data::TypedData::offsetInBytes}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}, (#C21).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}){([dart.core::int, dart.core::int?]) → dart.typed_data::Uint8List});
set x1(lib::Y #externalFieldValue) → void
- return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}, (#C10).{dart.core::List::[]}(dart.ffi::_abi()), #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}, #C9, (#C21).{dart.core::List::[]}(dart.ffi::_abi()));
+ return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C10).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C9, (#C21).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
get x2() → lib::Y
return new lib::Y::#fromTypedDataBase( block {
- dart.core::Object #typedDataBase = this.{dart.ffi::_Compound::_typedDataBase};
- dart.core::int #offset = (#C21).{dart.core::List::[]}(dart.ffi::_abi());
- } =>#typedDataBase is dart.ffi::Pointer<dynamic> ?{dart.core::Object} dart.ffi::_fromAddress<lib::Y>(#typedDataBase.{dart.ffi::Pointer::address}.{dart.core::num::+}(#offset)) : let dart.typed_data::TypedData #typedData = dart._internal::unsafeCast<dart.typed_data::TypedData>(#typedDataBase) in #typedData.{dart.typed_data::TypedData::buffer}.{dart.typed_data::ByteBuffer::asUint8List}(#typedData.{dart.typed_data::TypedData::offsetInBytes}.{dart.core::num::+}(#offset), (#C21).{dart.core::List::[]}(dart.ffi::_abi())));
+ dart.core::Object #typedDataBase = this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object};
+ dart.core::int #offset = (#C21).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
+ } =>#typedDataBase is dart.ffi::Pointer<dynamic> ?{dart.core::Object} dart.ffi::_fromAddress<lib::Y>(#typedDataBase.{dart.ffi::Pointer::address}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}) : let dart.typed_data::TypedData #typedData = dart._internal::unsafeCast<dart.typed_data::TypedData>(#typedDataBase) in #typedData.{dart.typed_data::TypedData::buffer}{dart.typed_data::ByteBuffer}.{dart.typed_data::ByteBuffer::asUint8List}(#typedData.{dart.typed_data::TypedData::offsetInBytes}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}, (#C21).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}){([dart.core::int, dart.core::int?]) → dart.typed_data::Uint8List});
set x2(lib::Y #externalFieldValue) → void
- return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}, (#C21).{dart.core::List::[]}(dart.ffi::_abi()), #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}, #C9, (#C21).{dart.core::List::[]}(dart.ffi::_abi()));
+ return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C21).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C9, (#C21).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
@#C8
get x3() → dart.core::int
- return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}, (#C28).{dart.core::List::[]}(dart.ffi::_abi()));
+ return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C28).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
@#C8
set x3(dart.core::int #externalFieldValue) → void
- return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}, (#C28).{dart.core::List::[]}(dart.ffi::_abi()), #externalFieldValue);
+ return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C28).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue);
@#C19
static get #sizeOf() → dart.core::int*
- return (#C31).{dart.core::List::[]}(dart.ffi::_abi());
+ return (#C31).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
}
}
constants {
diff --git a/pkg/front_end/testcases/incremental/no_outline_change_49_ffi.yaml.world.1.expect b/pkg/front_end/testcases/incremental/no_outline_change_49_ffi.yaml.world.1.expect
index b1ca0cd..aed934d 100644
--- a/pkg/front_end/testcases/incremental/no_outline_change_49_ffi.yaml.world.1.expect
+++ b/pkg/front_end/testcases/incremental/no_outline_change_49_ffi.yaml.world.1.expect
@@ -13,25 +13,25 @@
;
@#C8
get y1() → dart.core::int
- return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}, (#C10).{dart.core::List::[]}(dart.ffi::_abi()));
+ return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C10).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
@#C8
set y1(dart.core::int #externalFieldValue) → void
- return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}, (#C10).{dart.core::List::[]}(dart.ffi::_abi()), #externalFieldValue);
+ return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C10).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue);
@#C8
get y2() → dart.core::int
- return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}, (#C12).{dart.core::List::[]}(dart.ffi::_abi()));
+ return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C12).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
@#C8
set y2(dart.core::int #externalFieldValue) → void
- return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}, (#C12).{dart.core::List::[]}(dart.ffi::_abi()), #externalFieldValue);
+ return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C12).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue);
@#C13
get y3() → dart.core::int
- return dart.ffi::_loadUint64(this.{dart.ffi::_Compound::_typedDataBase}, (#C16).{dart.core::List::[]}(dart.ffi::_abi()));
+ return dart.ffi::_loadUint64(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C16).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
@#C13
set y3(dart.core::int #externalFieldValue) → void
- return dart.ffi::_storeUint64(this.{dart.ffi::_Compound::_typedDataBase}, (#C16).{dart.core::List::[]}(dart.ffi::_abi()), #externalFieldValue);
+ return dart.ffi::_storeUint64(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C16).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue);
@#C18
static get #sizeOf() → dart.core::int*
- return (#C21).{dart.core::List::[]}(dart.ffi::_abi());
+ return (#C21).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
}
}
library from "org-dartlang-test:///main.dart" as main {
@@ -49,27 +49,27 @@
;
get x1() → lib::Y
return new lib::Y::#fromTypedDataBase( block {
- dart.core::Object #typedDataBase = this.{dart.ffi::_Compound::_typedDataBase};
- dart.core::int #offset = (#C10).{dart.core::List::[]}(dart.ffi::_abi());
- } =>#typedDataBase is dart.ffi::Pointer<dynamic> ?{dart.core::Object} dart.ffi::_fromAddress<lib::Y>(#typedDataBase.{dart.ffi::Pointer::address}.{dart.core::num::+}(#offset)) : let dart.typed_data::TypedData #typedData = dart._internal::unsafeCast<dart.typed_data::TypedData>(#typedDataBase) in #typedData.{dart.typed_data::TypedData::buffer}.{dart.typed_data::ByteBuffer::asUint8List}(#typedData.{dart.typed_data::TypedData::offsetInBytes}.{dart.core::num::+}(#offset), (#C21).{dart.core::List::[]}(dart.ffi::_abi())));
+ dart.core::Object #typedDataBase = this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object};
+ dart.core::int #offset = (#C10).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
+ } =>#typedDataBase is dart.ffi::Pointer<dynamic> ?{dart.core::Object} dart.ffi::_fromAddress<lib::Y>(#typedDataBase.{dart.ffi::Pointer::address}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}) : let dart.typed_data::TypedData #typedData = dart._internal::unsafeCast<dart.typed_data::TypedData>(#typedDataBase) in #typedData.{dart.typed_data::TypedData::buffer}{dart.typed_data::ByteBuffer}.{dart.typed_data::ByteBuffer::asUint8List}(#typedData.{dart.typed_data::TypedData::offsetInBytes}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}, (#C21).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}){([dart.core::int, dart.core::int?]) → dart.typed_data::Uint8List});
set x1(lib::Y #externalFieldValue) → void
- return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}, (#C10).{dart.core::List::[]}(dart.ffi::_abi()), #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}, #C9, (#C21).{dart.core::List::[]}(dart.ffi::_abi()));
+ return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C10).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C9, (#C21).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
get x2() → lib::Y
return new lib::Y::#fromTypedDataBase( block {
- dart.core::Object #typedDataBase = this.{dart.ffi::_Compound::_typedDataBase};
- dart.core::int #offset = (#C21).{dart.core::List::[]}(dart.ffi::_abi());
- } =>#typedDataBase is dart.ffi::Pointer<dynamic> ?{dart.core::Object} dart.ffi::_fromAddress<lib::Y>(#typedDataBase.{dart.ffi::Pointer::address}.{dart.core::num::+}(#offset)) : let dart.typed_data::TypedData #typedData = dart._internal::unsafeCast<dart.typed_data::TypedData>(#typedDataBase) in #typedData.{dart.typed_data::TypedData::buffer}.{dart.typed_data::ByteBuffer::asUint8List}(#typedData.{dart.typed_data::TypedData::offsetInBytes}.{dart.core::num::+}(#offset), (#C21).{dart.core::List::[]}(dart.ffi::_abi())));
+ dart.core::Object #typedDataBase = this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object};
+ dart.core::int #offset = (#C21).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
+ } =>#typedDataBase is dart.ffi::Pointer<dynamic> ?{dart.core::Object} dart.ffi::_fromAddress<lib::Y>(#typedDataBase.{dart.ffi::Pointer::address}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}) : let dart.typed_data::TypedData #typedData = dart._internal::unsafeCast<dart.typed_data::TypedData>(#typedDataBase) in #typedData.{dart.typed_data::TypedData::buffer}{dart.typed_data::ByteBuffer}.{dart.typed_data::ByteBuffer::asUint8List}(#typedData.{dart.typed_data::TypedData::offsetInBytes}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}, (#C21).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}){([dart.core::int, dart.core::int?]) → dart.typed_data::Uint8List});
set x2(lib::Y #externalFieldValue) → void
- return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}, (#C21).{dart.core::List::[]}(dart.ffi::_abi()), #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}, #C9, (#C21).{dart.core::List::[]}(dart.ffi::_abi()));
+ return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C21).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C9, (#C21).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
@#C8
get x3() → dart.core::int
- return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}, (#C28).{dart.core::List::[]}(dart.ffi::_abi()));
+ return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C28).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
@#C8
set x3(dart.core::int #externalFieldValue) → void
- return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}, (#C28).{dart.core::List::[]}(dart.ffi::_abi()), #externalFieldValue);
+ return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C28).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue);
@#C18
static get #sizeOf() → dart.core::int*
- return (#C31).{dart.core::List::[]}(dart.ffi::_abi());
+ return (#C31).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
}
}
constants {
diff --git a/pkg/front_end/testcases/incremental/no_outline_change_49_ffi.yaml.world.2.expect b/pkg/front_end/testcases/incremental/no_outline_change_49_ffi.yaml.world.2.expect
index 75e87b0..4c4686b 100644
--- a/pkg/front_end/testcases/incremental/no_outline_change_49_ffi.yaml.world.2.expect
+++ b/pkg/front_end/testcases/incremental/no_outline_change_49_ffi.yaml.world.2.expect
@@ -13,25 +13,25 @@
;
@#C8
get y1() → dart.core::int
- return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}, (#C10).{dart.core::List::[]}(dart.ffi::_abi()));
+ return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C10).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
@#C8
set y1(dart.core::int #externalFieldValue) → void
- return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}, (#C10).{dart.core::List::[]}(dart.ffi::_abi()), #externalFieldValue);
+ return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C10).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue);
@#C11
get y3() → dart.core::int
- return dart.ffi::_loadUint64(this.{dart.ffi::_Compound::_typedDataBase}, (#C14).{dart.core::List::[]}(dart.ffi::_abi()));
+ return dart.ffi::_loadUint64(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C14).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
@#C11
set y3(dart.core::int #externalFieldValue) → void
- return dart.ffi::_storeUint64(this.{dart.ffi::_Compound::_typedDataBase}, (#C14).{dart.core::List::[]}(dart.ffi::_abi()), #externalFieldValue);
+ return dart.ffi::_storeUint64(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C14).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue);
@#C8
get y2() → dart.core::int
- return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}, (#C17).{dart.core::List::[]}(dart.ffi::_abi()));
+ return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C17).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
@#C8
set y2(dart.core::int #externalFieldValue) → void
- return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}, (#C17).{dart.core::List::[]}(dart.ffi::_abi()), #externalFieldValue);
+ return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C17).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue);
@#C19
static get #sizeOf() → dart.core::int*
- return (#C21).{dart.core::List::[]}(dart.ffi::_abi());
+ return (#C21).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
}
}
library from "org-dartlang-test:///main.dart" as main {
@@ -49,27 +49,27 @@
;
get x1() → lib::Y
return new lib::Y::#fromTypedDataBase( block {
- dart.core::Object #typedDataBase = this.{dart.ffi::_Compound::_typedDataBase};
- dart.core::int #offset = (#C10).{dart.core::List::[]}(dart.ffi::_abi());
- } =>#typedDataBase is dart.ffi::Pointer<dynamic> ?{dart.core::Object} dart.ffi::_fromAddress<lib::Y>(#typedDataBase.{dart.ffi::Pointer::address}.{dart.core::num::+}(#offset)) : let dart.typed_data::TypedData #typedData = dart._internal::unsafeCast<dart.typed_data::TypedData>(#typedDataBase) in #typedData.{dart.typed_data::TypedData::buffer}.{dart.typed_data::ByteBuffer::asUint8List}(#typedData.{dart.typed_data::TypedData::offsetInBytes}.{dart.core::num::+}(#offset), (#C21).{dart.core::List::[]}(dart.ffi::_abi())));
+ dart.core::Object #typedDataBase = this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object};
+ dart.core::int #offset = (#C10).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
+ } =>#typedDataBase is dart.ffi::Pointer<dynamic> ?{dart.core::Object} dart.ffi::_fromAddress<lib::Y>(#typedDataBase.{dart.ffi::Pointer::address}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}) : let dart.typed_data::TypedData #typedData = dart._internal::unsafeCast<dart.typed_data::TypedData>(#typedDataBase) in #typedData.{dart.typed_data::TypedData::buffer}{dart.typed_data::ByteBuffer}.{dart.typed_data::ByteBuffer::asUint8List}(#typedData.{dart.typed_data::TypedData::offsetInBytes}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}, (#C21).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}){([dart.core::int, dart.core::int?]) → dart.typed_data::Uint8List});
set x1(lib::Y #externalFieldValue) → void
- return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}, (#C10).{dart.core::List::[]}(dart.ffi::_abi()), #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}, #C9, (#C21).{dart.core::List::[]}(dart.ffi::_abi()));
+ return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C10).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C9, (#C21).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
get x2() → lib::Y
return new lib::Y::#fromTypedDataBase( block {
- dart.core::Object #typedDataBase = this.{dart.ffi::_Compound::_typedDataBase};
- dart.core::int #offset = (#C21).{dart.core::List::[]}(dart.ffi::_abi());
- } =>#typedDataBase is dart.ffi::Pointer<dynamic> ?{dart.core::Object} dart.ffi::_fromAddress<lib::Y>(#typedDataBase.{dart.ffi::Pointer::address}.{dart.core::num::+}(#offset)) : let dart.typed_data::TypedData #typedData = dart._internal::unsafeCast<dart.typed_data::TypedData>(#typedDataBase) in #typedData.{dart.typed_data::TypedData::buffer}.{dart.typed_data::ByteBuffer::asUint8List}(#typedData.{dart.typed_data::TypedData::offsetInBytes}.{dart.core::num::+}(#offset), (#C21).{dart.core::List::[]}(dart.ffi::_abi())));
+ dart.core::Object #typedDataBase = this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object};
+ dart.core::int #offset = (#C21).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
+ } =>#typedDataBase is dart.ffi::Pointer<dynamic> ?{dart.core::Object} dart.ffi::_fromAddress<lib::Y>(#typedDataBase.{dart.ffi::Pointer::address}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}) : let dart.typed_data::TypedData #typedData = dart._internal::unsafeCast<dart.typed_data::TypedData>(#typedDataBase) in #typedData.{dart.typed_data::TypedData::buffer}{dart.typed_data::ByteBuffer}.{dart.typed_data::ByteBuffer::asUint8List}(#typedData.{dart.typed_data::TypedData::offsetInBytes}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}, (#C21).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}){([dart.core::int, dart.core::int?]) → dart.typed_data::Uint8List});
set x2(lib::Y #externalFieldValue) → void
- return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}, (#C21).{dart.core::List::[]}(dart.ffi::_abi()), #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}, #C9, (#C21).{dart.core::List::[]}(dart.ffi::_abi()));
+ return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C21).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C9, (#C21).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
@#C8
get x3() → dart.core::int
- return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}, (#C28).{dart.core::List::[]}(dart.ffi::_abi()));
+ return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C28).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
@#C8
set x3(dart.core::int #externalFieldValue) → void
- return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}, (#C28).{dart.core::List::[]}(dart.ffi::_abi()), #externalFieldValue);
+ return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C28).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue);
@#C19
static get #sizeOf() → dart.core::int*
- return (#C31).{dart.core::List::[]}(dart.ffi::_abi());
+ return (#C31).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
}
}
constants {
diff --git a/pkg/front_end/testcases/incremental/no_outline_change_50_ffi.yaml.world.1.expect b/pkg/front_end/testcases/incremental/no_outline_change_50_ffi.yaml.world.1.expect
index b6ef699..2ba9ae1 100644
--- a/pkg/front_end/testcases/incremental/no_outline_change_50_ffi.yaml.world.1.expect
+++ b/pkg/front_end/testcases/incremental/no_outline_change_50_ffi.yaml.world.1.expect
@@ -13,25 +13,25 @@
;
@#C8
get y1() → dart.core::int
- return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}, (#C10).{dart.core::List::[]}(dart.ffi::_abi()));
+ return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C10).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
@#C8
set y1(dart.core::int #externalFieldValue) → void
- return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}, (#C10).{dart.core::List::[]}(dart.ffi::_abi()), #externalFieldValue);
+ return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C10).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue);
@#C8
get y2() → dart.core::int
- return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}, (#C12).{dart.core::List::[]}(dart.ffi::_abi()));
+ return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C12).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
@#C8
set y2(dart.core::int #externalFieldValue) → void
- return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}, (#C12).{dart.core::List::[]}(dart.ffi::_abi()), #externalFieldValue);
+ return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C12).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue);
@#C13
get y3() → dart.core::int
- return dart.ffi::_loadUint64(this.{dart.ffi::_Compound::_typedDataBase}, (#C16).{dart.core::List::[]}(dart.ffi::_abi()));
+ return dart.ffi::_loadUint64(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C16).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
@#C13
set y3(dart.core::int #externalFieldValue) → void
- return dart.ffi::_storeUint64(this.{dart.ffi::_Compound::_typedDataBase}, (#C16).{dart.core::List::[]}(dart.ffi::_abi()), #externalFieldValue);
+ return dart.ffi::_storeUint64(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C16).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue);
@#C18
static get #sizeOf() → dart.core::int*
- return (#C21).{dart.core::List::[]}(dart.ffi::_abi());
+ return (#C21).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
}
}
library from "org-dartlang-test:///lib2.dart" as lib2 {
@@ -187,27 +187,27 @@
;
get x1() → lib::Y
return new lib::Y::#fromTypedDataBase( block {
- dart.core::Object #typedDataBase = this.{dart.ffi::_Compound::_typedDataBase};
- dart.core::int #offset = (#C10).{dart.core::List::[]}(dart.ffi::_abi());
- } =>#typedDataBase is dart.ffi::Pointer<dynamic> ?{dart.core::Object} dart.ffi::_fromAddress<lib::Y>(#typedDataBase.{dart.ffi::Pointer::address}.{dart.core::num::+}(#offset)) : let dart.typed_data::TypedData #typedData = dart._internal::unsafeCast<dart.typed_data::TypedData>(#typedDataBase) in #typedData.{dart.typed_data::TypedData::buffer}.{dart.typed_data::ByteBuffer::asUint8List}(#typedData.{dart.typed_data::TypedData::offsetInBytes}.{dart.core::num::+}(#offset), (#C21).{dart.core::List::[]}(dart.ffi::_abi())));
+ dart.core::Object #typedDataBase = this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object};
+ dart.core::int #offset = (#C10).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
+ } =>#typedDataBase is dart.ffi::Pointer<dynamic> ?{dart.core::Object} dart.ffi::_fromAddress<lib::Y>(#typedDataBase.{dart.ffi::Pointer::address}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}) : let dart.typed_data::TypedData #typedData = dart._internal::unsafeCast<dart.typed_data::TypedData>(#typedDataBase) in #typedData.{dart.typed_data::TypedData::buffer}{dart.typed_data::ByteBuffer}.{dart.typed_data::ByteBuffer::asUint8List}(#typedData.{dart.typed_data::TypedData::offsetInBytes}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}, (#C21).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}){([dart.core::int, dart.core::int?]) → dart.typed_data::Uint8List});
set x1(lib::Y #externalFieldValue) → void
- return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}, (#C10).{dart.core::List::[]}(dart.ffi::_abi()), #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}, #C9, (#C21).{dart.core::List::[]}(dart.ffi::_abi()));
+ return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C10).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C9, (#C21).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
get x2() → lib::Y
return new lib::Y::#fromTypedDataBase( block {
- dart.core::Object #typedDataBase = this.{dart.ffi::_Compound::_typedDataBase};
- dart.core::int #offset = (#C21).{dart.core::List::[]}(dart.ffi::_abi());
- } =>#typedDataBase is dart.ffi::Pointer<dynamic> ?{dart.core::Object} dart.ffi::_fromAddress<lib::Y>(#typedDataBase.{dart.ffi::Pointer::address}.{dart.core::num::+}(#offset)) : let dart.typed_data::TypedData #typedData = dart._internal::unsafeCast<dart.typed_data::TypedData>(#typedDataBase) in #typedData.{dart.typed_data::TypedData::buffer}.{dart.typed_data::ByteBuffer::asUint8List}(#typedData.{dart.typed_data::TypedData::offsetInBytes}.{dart.core::num::+}(#offset), (#C21).{dart.core::List::[]}(dart.ffi::_abi())));
+ dart.core::Object #typedDataBase = this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object};
+ dart.core::int #offset = (#C21).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
+ } =>#typedDataBase is dart.ffi::Pointer<dynamic> ?{dart.core::Object} dart.ffi::_fromAddress<lib::Y>(#typedDataBase.{dart.ffi::Pointer::address}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}) : let dart.typed_data::TypedData #typedData = dart._internal::unsafeCast<dart.typed_data::TypedData>(#typedDataBase) in #typedData.{dart.typed_data::TypedData::buffer}{dart.typed_data::ByteBuffer}.{dart.typed_data::ByteBuffer::asUint8List}(#typedData.{dart.typed_data::TypedData::offsetInBytes}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}, (#C21).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}){([dart.core::int, dart.core::int?]) → dart.typed_data::Uint8List});
set x2(lib::Y #externalFieldValue) → void
- return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}, (#C21).{dart.core::List::[]}(dart.ffi::_abi()), #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}, #C9, (#C21).{dart.core::List::[]}(dart.ffi::_abi()));
+ return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C21).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C9, (#C21).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
@#C8
get x3() → dart.core::int
- return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}, (#C28).{dart.core::List::[]}(dart.ffi::_abi()));
+ return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C28).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
@#C8
set x3(dart.core::int #externalFieldValue) → void
- return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}, (#C28).{dart.core::List::[]}(dart.ffi::_abi()), #externalFieldValue);
+ return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C28).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue);
@#C18
static get #sizeOf() → dart.core::int*
- return (#C31).{dart.core::List::[]}(dart.ffi::_abi());
+ return (#C31).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
}
}
constants {
diff --git a/pkg/front_end/testcases/incremental/no_outline_change_50_ffi.yaml.world.2.expect b/pkg/front_end/testcases/incremental/no_outline_change_50_ffi.yaml.world.2.expect
index c8d5564..b09ca73 100644
--- a/pkg/front_end/testcases/incremental/no_outline_change_50_ffi.yaml.world.2.expect
+++ b/pkg/front_end/testcases/incremental/no_outline_change_50_ffi.yaml.world.2.expect
@@ -13,25 +13,25 @@
;
@#C8
get y1() → dart.core::int
- return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}, (#C10).{dart.core::List::[]}(dart.ffi::_abi()));
+ return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C10).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
@#C8
set y1(dart.core::int #externalFieldValue) → void
- return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}, (#C10).{dart.core::List::[]}(dart.ffi::_abi()), #externalFieldValue);
+ return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C10).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue);
@#C11
get y3() → dart.core::int
- return dart.ffi::_loadUint64(this.{dart.ffi::_Compound::_typedDataBase}, (#C14).{dart.core::List::[]}(dart.ffi::_abi()));
+ return dart.ffi::_loadUint64(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C14).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
@#C11
set y3(dart.core::int #externalFieldValue) → void
- return dart.ffi::_storeUint64(this.{dart.ffi::_Compound::_typedDataBase}, (#C14).{dart.core::List::[]}(dart.ffi::_abi()), #externalFieldValue);
+ return dart.ffi::_storeUint64(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C14).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue);
@#C8
get y2() → dart.core::int
- return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}, (#C17).{dart.core::List::[]}(dart.ffi::_abi()));
+ return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C17).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
@#C8
set y2(dart.core::int #externalFieldValue) → void
- return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}, (#C17).{dart.core::List::[]}(dart.ffi::_abi()), #externalFieldValue);
+ return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C17).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue);
@#C19
static get #sizeOf() → dart.core::int*
- return (#C21).{dart.core::List::[]}(dart.ffi::_abi());
+ return (#C21).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
}
}
library from "org-dartlang-test:///lib2.dart" as lib2 {
@@ -187,27 +187,27 @@
;
get x1() → lib::Y
return new lib::Y::#fromTypedDataBase( block {
- dart.core::Object #typedDataBase = this.{dart.ffi::_Compound::_typedDataBase};
- dart.core::int #offset = (#C10).{dart.core::List::[]}(dart.ffi::_abi());
- } =>#typedDataBase is dart.ffi::Pointer<dynamic> ?{dart.core::Object} dart.ffi::_fromAddress<lib::Y>(#typedDataBase.{dart.ffi::Pointer::address}.{dart.core::num::+}(#offset)) : let dart.typed_data::TypedData #typedData = dart._internal::unsafeCast<dart.typed_data::TypedData>(#typedDataBase) in #typedData.{dart.typed_data::TypedData::buffer}.{dart.typed_data::ByteBuffer::asUint8List}(#typedData.{dart.typed_data::TypedData::offsetInBytes}.{dart.core::num::+}(#offset), (#C21).{dart.core::List::[]}(dart.ffi::_abi())));
+ dart.core::Object #typedDataBase = this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object};
+ dart.core::int #offset = (#C10).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
+ } =>#typedDataBase is dart.ffi::Pointer<dynamic> ?{dart.core::Object} dart.ffi::_fromAddress<lib::Y>(#typedDataBase.{dart.ffi::Pointer::address}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}) : let dart.typed_data::TypedData #typedData = dart._internal::unsafeCast<dart.typed_data::TypedData>(#typedDataBase) in #typedData.{dart.typed_data::TypedData::buffer}{dart.typed_data::ByteBuffer}.{dart.typed_data::ByteBuffer::asUint8List}(#typedData.{dart.typed_data::TypedData::offsetInBytes}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}, (#C21).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}){([dart.core::int, dart.core::int?]) → dart.typed_data::Uint8List});
set x1(lib::Y #externalFieldValue) → void
- return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}, (#C10).{dart.core::List::[]}(dart.ffi::_abi()), #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}, #C9, (#C21).{dart.core::List::[]}(dart.ffi::_abi()));
+ return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C10).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C9, (#C21).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
get x2() → lib::Y
return new lib::Y::#fromTypedDataBase( block {
- dart.core::Object #typedDataBase = this.{dart.ffi::_Compound::_typedDataBase};
- dart.core::int #offset = (#C21).{dart.core::List::[]}(dart.ffi::_abi());
- } =>#typedDataBase is dart.ffi::Pointer<dynamic> ?{dart.core::Object} dart.ffi::_fromAddress<lib::Y>(#typedDataBase.{dart.ffi::Pointer::address}.{dart.core::num::+}(#offset)) : let dart.typed_data::TypedData #typedData = dart._internal::unsafeCast<dart.typed_data::TypedData>(#typedDataBase) in #typedData.{dart.typed_data::TypedData::buffer}.{dart.typed_data::ByteBuffer::asUint8List}(#typedData.{dart.typed_data::TypedData::offsetInBytes}.{dart.core::num::+}(#offset), (#C21).{dart.core::List::[]}(dart.ffi::_abi())));
+ dart.core::Object #typedDataBase = this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object};
+ dart.core::int #offset = (#C21).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
+ } =>#typedDataBase is dart.ffi::Pointer<dynamic> ?{dart.core::Object} dart.ffi::_fromAddress<lib::Y>(#typedDataBase.{dart.ffi::Pointer::address}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}) : let dart.typed_data::TypedData #typedData = dart._internal::unsafeCast<dart.typed_data::TypedData>(#typedDataBase) in #typedData.{dart.typed_data::TypedData::buffer}{dart.typed_data::ByteBuffer}.{dart.typed_data::ByteBuffer::asUint8List}(#typedData.{dart.typed_data::TypedData::offsetInBytes}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}, (#C21).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}){([dart.core::int, dart.core::int?]) → dart.typed_data::Uint8List});
set x2(lib::Y #externalFieldValue) → void
- return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}, (#C21).{dart.core::List::[]}(dart.ffi::_abi()), #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}, #C9, (#C21).{dart.core::List::[]}(dart.ffi::_abi()));
+ return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C21).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C9, (#C21).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
@#C8
get x3() → dart.core::int
- return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}, (#C28).{dart.core::List::[]}(dart.ffi::_abi()));
+ return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C28).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
@#C8
set x3(dart.core::int #externalFieldValue) → void
- return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}, (#C28).{dart.core::List::[]}(dart.ffi::_abi()), #externalFieldValue);
+ return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C28).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue);
@#C19
static get #sizeOf() → dart.core::int*
- return (#C31).{dart.core::List::[]}(dart.ffi::_abi());
+ return (#C31).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
}
}
constants {
diff --git a/pkg/front_end/testcases/incremental/regress_46004.yaml.world.1.expect b/pkg/front_end/testcases/incremental/regress_46004.yaml.world.1.expect
index 702407d..c74d240 100644
--- a/pkg/front_end/testcases/incremental/regress_46004.yaml.world.1.expect
+++ b/pkg/front_end/testcases/incremental/regress_46004.yaml.world.1.expect
@@ -12,14 +12,14 @@
: super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase)
;
get lpVtbl() → dart.ffi::Pointer<dart.ffi::IntPtr>
- return dart.ffi::_fromAddress<dart.ffi::IntPtr>(dart.ffi::_loadIntPtr(this.{dart.ffi::_Compound::_typedDataBase}, (#C8).{dart.core::List::[]}(dart.ffi::_abi())));
+ return dart.ffi::_fromAddress<dart.ffi::IntPtr>(dart.ffi::_loadIntPtr(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C8).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}));
set lpVtbl(dart.ffi::Pointer<dart.ffi::IntPtr> #externalFieldValue) → void
- return dart.ffi::_storeIntPtr(this.{dart.ffi::_Compound::_typedDataBase}, (#C8).{dart.core::List::[]}(dart.ffi::_abi()), #externalFieldValue.{dart.ffi::Pointer::address});
+ return dart.ffi::_storeIntPtr(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C8).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue.{dart.ffi::Pointer::address}{dart.core::int});
get vtable() → dart.ffi::Pointer<dart.ffi::IntPtr>
return dart.ffi::Pointer::fromAddress<dart.ffi::IntPtr>(dart.ffi::IntPtrPointer|get#value(this.{lib::COMObject::lpVtbl}{dart.ffi::Pointer<dart.ffi::IntPtr>}));
@#C10
static get #sizeOf() → dart.core::int*
- return (#C13).{dart.core::List::[]}(dart.ffi::_abi());
+ return (#C13).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
}
}
library from "org-dartlang-test:///main.dart" as main {
@@ -37,14 +37,14 @@
;
get xx() → lib::COMObject
return new lib::COMObject::#fromTypedDataBase( block {
- dart.core::Object #typedDataBase = this.{dart.ffi::_Compound::_typedDataBase};
- dart.core::int #offset = (#C8).{dart.core::List::[]}(dart.ffi::_abi());
- } =>#typedDataBase is dart.ffi::Pointer<dynamic> ?{dart.core::Object} dart.ffi::_fromAddress<lib::COMObject>(#typedDataBase.{dart.ffi::Pointer::address}.{dart.core::num::+}(#offset)) : let dart.typed_data::TypedData #typedData = dart._internal::unsafeCast<dart.typed_data::TypedData>(#typedDataBase) in #typedData.{dart.typed_data::TypedData::buffer}.{dart.typed_data::ByteBuffer::asUint8List}(#typedData.{dart.typed_data::TypedData::offsetInBytes}.{dart.core::num::+}(#offset), (#C13).{dart.core::List::[]}(dart.ffi::_abi())));
+ dart.core::Object #typedDataBase = this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object};
+ dart.core::int #offset = (#C8).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
+ } =>#typedDataBase is dart.ffi::Pointer<dynamic> ?{dart.core::Object} dart.ffi::_fromAddress<lib::COMObject>(#typedDataBase.{dart.ffi::Pointer::address}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}) : let dart.typed_data::TypedData #typedData = dart._internal::unsafeCast<dart.typed_data::TypedData>(#typedDataBase) in #typedData.{dart.typed_data::TypedData::buffer}{dart.typed_data::ByteBuffer}.{dart.typed_data::ByteBuffer::asUint8List}(#typedData.{dart.typed_data::TypedData::offsetInBytes}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}, (#C13).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}){([dart.core::int, dart.core::int?]) → dart.typed_data::Uint8List});
set xx(lib::COMObject #externalFieldValue) → void
- return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}, (#C8).{dart.core::List::[]}(dart.ffi::_abi()), #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}, #C7, (#C13).{dart.core::List::[]}(dart.ffi::_abi()));
+ return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C8).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C7, (#C13).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
@#C10
static get #sizeOf() → dart.core::int*
- return (#C13).{dart.core::List::[]}(dart.ffi::_abi());
+ return (#C13).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
}
}
constants {
diff --git a/pkg/front_end/testcases/incremental/regress_46004.yaml.world.2.expect b/pkg/front_end/testcases/incremental/regress_46004.yaml.world.2.expect
index 702407d..c74d240 100644
--- a/pkg/front_end/testcases/incremental/regress_46004.yaml.world.2.expect
+++ b/pkg/front_end/testcases/incremental/regress_46004.yaml.world.2.expect
@@ -12,14 +12,14 @@
: super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase)
;
get lpVtbl() → dart.ffi::Pointer<dart.ffi::IntPtr>
- return dart.ffi::_fromAddress<dart.ffi::IntPtr>(dart.ffi::_loadIntPtr(this.{dart.ffi::_Compound::_typedDataBase}, (#C8).{dart.core::List::[]}(dart.ffi::_abi())));
+ return dart.ffi::_fromAddress<dart.ffi::IntPtr>(dart.ffi::_loadIntPtr(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C8).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}));
set lpVtbl(dart.ffi::Pointer<dart.ffi::IntPtr> #externalFieldValue) → void
- return dart.ffi::_storeIntPtr(this.{dart.ffi::_Compound::_typedDataBase}, (#C8).{dart.core::List::[]}(dart.ffi::_abi()), #externalFieldValue.{dart.ffi::Pointer::address});
+ return dart.ffi::_storeIntPtr(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C8).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue.{dart.ffi::Pointer::address}{dart.core::int});
get vtable() → dart.ffi::Pointer<dart.ffi::IntPtr>
return dart.ffi::Pointer::fromAddress<dart.ffi::IntPtr>(dart.ffi::IntPtrPointer|get#value(this.{lib::COMObject::lpVtbl}{dart.ffi::Pointer<dart.ffi::IntPtr>}));
@#C10
static get #sizeOf() → dart.core::int*
- return (#C13).{dart.core::List::[]}(dart.ffi::_abi());
+ return (#C13).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
}
}
library from "org-dartlang-test:///main.dart" as main {
@@ -37,14 +37,14 @@
;
get xx() → lib::COMObject
return new lib::COMObject::#fromTypedDataBase( block {
- dart.core::Object #typedDataBase = this.{dart.ffi::_Compound::_typedDataBase};
- dart.core::int #offset = (#C8).{dart.core::List::[]}(dart.ffi::_abi());
- } =>#typedDataBase is dart.ffi::Pointer<dynamic> ?{dart.core::Object} dart.ffi::_fromAddress<lib::COMObject>(#typedDataBase.{dart.ffi::Pointer::address}.{dart.core::num::+}(#offset)) : let dart.typed_data::TypedData #typedData = dart._internal::unsafeCast<dart.typed_data::TypedData>(#typedDataBase) in #typedData.{dart.typed_data::TypedData::buffer}.{dart.typed_data::ByteBuffer::asUint8List}(#typedData.{dart.typed_data::TypedData::offsetInBytes}.{dart.core::num::+}(#offset), (#C13).{dart.core::List::[]}(dart.ffi::_abi())));
+ dart.core::Object #typedDataBase = this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object};
+ dart.core::int #offset = (#C8).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
+ } =>#typedDataBase is dart.ffi::Pointer<dynamic> ?{dart.core::Object} dart.ffi::_fromAddress<lib::COMObject>(#typedDataBase.{dart.ffi::Pointer::address}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}) : let dart.typed_data::TypedData #typedData = dart._internal::unsafeCast<dart.typed_data::TypedData>(#typedDataBase) in #typedData.{dart.typed_data::TypedData::buffer}{dart.typed_data::ByteBuffer}.{dart.typed_data::ByteBuffer::asUint8List}(#typedData.{dart.typed_data::TypedData::offsetInBytes}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}, (#C13).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}){([dart.core::int, dart.core::int?]) → dart.typed_data::Uint8List});
set xx(lib::COMObject #externalFieldValue) → void
- return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}, (#C8).{dart.core::List::[]}(dart.ffi::_abi()), #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}, #C7, (#C13).{dart.core::List::[]}(dart.ffi::_abi()));
+ return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, (#C8).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C7, (#C13).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
@#C10
static get #sizeOf() → dart.core::int*
- return (#C13).{dart.core::List::[]}(dart.ffi::_abi());
+ return (#C13).{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
}
}
constants {
diff --git a/pkg/front_end/testcases/nnbd/ffi_sample.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/ffi_sample.dart.strong.transformed.expect
index 156a6b3..c313fec 100644
--- a/pkg/front_end/testcases/nnbd/ffi_sample.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/ffi_sample.dart.strong.transformed.expect
@@ -13,22 +13,22 @@
;
@#C8
get x() → core::double
- return ffi::_loadDouble(this.{ffi::_Compound::_typedDataBase}, (#C10).{core::List::[]}(ffi::_abi()));
+ return ffi::_loadDouble(this.{ffi::_Compound::_typedDataBase}{core::Object}, (#C10).{core::List::[]}(ffi::_abi()){(core::int) → core::int*});
@#C8
set x(core::double #externalFieldValue) → void
- return ffi::_storeDouble(this.{ffi::_Compound::_typedDataBase}, (#C10).{core::List::[]}(ffi::_abi()), #externalFieldValue);
+ return ffi::_storeDouble(this.{ffi::_Compound::_typedDataBase}{core::Object}, (#C10).{core::List::[]}(ffi::_abi()){(core::int) → core::int*}, #externalFieldValue);
@#C8
get y() → core::double
- return ffi::_loadDouble(this.{ffi::_Compound::_typedDataBase}, (#C12).{core::List::[]}(ffi::_abi()));
+ return ffi::_loadDouble(this.{ffi::_Compound::_typedDataBase}{core::Object}, (#C12).{core::List::[]}(ffi::_abi()){(core::int) → core::int*});
@#C8
set y(core::double #externalFieldValue) → void
- return ffi::_storeDouble(this.{ffi::_Compound::_typedDataBase}, (#C12).{core::List::[]}(ffi::_abi()), #externalFieldValue);
+ return ffi::_storeDouble(this.{ffi::_Compound::_typedDataBase}{core::Object}, (#C12).{core::List::[]}(ffi::_abi()){(core::int) → core::int*}, #externalFieldValue);
get next() → ffi::Pointer<self::Coordinate>
- return ffi::_fromAddress<self::Coordinate>(ffi::_loadIntPtr(this.{ffi::_Compound::_typedDataBase}, (#C14).{core::List::[]}(ffi::_abi())));
+ return ffi::_fromAddress<self::Coordinate>(ffi::_loadIntPtr(this.{ffi::_Compound::_typedDataBase}{core::Object}, (#C14).{core::List::[]}(ffi::_abi()){(core::int) → core::int*}));
set next(ffi::Pointer<self::Coordinate> #externalFieldValue) → void
- return ffi::_storeIntPtr(this.{ffi::_Compound::_typedDataBase}, (#C14).{core::List::[]}(ffi::_abi()), #externalFieldValue.{ffi::Pointer::address});
+ return ffi::_storeIntPtr(this.{ffi::_Compound::_typedDataBase}{core::Object}, (#C14).{core::List::[]}(ffi::_abi()){(core::int) → core::int*}, #externalFieldValue.{ffi::Pointer::address}{core::int});
static factory allocate(ffi::Allocator allocator, core::double x, core::double y, ffi::Pointer<self::Coordinate> next) → self::Coordinate {
- return let final self::Coordinate #t1 = new self::Coordinate::#fromTypedDataBase(allocator.{ffi::Allocator::allocate}<self::Coordinate>(self::Coordinate::#sizeOf)!) in block {
+ return let final self::Coordinate #t1 = new self::Coordinate::#fromTypedDataBase(allocator.{ffi::Allocator::allocate}<self::Coordinate>(self::Coordinate::#sizeOf){(core::int, {alignment: core::int?}) → ffi::Pointer<self::Coordinate>}!) in block {
#t1.{self::Coordinate::x} = x;
#t1.{self::Coordinate::y} = y;
#t1.{self::Coordinate::next} = next;
@@ -36,7 +36,7 @@
}
@#C16
static get #sizeOf() → core::int*
- return (#C19).{core::List::[]}(ffi::_abi());
+ return (#C19).{core::List::[]}(ffi::_abi()){(core::int) → core::int*};
}
static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/ffi_sample.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/ffi_sample.dart.weak.transformed.expect
index 156a6b3..c313fec 100644
--- a/pkg/front_end/testcases/nnbd/ffi_sample.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/ffi_sample.dart.weak.transformed.expect
@@ -13,22 +13,22 @@
;
@#C8
get x() → core::double
- return ffi::_loadDouble(this.{ffi::_Compound::_typedDataBase}, (#C10).{core::List::[]}(ffi::_abi()));
+ return ffi::_loadDouble(this.{ffi::_Compound::_typedDataBase}{core::Object}, (#C10).{core::List::[]}(ffi::_abi()){(core::int) → core::int*});
@#C8
set x(core::double #externalFieldValue) → void
- return ffi::_storeDouble(this.{ffi::_Compound::_typedDataBase}, (#C10).{core::List::[]}(ffi::_abi()), #externalFieldValue);
+ return ffi::_storeDouble(this.{ffi::_Compound::_typedDataBase}{core::Object}, (#C10).{core::List::[]}(ffi::_abi()){(core::int) → core::int*}, #externalFieldValue);
@#C8
get y() → core::double
- return ffi::_loadDouble(this.{ffi::_Compound::_typedDataBase}, (#C12).{core::List::[]}(ffi::_abi()));
+ return ffi::_loadDouble(this.{ffi::_Compound::_typedDataBase}{core::Object}, (#C12).{core::List::[]}(ffi::_abi()){(core::int) → core::int*});
@#C8
set y(core::double #externalFieldValue) → void
- return ffi::_storeDouble(this.{ffi::_Compound::_typedDataBase}, (#C12).{core::List::[]}(ffi::_abi()), #externalFieldValue);
+ return ffi::_storeDouble(this.{ffi::_Compound::_typedDataBase}{core::Object}, (#C12).{core::List::[]}(ffi::_abi()){(core::int) → core::int*}, #externalFieldValue);
get next() → ffi::Pointer<self::Coordinate>
- return ffi::_fromAddress<self::Coordinate>(ffi::_loadIntPtr(this.{ffi::_Compound::_typedDataBase}, (#C14).{core::List::[]}(ffi::_abi())));
+ return ffi::_fromAddress<self::Coordinate>(ffi::_loadIntPtr(this.{ffi::_Compound::_typedDataBase}{core::Object}, (#C14).{core::List::[]}(ffi::_abi()){(core::int) → core::int*}));
set next(ffi::Pointer<self::Coordinate> #externalFieldValue) → void
- return ffi::_storeIntPtr(this.{ffi::_Compound::_typedDataBase}, (#C14).{core::List::[]}(ffi::_abi()), #externalFieldValue.{ffi::Pointer::address});
+ return ffi::_storeIntPtr(this.{ffi::_Compound::_typedDataBase}{core::Object}, (#C14).{core::List::[]}(ffi::_abi()){(core::int) → core::int*}, #externalFieldValue.{ffi::Pointer::address}{core::int});
static factory allocate(ffi::Allocator allocator, core::double x, core::double y, ffi::Pointer<self::Coordinate> next) → self::Coordinate {
- return let final self::Coordinate #t1 = new self::Coordinate::#fromTypedDataBase(allocator.{ffi::Allocator::allocate}<self::Coordinate>(self::Coordinate::#sizeOf)!) in block {
+ return let final self::Coordinate #t1 = new self::Coordinate::#fromTypedDataBase(allocator.{ffi::Allocator::allocate}<self::Coordinate>(self::Coordinate::#sizeOf){(core::int, {alignment: core::int?}) → ffi::Pointer<self::Coordinate>}!) in block {
#t1.{self::Coordinate::x} = x;
#t1.{self::Coordinate::y} = y;
#t1.{self::Coordinate::next} = next;
@@ -36,7 +36,7 @@
}
@#C16
static get #sizeOf() → core::int*
- return (#C19).{core::List::[]}(ffi::_abi());
+ return (#C19).{core::List::[]}(ffi::_abi()){(core::int) → core::int*};
}
static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/ffi_struct_inline_array.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/ffi_struct_inline_array.dart.strong.transformed.expect
index cc5b25d..d480c5f 100644
--- a/pkg/front_end/testcases/nnbd/ffi_struct_inline_array.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/ffi_struct_inline_array.dart.strong.transformed.expect
@@ -19,15 +19,15 @@
@#C9
get a0() → ffi::Array<ffi::Uint8>
return new ffi::Array::_<ffi::Uint8>( block {
- core::Object #typedDataBase = this.{ffi::_Compound::_typedDataBase};
- core::int #offset = (#C11).{core::List::[]}(ffi::_abi());
- } =>#typedDataBase is ffi::Pointer<dynamic> ?{core::Object} ffi::_fromAddress<ffi::Uint8>(#typedDataBase.{ffi::Pointer::address}.{core::num::+}(#offset)) : let typ::TypedData #typedData = _in::unsafeCast<typ::TypedData>(#typedDataBase) in #typedData.{typ::TypedData::buffer}.{typ::ByteBuffer::asUint8List}(#typedData.{typ::TypedData::offsetInBytes}.{core::num::+}(#offset), (#C12).{core::List::[]}(ffi::_abi())), #C3, #C13);
+ core::Object #typedDataBase = this.{ffi::_Compound::_typedDataBase}{core::Object};
+ core::int #offset = (#C11).{core::List::[]}(ffi::_abi()){(core::int) → core::int*};
+ } =>#typedDataBase is ffi::Pointer<dynamic> ?{core::Object} ffi::_fromAddress<ffi::Uint8>(#typedDataBase.{ffi::Pointer::address}{core::int}.{core::num::+}(#offset){(core::num) → core::num}) : let typ::TypedData #typedData = _in::unsafeCast<typ::TypedData>(#typedDataBase) in #typedData.{typ::TypedData::buffer}{typ::ByteBuffer}.{typ::ByteBuffer::asUint8List}(#typedData.{typ::TypedData::offsetInBytes}{core::int}.{core::num::+}(#offset){(core::num) → core::num}, (#C12).{core::List::[]}(ffi::_abi()){(core::int) → core::int*}){([core::int, core::int?]) → typ::Uint8List}, #C3, #C13);
@#C9
set a0(ffi::Array<ffi::Uint8> #externalFieldValue) → void
- return ffi::_memCopy(this.{ffi::_Compound::_typedDataBase}, (#C11).{core::List::[]}(ffi::_abi()), #externalFieldValue.{ffi::Array::_typedDataBase}, #C10, (#C12).{core::List::[]}(ffi::_abi()));
+ return ffi::_memCopy(this.{ffi::_Compound::_typedDataBase}{core::Object}, (#C11).{core::List::[]}(ffi::_abi()){(core::int) → core::int*}, #externalFieldValue.{ffi::Array::_typedDataBase}{core::Object}, #C10, (#C12).{core::List::[]}(ffi::_abi()){(core::int) → core::int*});
@#C15
static get #sizeOf() → core::int*
- return (#C12).{core::List::[]}(ffi::_abi());
+ return (#C12).{core::List::[]}(ffi::_abi()){(core::int) → core::int*};
}
static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/ffi_struct_inline_array.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/ffi_struct_inline_array.dart.weak.transformed.expect
index ee37786..1097538 100644
--- a/pkg/front_end/testcases/nnbd/ffi_struct_inline_array.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/ffi_struct_inline_array.dart.weak.transformed.expect
@@ -19,15 +19,15 @@
@#C9
get a0() → ffi::Array<ffi::Uint8>
return new ffi::Array::_<ffi::Uint8>( block {
- core::Object #typedDataBase = this.{ffi::_Compound::_typedDataBase};
- core::int #offset = (#C11).{core::List::[]}(ffi::_abi());
- } =>#typedDataBase is ffi::Pointer<dynamic> ?{core::Object} ffi::_fromAddress<ffi::Uint8>(#typedDataBase.{ffi::Pointer::address}.{core::num::+}(#offset)) : let typ::TypedData #typedData = _in::unsafeCast<typ::TypedData>(#typedDataBase) in #typedData.{typ::TypedData::buffer}.{typ::ByteBuffer::asUint8List}(#typedData.{typ::TypedData::offsetInBytes}.{core::num::+}(#offset), (#C12).{core::List::[]}(ffi::_abi())), #C3, #C13);
+ core::Object #typedDataBase = this.{ffi::_Compound::_typedDataBase}{core::Object};
+ core::int #offset = (#C11).{core::List::[]}(ffi::_abi()){(core::int) → core::int*};
+ } =>#typedDataBase is ffi::Pointer<dynamic> ?{core::Object} ffi::_fromAddress<ffi::Uint8>(#typedDataBase.{ffi::Pointer::address}{core::int}.{core::num::+}(#offset){(core::num) → core::num}) : let typ::TypedData #typedData = _in::unsafeCast<typ::TypedData>(#typedDataBase) in #typedData.{typ::TypedData::buffer}{typ::ByteBuffer}.{typ::ByteBuffer::asUint8List}(#typedData.{typ::TypedData::offsetInBytes}{core::int}.{core::num::+}(#offset){(core::num) → core::num}, (#C12).{core::List::[]}(ffi::_abi()){(core::int) → core::int*}){([core::int, core::int?]) → typ::Uint8List}, #C3, #C13);
@#C9
set a0(ffi::Array<ffi::Uint8> #externalFieldValue) → void
- return ffi::_memCopy(this.{ffi::_Compound::_typedDataBase}, (#C11).{core::List::[]}(ffi::_abi()), #externalFieldValue.{ffi::Array::_typedDataBase}, #C10, (#C12).{core::List::[]}(ffi::_abi()));
+ return ffi::_memCopy(this.{ffi::_Compound::_typedDataBase}{core::Object}, (#C11).{core::List::[]}(ffi::_abi()){(core::int) → core::int*}, #externalFieldValue.{ffi::Array::_typedDataBase}{core::Object}, #C10, (#C12).{core::List::[]}(ffi::_abi()){(core::int) → core::int*});
@#C15
static get #sizeOf() → core::int*
- return (#C12).{core::List::[]}(ffi::_abi());
+ return (#C12).{core::List::[]}(ffi::_abi()){(core::int) → core::int*};
}
static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/ffi_struct_inline_array_multi_dimensional.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/ffi_struct_inline_array_multi_dimensional.dart.strong.transformed.expect
index 1da473c..6978f30 100644
--- a/pkg/front_end/testcases/nnbd/ffi_struct_inline_array_multi_dimensional.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/ffi_struct_inline_array_multi_dimensional.dart.strong.transformed.expect
@@ -19,39 +19,39 @@
@#C10
get a0() → ffi::Array<ffi::Array<ffi::Array<ffi::Uint8>>>
return new ffi::Array::_<ffi::Array<ffi::Array<ffi::Uint8>>>( block {
- core::Object #typedDataBase = this.{ffi::_Compound::_typedDataBase};
- core::int #offset = (#C12).{core::List::[]}(ffi::_abi());
- } =>#typedDataBase is ffi::Pointer<dynamic> ?{core::Object} ffi::_fromAddress<ffi::Array<ffi::Array<ffi::Uint8>>>(#typedDataBase.{ffi::Pointer::address}.{core::num::+}(#offset)) : let typ::TypedData #typedData = _in::unsafeCast<typ::TypedData>(#typedDataBase) in #typedData.{typ::TypedData::buffer}.{typ::ByteBuffer::asUint8List}(#typedData.{typ::TypedData::offsetInBytes}.{core::num::+}(#offset), (#C13).{core::List::[]}(ffi::_abi())), #C9, #C14);
+ core::Object #typedDataBase = this.{ffi::_Compound::_typedDataBase}{core::Object};
+ core::int #offset = (#C12).{core::List::[]}(ffi::_abi()){(core::int) → core::int*};
+ } =>#typedDataBase is ffi::Pointer<dynamic> ?{core::Object} ffi::_fromAddress<ffi::Array<ffi::Array<ffi::Uint8>>>(#typedDataBase.{ffi::Pointer::address}{core::int}.{core::num::+}(#offset){(core::num) → core::num}) : let typ::TypedData #typedData = _in::unsafeCast<typ::TypedData>(#typedDataBase) in #typedData.{typ::TypedData::buffer}{typ::ByteBuffer}.{typ::ByteBuffer::asUint8List}(#typedData.{typ::TypedData::offsetInBytes}{core::int}.{core::num::+}(#offset){(core::num) → core::num}, (#C13).{core::List::[]}(ffi::_abi()){(core::int) → core::int*}){([core::int, core::int?]) → typ::Uint8List}, #C9, #C14);
@#C10
set a0(ffi::Array<ffi::Array<ffi::Array<ffi::Uint8>>> #externalFieldValue) → void
- return ffi::_memCopy(this.{ffi::_Compound::_typedDataBase}, (#C12).{core::List::[]}(ffi::_abi()), #externalFieldValue.{ffi::Array::_typedDataBase}, #C11, (#C13).{core::List::[]}(ffi::_abi()));
+ return ffi::_memCopy(this.{ffi::_Compound::_typedDataBase}{core::Object}, (#C12).{core::List::[]}(ffi::_abi()){(core::int) → core::int*}, #externalFieldValue.{ffi::Array::_typedDataBase}{core::Object}, #C11, (#C13).{core::List::[]}(ffi::_abi()){(core::int) → core::int*});
@#C16
static get #sizeOf() → core::int*
- return (#C13).{core::List::[]}(ffi::_abi());
+ return (#C13).{core::List::[]}(ffi::_abi()){(core::int) → core::int*};
}
static method main() → dynamic {
- final ffi::Pointer<self::StructInlineArrayMultiDimensional> pointer = (#C17).{ffi::Allocator::allocate}<self::StructInlineArrayMultiDimensional>(self::StructInlineArrayMultiDimensional::#sizeOf);
+ final ffi::Pointer<self::StructInlineArrayMultiDimensional> pointer = (#C17).{ffi::Allocator::allocate}<self::StructInlineArrayMultiDimensional>(self::StructInlineArrayMultiDimensional::#sizeOf){(core::int, {alignment: core::int?}) → ffi::Pointer<self::StructInlineArrayMultiDimensional>};
final self::StructInlineArrayMultiDimensional struct = new self::StructInlineArrayMultiDimensional::#fromTypedDataBase(pointer!);
final ffi::Array<ffi::Array<ffi::Array<ffi::Uint8>>> array = struct.{self::StructInlineArrayMultiDimensional::a0}{ffi::Array<ffi::Array<ffi::Array<ffi::Uint8>>>};
final ffi::Array<ffi::Array<ffi::Uint8>> subArray = block {
ffi::Array<dynamic> #array = array!;
core::int #index = 0!;
- #array.{ffi::Array::_checkIndex}(#index);
+ #array.{ffi::Array::_checkIndex}(#index){(core::int) → dynamic};
core::int #singleElementSize = #C18;
- core::int #elementSize = #singleElementSize.{core::num::*}(#array.{ffi::Array::_nestedDimensionsFlattened});
- core::int #offset = #elementSize.{core::num::*}(#index);
+ core::int #elementSize = #singleElementSize.{core::num::*}(#array.{ffi::Array::_nestedDimensionsFlattened}{core::int}){(core::num) → core::num};
+ core::int #offset = #elementSize.{core::num::*}(#index){(core::num) → core::num};
} =>new ffi::Array::_<ffi::Array<ffi::Uint8>>( block {
- core::Object #typedDataBase = #array.{ffi::Array::_typedDataBase};
+ core::Object #typedDataBase = #array.{ffi::Array::_typedDataBase}{core::Object};
core::int #offset = #offset;
- } =>#typedDataBase is ffi::Pointer<dynamic> ?{core::Object} ffi::_fromAddress<ffi::Array<ffi::Uint8>>(#typedDataBase.{ffi::Pointer::address}.{core::num::+}(#offset)) : let typ::TypedData #typedData = _in::unsafeCast<typ::TypedData>(#typedDataBase) in #typedData.{typ::TypedData::buffer}.{typ::ByteBuffer::asUint8List}(#typedData.{typ::TypedData::offsetInBytes}.{core::num::+}(#offset), #elementSize), #array.{ffi::Array::_nestedDimensionsFirst}, #array.{ffi::Array::_nestedDimensionsRest});
+ } =>#typedDataBase is ffi::Pointer<dynamic> ?{core::Object} ffi::_fromAddress<ffi::Array<ffi::Uint8>>(#typedDataBase.{ffi::Pointer::address}{core::int}.{core::num::+}(#offset){(core::num) → core::num}) : let typ::TypedData #typedData = _in::unsafeCast<typ::TypedData>(#typedDataBase) in #typedData.{typ::TypedData::buffer}{typ::ByteBuffer}.{typ::ByteBuffer::asUint8List}(#typedData.{typ::TypedData::offsetInBytes}{core::int}.{core::num::+}(#offset){(core::num) → core::num}, #elementSize){([core::int, core::int?]) → typ::Uint8List}, #array.{ffi::Array::_nestedDimensionsFirst}{core::int}, #array.{ffi::Array::_nestedDimensionsRest}{core::List<core::int>});
block {
ffi::Array<dynamic> #array = array!;
core::int #index = 1!;
- #array.{ffi::Array::_checkIndex}(#index);
+ #array.{ffi::Array::_checkIndex}(#index){(core::int) → dynamic};
core::int #singleElementSize = #C18;
- core::int #elementSize = #singleElementSize.{core::num::*}(#array.{ffi::Array::_nestedDimensionsFlattened});
- core::int #offset = #elementSize.{core::num::*}(#index);
- } =>ffi::_memCopy(#array.{ffi::Array::_typedDataBase}, #offset, subArray.{ffi::Array::_typedDataBase}, #C11, #elementSize);
+ core::int #elementSize = #singleElementSize.{core::num::*}(#array.{ffi::Array::_nestedDimensionsFlattened}{core::int}){(core::num) → core::num};
+ core::int #offset = #elementSize.{core::num::*}(#index){(core::num) → core::num};
+ } =>ffi::_memCopy(#array.{ffi::Array::_typedDataBase}{core::Object}, #offset, subArray.{ffi::Array::_typedDataBase}{core::Object}, #C11, #elementSize);
(#C17).{ffi::Allocator::free}(pointer){(ffi::Pointer<ffi::NativeType>) → void};
}
diff --git a/pkg/front_end/testcases/nnbd/ffi_struct_inline_array_multi_dimensional.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/ffi_struct_inline_array_multi_dimensional.dart.weak.transformed.expect
index a77431f..3cdfa2e 100644
--- a/pkg/front_end/testcases/nnbd/ffi_struct_inline_array_multi_dimensional.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/ffi_struct_inline_array_multi_dimensional.dart.weak.transformed.expect
@@ -19,39 +19,39 @@
@#C10
get a0() → ffi::Array<ffi::Array<ffi::Array<ffi::Uint8>>>
return new ffi::Array::_<ffi::Array<ffi::Array<ffi::Uint8>>>( block {
- core::Object #typedDataBase = this.{ffi::_Compound::_typedDataBase};
- core::int #offset = (#C12).{core::List::[]}(ffi::_abi());
- } =>#typedDataBase is ffi::Pointer<dynamic> ?{core::Object} ffi::_fromAddress<ffi::Array<ffi::Array<ffi::Uint8>>>(#typedDataBase.{ffi::Pointer::address}.{core::num::+}(#offset)) : let typ::TypedData #typedData = _in::unsafeCast<typ::TypedData>(#typedDataBase) in #typedData.{typ::TypedData::buffer}.{typ::ByteBuffer::asUint8List}(#typedData.{typ::TypedData::offsetInBytes}.{core::num::+}(#offset), (#C13).{core::List::[]}(ffi::_abi())), #C9, #C14);
+ core::Object #typedDataBase = this.{ffi::_Compound::_typedDataBase}{core::Object};
+ core::int #offset = (#C12).{core::List::[]}(ffi::_abi()){(core::int) → core::int*};
+ } =>#typedDataBase is ffi::Pointer<dynamic> ?{core::Object} ffi::_fromAddress<ffi::Array<ffi::Array<ffi::Uint8>>>(#typedDataBase.{ffi::Pointer::address}{core::int}.{core::num::+}(#offset){(core::num) → core::num}) : let typ::TypedData #typedData = _in::unsafeCast<typ::TypedData>(#typedDataBase) in #typedData.{typ::TypedData::buffer}{typ::ByteBuffer}.{typ::ByteBuffer::asUint8List}(#typedData.{typ::TypedData::offsetInBytes}{core::int}.{core::num::+}(#offset){(core::num) → core::num}, (#C13).{core::List::[]}(ffi::_abi()){(core::int) → core::int*}){([core::int, core::int?]) → typ::Uint8List}, #C9, #C14);
@#C10
set a0(ffi::Array<ffi::Array<ffi::Array<ffi::Uint8>>> #externalFieldValue) → void
- return ffi::_memCopy(this.{ffi::_Compound::_typedDataBase}, (#C12).{core::List::[]}(ffi::_abi()), #externalFieldValue.{ffi::Array::_typedDataBase}, #C11, (#C13).{core::List::[]}(ffi::_abi()));
+ return ffi::_memCopy(this.{ffi::_Compound::_typedDataBase}{core::Object}, (#C12).{core::List::[]}(ffi::_abi()){(core::int) → core::int*}, #externalFieldValue.{ffi::Array::_typedDataBase}{core::Object}, #C11, (#C13).{core::List::[]}(ffi::_abi()){(core::int) → core::int*});
@#C16
static get #sizeOf() → core::int*
- return (#C13).{core::List::[]}(ffi::_abi());
+ return (#C13).{core::List::[]}(ffi::_abi()){(core::int) → core::int*};
}
static method main() → dynamic {
- final ffi::Pointer<self::StructInlineArrayMultiDimensional> pointer = (#C17).{ffi::Allocator::allocate}<self::StructInlineArrayMultiDimensional>(self::StructInlineArrayMultiDimensional::#sizeOf);
+ final ffi::Pointer<self::StructInlineArrayMultiDimensional> pointer = (#C17).{ffi::Allocator::allocate}<self::StructInlineArrayMultiDimensional>(self::StructInlineArrayMultiDimensional::#sizeOf){(core::int, {alignment: core::int?}) → ffi::Pointer<self::StructInlineArrayMultiDimensional>};
final self::StructInlineArrayMultiDimensional struct = new self::StructInlineArrayMultiDimensional::#fromTypedDataBase(pointer!);
final ffi::Array<ffi::Array<ffi::Array<ffi::Uint8>>> array = struct.{self::StructInlineArrayMultiDimensional::a0}{ffi::Array<ffi::Array<ffi::Array<ffi::Uint8>>>};
final ffi::Array<ffi::Array<ffi::Uint8>> subArray = block {
ffi::Array<dynamic> #array = array!;
core::int #index = 0!;
- #array.{ffi::Array::_checkIndex}(#index);
+ #array.{ffi::Array::_checkIndex}(#index){(core::int) → dynamic};
core::int #singleElementSize = #C18;
- core::int #elementSize = #singleElementSize.{core::num::*}(#array.{ffi::Array::_nestedDimensionsFlattened});
- core::int #offset = #elementSize.{core::num::*}(#index);
+ core::int #elementSize = #singleElementSize.{core::num::*}(#array.{ffi::Array::_nestedDimensionsFlattened}{core::int}){(core::num) → core::num};
+ core::int #offset = #elementSize.{core::num::*}(#index){(core::num) → core::num};
} =>new ffi::Array::_<ffi::Array<ffi::Uint8>>( block {
- core::Object #typedDataBase = #array.{ffi::Array::_typedDataBase};
+ core::Object #typedDataBase = #array.{ffi::Array::_typedDataBase}{core::Object};
core::int #offset = #offset;
- } =>#typedDataBase is ffi::Pointer<dynamic> ?{core::Object} ffi::_fromAddress<ffi::Array<ffi::Uint8>>(#typedDataBase.{ffi::Pointer::address}.{core::num::+}(#offset)) : let typ::TypedData #typedData = _in::unsafeCast<typ::TypedData>(#typedDataBase) in #typedData.{typ::TypedData::buffer}.{typ::ByteBuffer::asUint8List}(#typedData.{typ::TypedData::offsetInBytes}.{core::num::+}(#offset), #elementSize), #array.{ffi::Array::_nestedDimensionsFirst}, #array.{ffi::Array::_nestedDimensionsRest});
+ } =>#typedDataBase is ffi::Pointer<dynamic> ?{core::Object} ffi::_fromAddress<ffi::Array<ffi::Uint8>>(#typedDataBase.{ffi::Pointer::address}{core::int}.{core::num::+}(#offset){(core::num) → core::num}) : let typ::TypedData #typedData = _in::unsafeCast<typ::TypedData>(#typedDataBase) in #typedData.{typ::TypedData::buffer}{typ::ByteBuffer}.{typ::ByteBuffer::asUint8List}(#typedData.{typ::TypedData::offsetInBytes}{core::int}.{core::num::+}(#offset){(core::num) → core::num}, #elementSize){([core::int, core::int?]) → typ::Uint8List}, #array.{ffi::Array::_nestedDimensionsFirst}{core::int}, #array.{ffi::Array::_nestedDimensionsRest}{core::List<core::int>});
block {
ffi::Array<dynamic> #array = array!;
core::int #index = 1!;
- #array.{ffi::Array::_checkIndex}(#index);
+ #array.{ffi::Array::_checkIndex}(#index){(core::int) → dynamic};
core::int #singleElementSize = #C18;
- core::int #elementSize = #singleElementSize.{core::num::*}(#array.{ffi::Array::_nestedDimensionsFlattened});
- core::int #offset = #elementSize.{core::num::*}(#index);
- } =>ffi::_memCopy(#array.{ffi::Array::_typedDataBase}, #offset, subArray.{ffi::Array::_typedDataBase}, #C11, #elementSize);
+ core::int #elementSize = #singleElementSize.{core::num::*}(#array.{ffi::Array::_nestedDimensionsFlattened}{core::int}){(core::num) → core::num};
+ core::int #offset = #elementSize.{core::num::*}(#index){(core::num) → core::num};
+ } =>ffi::_memCopy(#array.{ffi::Array::_typedDataBase}{core::Object}, #offset, subArray.{ffi::Array::_typedDataBase}{core::Object}, #C11, #elementSize);
(#C17).{ffi::Allocator::free}(pointer){(ffi::Pointer<ffi::NativeType>) → void};
}
diff --git a/pkg/meta/CHANGELOG.md b/pkg/meta/CHANGELOG.md
index 752be0d5..9a608f0 100644
--- a/pkg/meta/CHANGELOG.md
+++ b/pkg/meta/CHANGELOG.md
@@ -1,3 +1,11 @@
+## 1.4.0
+
+* Introduce `TargetKind.topLevelVariable` that indicates that an annotation
+ is valid on any top-level variable declaration.
+* Introduce `@useResult` to annotate methods, fields, or getters that
+ return values that should be used - stored, passed as arguments, etc.
+* Updates for documentation.
+
## 1.3.0
* Stable release for null safety.
diff --git a/pkg/meta/pubspec.yaml b/pkg/meta/pubspec.yaml
index efe6370..acf4559 100644
--- a/pkg/meta/pubspec.yaml
+++ b/pkg/meta/pubspec.yaml
@@ -1,5 +1,5 @@
name: meta
-version: 1.3.0
+version: 1.4.0
homepage: https://github.com/dart-lang/sdk/tree/master/pkg/meta
description: >
This library contains the declarations of annotations that developers can use
diff --git a/pkg/vm/lib/transformations/ffi.dart b/pkg/vm/lib/transformations/ffi.dart
index 5225286..bc29a1a 100644
--- a/pkg/vm/lib/transformations/ffi.dart
+++ b/pkg/vm/lib/transformations/ffi.dart
@@ -15,6 +15,7 @@
import 'package:kernel/library_index.dart' show LibraryIndex;
import 'package:kernel/reference_from_index.dart';
import 'package:kernel/target/targets.dart' show DiagnosticReporter;
+import 'package:kernel/type_algebra.dart' show Substitution;
import 'package:kernel/type_environment.dart'
show TypeEnvironment, SubtypeCheckMode;
@@ -563,25 +564,30 @@
return NativeType.values[index];
}
+ InterfaceType _listOfIntType() => InterfaceType(
+ listClass, Nullability.legacy, [coreTypes.intLegacyRawType]);
+
ConstantExpression intListConstantExpression(List<int> values) =>
ConstantExpression(
- ListConstant(InterfaceType(intClass, Nullability.legacy),
+ ListConstant(coreTypes.intLegacyRawType,
[for (var v in values) IntConstant(v)]),
- InterfaceType(listClass, Nullability.legacy,
- [InterfaceType(intClass, Nullability.legacy)]));
+ _listOfIntType());
/// Expression that queries VM internals at runtime to figure out on which ABI
/// we are.
Expression runtimeBranchOnLayout(Map<Abi, int> values) {
- return MethodInvocation(
+ return InstanceInvocation(
+ InstanceAccessKind.Instance,
intListConstantExpression([
values[Abi.wordSize64]!,
values[Abi.wordSize32Align32]!,
values[Abi.wordSize32Align64]!
]),
- Name("[]"),
+ listElementAt.name,
Arguments([StaticInvocation(abiMethod, Arguments([]))]),
- listElementAt);
+ interfaceTarget: listElementAt,
+ functionType: Substitution.fromInterfaceType(_listOfIntType())
+ .substituteType(listElementAt.getterType) as FunctionType);
}
/// Generates an expression that returns a new `Pointer<dartType>` offset
@@ -597,12 +603,13 @@
StaticInvocation(
fromAddressInternal,
Arguments([
- MethodInvocation(
- PropertyGet(pointer, addressGetter.name, addressGetter)
+ add(
+ InstanceGet(
+ InstanceAccessKind.Instance, pointer, addressGetter.name,
+ interfaceTarget: addressGetter,
+ resultType: addressGetter.getterType)
..fileOffset = fileOffset,
- numAddition.name,
- Arguments([offset]),
- numAddition)
+ offset)
], types: [
dartType
]))
@@ -625,24 +632,28 @@
..fileOffset = fileOffset;
return Let(
typedDataVar,
- MethodInvocation(
- PropertyGet(VariableGet(typedDataVar), typedDataBufferGetter.name,
- typedDataBufferGetter)
+ InstanceInvocation(
+ InstanceAccessKind.Instance,
+ InstanceGet(InstanceAccessKind.Instance, VariableGet(typedDataVar),
+ typedDataBufferGetter.name,
+ interfaceTarget: typedDataBufferGetter,
+ resultType: typedDataBufferGetter.getterType)
..fileOffset = fileOffset,
byteBufferAsUint8List.name,
Arguments([
- MethodInvocation(
- PropertyGet(
+ add(
+ InstanceGet(
+ InstanceAccessKind.Instance,
VariableGet(typedDataVar),
typedDataOffsetInBytesGetter.name,
- typedDataOffsetInBytesGetter)
+ interfaceTarget: typedDataOffsetInBytesGetter,
+ resultType: typedDataOffsetInBytesGetter.getterType)
..fileOffset = fileOffset,
- numAddition.name,
- Arguments([offset]),
- numAddition),
+ offset),
length
]),
- byteBufferAsUint8List));
+ interfaceTarget: byteBufferAsUint8List,
+ functionType: byteBufferAsUint8List.getterType as FunctionType));
}
/// Generates an expression that returns a new `TypedDataBase` offset
@@ -789,21 +800,34 @@
Expression getCompoundTypedDataBaseField(
Expression receiver, int fileOffset) {
- return PropertyGet(
- receiver, compoundTypedDataBaseField.name, compoundTypedDataBaseField)
+ return InstanceGet(
+ InstanceAccessKind.Instance, receiver, compoundTypedDataBaseField.name,
+ interfaceTarget: compoundTypedDataBaseField,
+ resultType: compoundTypedDataBaseField.type)
..fileOffset = fileOffset;
}
Expression getArrayTypedDataBaseField(Expression receiver,
[int fileOffset = TreeNode.noOffset]) {
- return PropertyGet(
- receiver, arrayTypedDataBaseField.name, arrayTypedDataBaseField)
+ return InstanceGet(
+ InstanceAccessKind.Instance, receiver, arrayTypedDataBaseField.name,
+ interfaceTarget: arrayTypedDataBaseField,
+ resultType: arrayTypedDataBaseField.type)
..fileOffset = fileOffset;
}
+ Expression add(Expression a, Expression b) {
+ return InstanceInvocation(
+ InstanceAccessKind.Instance, a, numAddition.name, Arguments([b]),
+ interfaceTarget: numAddition,
+ functionType: numAddition.getterType as FunctionType);
+ }
+
Expression multiply(Expression a, Expression b) {
- return MethodInvocation(
- a, numMultiplication.name, Arguments([b]), numMultiplication);
+ return InstanceInvocation(
+ InstanceAccessKind.Instance, a, numMultiplication.name, Arguments([b]),
+ interfaceTarget: numMultiplication,
+ functionType: numMultiplication.getterType as FunctionType);
}
}
diff --git a/pkg/vm/lib/transformations/ffi_definitions.dart b/pkg/vm/lib/transformations/ffi_definitions.dart
index d3c8f1f..62e13b7 100644
--- a/pkg/vm/lib/transformations/ffi_definitions.dart
+++ b/pkg/vm/lib/transformations/ffi_definitions.dart
@@ -1216,8 +1216,10 @@
transformer.getCompoundTypedDataBaseField(
ThisExpression(), fileOffset),
transformer.runtimeBranchOnLayout(offsets),
- PropertyGet(VariableGet(argument), transformer.addressGetter.name,
- transformer.addressGetter)
+ InstanceGet(InstanceAccessKind.Instance, VariableGet(argument),
+ transformer.addressGetter.name,
+ interfaceTarget: transformer.addressGetter,
+ resultType: transformer.addressGetter.getterType)
..fileOffset = fileOffset
]))
..fileOffset = fileOffset);
diff --git a/pkg/vm/lib/transformations/ffi_use_sites.dart b/pkg/vm/lib/transformations/ffi_use_sites.dart
index 6917fd1..1754be3 100644
--- a/pkg/vm/lib/transformations/ffi_use_sites.dart
+++ b/pkg/vm/lib/transformations/ffi_use_sites.dart
@@ -25,6 +25,7 @@
import 'package:kernel/library_index.dart' show LibraryIndex;
import 'package:kernel/reference_from_index.dart';
import 'package:kernel/target/targets.dart' show DiagnosticReporter;
+import 'package:kernel/type_algebra.dart' show Substitution;
import 'package:kernel/type_environment.dart';
import 'ffi.dart'
@@ -341,11 +342,18 @@
if (node.arguments.positional.length == 2) {
sizeInBytes = multiply(node.arguments.positional[1], sizeInBytes);
}
- return MethodInvocation(
+ final FunctionType allocateFunctionType =
+ allocatorAllocateMethod.getterType as FunctionType;
+ return InstanceInvocation(
+ InstanceAccessKind.Instance,
node.arguments.positional[0],
allocatorAllocateMethod.name,
Arguments([sizeInBytes], types: node.arguments.types),
- allocatorAllocateMethod);
+ interfaceTarget: allocatorAllocateMethod,
+ functionType: Substitution.fromPairs(
+ allocateFunctionType.typeParameters, node.arguments.types)
+ .substituteType(allocateFunctionType
+ .withoutTypeParameters) as FunctionType);
}
}
} on _FfiStaticTypeError {
@@ -428,17 +436,24 @@
final DartType nativeSignature = node.arguments.types[0];
final DartType dartSignature = node.arguments.types[1];
- final Arguments lookupArgs = Arguments([
- node.arguments.positional[1]
- ], types: [
+ final List<DartType> lookupTypeArgs = [
InterfaceType(nativeFunctionClass, Nullability.legacy, [nativeSignature])
- ]);
+ ];
+ final Arguments lookupArgs =
+ Arguments([node.arguments.positional[1]], types: lookupTypeArgs);
+ final FunctionType lookupFunctionType =
+ libraryLookupMethod.getterType as FunctionType;
- final Expression lookupResult = MethodInvocation(
+ final Expression lookupResult = InstanceInvocation(
+ InstanceAccessKind.Instance,
node.arguments.positional[0],
- Name("lookup"),
+ libraryLookupMethod.name,
lookupArgs,
- libraryLookupMethod);
+ interfaceTarget: libraryLookupMethod,
+ functionType: Substitution.fromPairs(
+ lookupFunctionType.typeParameters, lookupTypeArgs)
+ .substituteType(lookupFunctionType.withoutTypeParameters)
+ as FunctionType);
bool isLeaf = _getIsLeafBoolean(node);
if (isLeaf == null) {
@@ -496,13 +511,17 @@
.firstWhere((c) => c.name == Name("#fromTypedDataBase"));
Expression pointer = NullCheck(node.arguments.positional[0]);
if (node.arguments.positional.length == 2) {
- pointer = MethodInvocation(
+ pointer = InstanceInvocation(
+ InstanceAccessKind.Instance,
pointer,
offsetByMethod.name,
Arguments([
multiply(node.arguments.positional[1], _inlineSizeOf(dartType))
]),
- offsetByMethod);
+ interfaceTarget: offsetByMethod,
+ functionType:
+ Substitution.fromPairs(pointerClass.typeParameters, [dartType])
+ .substituteType(offsetByMethod.getterType) as FunctionType);
}
return ConstructorInvocation(constructor, Arguments([pointer]));
}
@@ -585,10 +604,10 @@
final elementSizeVar = VariableDeclaration("#elementSize",
initializer: multiply(
VariableGet(singleElementSizeVar),
- PropertyGet(
- VariableGet(arrayVar),
+ InstanceGet(InstanceAccessKind.Instance, VariableGet(arrayVar),
arrayNestedDimensionsFlattened.name,
- arrayNestedDimensionsFlattened)),
+ interfaceTarget: arrayNestedDimensionsFlattened,
+ resultType: arrayNestedDimensionsFlattened.type)),
type: coreTypes.intNonNullableRawType)
..fileOffset = node.fileOffset;
final offsetVar = VariableDeclaration("#offset",
@@ -600,11 +619,13 @@
final checkIndexAndLocalVars = Block([
arrayVar,
indexVar,
- ExpressionStatement(MethodInvocation(
+ ExpressionStatement(InstanceInvocation(
+ InstanceAccessKind.Instance,
VariableGet(arrayVar),
arrayCheckIndex.name,
Arguments([VariableGet(indexVar)]),
- arrayCheckIndex)),
+ interfaceTarget: arrayCheckIndex,
+ functionType: arrayCheckIndex.getterType as FunctionType)),
singleElementSizeVar,
elementSizeVar,
offsetVar
@@ -623,12 +644,14 @@
VariableGet(elementSizeVar),
dartType,
node.fileOffset),
- PropertyGet(
- VariableGet(arrayVar),
+ InstanceGet(InstanceAccessKind.Instance, VariableGet(arrayVar),
arrayNestedDimensionsFirst.name,
- arrayNestedDimensionsFirst),
- PropertyGet(VariableGet(arrayVar),
- arrayNestedDimensionsRest.name, arrayNestedDimensionsRest)
+ interfaceTarget: arrayNestedDimensionsFirst,
+ resultType: arrayNestedDimensionsFirst.type),
+ InstanceGet(InstanceAccessKind.Instance, VariableGet(arrayVar),
+ arrayNestedDimensionsRest.name,
+ interfaceTarget: arrayNestedDimensionsRest,
+ resultType: arrayNestedDimensionsRest.type)
], types: [
dartType
])));
@@ -667,12 +690,17 @@
Expression inlineSizeOf = _inlineSizeOf(nativeType);
if (inlineSizeOf != null) {
// Generates `receiver.offsetBy(inlineSizeOfExpression)`.
- return MethodInvocation(
+ return InstanceInvocation(
+ InstanceAccessKind.Instance,
node.receiver,
offsetByMethod.name,
Arguments(
[multiply(node.arguments.positional.single, inlineSizeOf)]),
- offsetByMethod);
+ interfaceTarget: offsetByMethod,
+ functionType:
+ Substitution.fromInterfaceType(pointerType as InterfaceType)
+ .substituteType(offsetByMethod.getterType)
+ as FunctionType);
}
}
} on _FfiStaticTypeError {
@@ -700,12 +728,17 @@
Expression inlineSizeOf = _inlineSizeOf(nativeType);
if (inlineSizeOf != null) {
// Generates `receiver.offsetBy(inlineSizeOfExpression)`.
- return MethodInvocation(
+ return InstanceInvocation(
+ InstanceAccessKind.Instance,
node.receiver,
offsetByMethod.name,
Arguments(
[multiply(node.arguments.positional.single, inlineSizeOf)]),
- offsetByMethod);
+ interfaceTarget: offsetByMethod,
+ functionType:
+ Substitution.fromInterfaceType(pointerType as InterfaceType)
+ .substituteType(offsetByMethod.getterType)
+ as FunctionType);
}
}
} on _FfiStaticTypeError {
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/ffi_struct_constructors.dart.expect b/pkg/vm/testcases/transformations/type_flow/transformer/ffi_struct_constructors.dart.expect
index 0e9d6a5..e764dac 100644
--- a/pkg/vm/testcases/transformations/type_flow/transformer/ffi_struct_constructors.dart.expect
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/ffi_struct_constructors.dart.expect
@@ -41,9 +41,9 @@
;
[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,getterSelectorId:1] get nested() → self::Struct12*
return new self::Struct12::#fromTypedDataBase( block {
- core::Object #typedDataBase = [@vm.direct-call.metadata=dart.ffi::_Compound._typedDataBase] this.{ffi::_Compound::_typedDataBase};
- core::int #offset = (#C12).{core::List::[]}(ffi::_abi());
- } =>#typedDataBase is ffi::Pointer<dynamic> ?{core::Object} [@vm.inferred-type.metadata=dart.ffi::Pointer?] ffi::_fromAddress<self::Struct12*>([@vm.direct-call.metadata=dart.core::_IntegerImplementation.+??] [@vm.inferred-type.metadata=int (skip check)] [@vm.direct-call.metadata=dart.ffi::Pointer.address] [@vm.inferred-type.metadata=int?] #typedDataBase.{ffi::Pointer::address}.{core::num::+}(#offset)) : let typ::TypedData #typedData = _in::unsafeCast<typ::TypedData>(#typedDataBase) in [@vm.direct-call.metadata=dart.typed_data::_ByteBuffer.asUint8List] [@vm.inferred-type.metadata=dart.typed_data::_Uint8ArrayView (skip check)] [@vm.inferred-type.metadata=dart.typed_data::_ByteBuffer] #typedData.{typ::TypedData::buffer}.{typ::ByteBuffer::asUint8List}([@vm.direct-call.metadata=dart.core::_IntegerImplementation.+] [@vm.inferred-type.metadata=int (skip check)] [@vm.inferred-type.metadata=dart.core::_Smi] #typedData.{typ::TypedData::offsetInBytes}.{core::num::+}(#offset), (#C15).{core::List::[]}(ffi::_abi())));
+ core::Object #typedDataBase = [@vm.direct-call.metadata=dart.ffi::_Compound._typedDataBase] this.{ffi::_Compound::_typedDataBase}{core::Object};
+ core::int #offset = (#C12).{core::List::[]}(ffi::_abi()){(core::int) → core::int*};
+ } =>#typedDataBase is ffi::Pointer<dynamic> ?{core::Object} [@vm.inferred-type.metadata=dart.ffi::Pointer?] ffi::_fromAddress<self::Struct12*>([@vm.direct-call.metadata=dart.core::_IntegerImplementation.+??] [@vm.inferred-type.metadata=int (skip check)] [@vm.direct-call.metadata=dart.ffi::Pointer.address] [@vm.inferred-type.metadata=int?] #typedDataBase.{ffi::Pointer::address}{core::int}.{core::num::+}(#offset){(core::num) → core::num}) : let typ::TypedData #typedData = _in::unsafeCast<typ::TypedData>(#typedDataBase) in [@vm.direct-call.metadata=dart.typed_data::_ByteBuffer.asUint8List] [@vm.inferred-type.metadata=dart.typed_data::_Uint8ArrayView (skip check)] [@vm.inferred-type.metadata=dart.typed_data::_ByteBuffer] #typedData.{typ::TypedData::buffer}{typ::ByteBuffer}.{typ::ByteBuffer::asUint8List}([@vm.direct-call.metadata=dart.core::_IntegerImplementation.+] [@vm.inferred-type.metadata=int (skip check)] [@vm.inferred-type.metadata=dart.core::_Smi] #typedData.{typ::TypedData::offsetInBytes}{core::int}.{core::num::+}(#offset){(core::num) → core::num}, (#C15).{core::List::[]}(ffi::_abi()){(core::int) → core::int*}){([core::int, core::int?]) → typ::Uint8List});
}
@#C6
class Struct12 extends ffi::Struct {
@@ -67,7 +67,7 @@
final ffi::DynamicLibrary* dylib = [@vm.inferred-type.metadata=dart.ffi::DynamicLibrary?] ffi::DynamicLibrary::executable();
final () →* self::Struct1* function1 = block {
_in::_nativeEffect(new self::Struct1::#fromTypedDataBase([@vm.inferred-type.metadata=dart.typed_data::_Uint8List] typ::Uint8List::•(#C18)));
- } =>ffi::_asFunctionInternal<() →* self::Struct1*, () →* self::Struct1*>([@vm.direct-call.metadata=dart.ffi::DynamicLibrary.lookup??] [@vm.inferred-type.metadata=dart.ffi::Pointer? (skip check)] dylib.{ffi::DynamicLibrary::lookup}<ffi::NativeFunction<() →* self::Struct1*>*>("function1"), false);
+ } =>ffi::_asFunctionInternal<() →* self::Struct1*, () →* self::Struct1*>([@vm.direct-call.metadata=dart.ffi::DynamicLibrary.lookup??] [@vm.inferred-type.metadata=dart.ffi::Pointer? (skip check)] dylib.{ffi::DynamicLibrary::lookup}<ffi::NativeFunction<() →* self::Struct1*>*>("function1"){(core::String) → ffi::Pointer<ffi::NativeFunction<() →* self::Struct1*>*>}, false);
final self::Struct1* struct1 = [@vm.call-site-attributes.metadata=receiverType:#lib::Struct1* Function()*] function1(){() →* self::Struct1*};
core::print(struct1);
}
@@ -90,7 +90,7 @@
}
static method testLookupFunctionArgument() → void {
final ffi::DynamicLibrary* dylib = [@vm.inferred-type.metadata=dart.ffi::DynamicLibrary?] ffi::DynamicLibrary::executable();
- final (self::Struct5*) →* void function5 = [@vm.inferred-type.metadata=dart.core::_Closure?] ffi::_asFunctionInternal<(self::Struct5*) →* void, (self::Struct5*) →* ffi::Void*>([@vm.direct-call.metadata=dart.ffi::DynamicLibrary.lookup??] [@vm.inferred-type.metadata=dart.ffi::Pointer? (skip check)] dylib.{ffi::DynamicLibrary::lookup}<ffi::NativeFunction<(self::Struct5*) →* ffi::Void*>*>("function5"), false);
+ final (self::Struct5*) →* void function5 = [@vm.inferred-type.metadata=dart.core::_Closure?] ffi::_asFunctionInternal<(self::Struct5*) →* void, (self::Struct5*) →* ffi::Void*>([@vm.direct-call.metadata=dart.ffi::DynamicLibrary.lookup??] [@vm.inferred-type.metadata=dart.ffi::Pointer? (skip check)] dylib.{ffi::DynamicLibrary::lookup}<ffi::NativeFunction<(self::Struct5*) →* ffi::Void*>*>("function5"){(core::String) → ffi::Pointer<ffi::NativeFunction<(self::Struct5*) →* ffi::Void*>*>}, false);
core::print(function5);
}
static method testAsFunctionArgument() → void {
diff --git a/runtime/bin/BUILD.gn b/runtime/bin/BUILD.gn
index 1bc8225..8ab6fca 100644
--- a/runtime/bin/BUILD.gn
+++ b/runtime/bin/BUILD.gn
@@ -214,6 +214,7 @@
"Rpcrt4.lib",
"shlwapi.lib",
"winmm.lib",
+ "bcrypt.lib",
]
if (target_os != "winuwp") {
libs += [ "psapi.lib" ]
@@ -784,6 +785,7 @@
"Rpcrt4.lib",
"shlwapi.lib",
"winmm.lib",
+ "bcrypt.lib",
]
}
}
@@ -958,6 +960,7 @@
"Rpcrt4.lib",
"shlwapi.lib",
"winmm.lib",
+ "bcrypt.lib",
]
}
}
diff --git a/runtime/bin/crypto_win.cc b/runtime/bin/crypto_win.cc
index fd68802..23d52ef 100644
--- a/runtime/bin/crypto_win.cc
+++ b/runtime/bin/crypto_win.cc
@@ -2,31 +2,18 @@
// 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.
-#ifndef _CRT_RAND_S
-#define _CRT_RAND_S
-#endif
-
#include "platform/globals.h"
#if defined(HOST_OS_WINDOWS)
+#include <bcrypt.h>
#include "bin/crypto.h"
namespace dart {
namespace bin {
bool Crypto::GetRandomBytes(intptr_t count, uint8_t* buffer) {
- uint32_t num;
- intptr_t read = 0;
- while (read < count) {
- if (rand_s(&num) != 0) {
- return false;
- }
- for (int i = 0; i < 4 && read < count; i++) {
- buffer[read] = num >> (i * 8);
- read++;
- }
- }
- return true;
+ return SUCCEEDED(BCryptGenRandom(NULL, buffer, (ULONG)count,
+ BCRYPT_USE_SYSTEM_PREFERRED_RNG));
}
} // namespace bin
diff --git a/tests/language/regress/regress34091_test.dart b/tests/language/regress/regress34091.dart
similarity index 100%
rename from tests/language/regress/regress34091_test.dart
rename to tests/language/regress/regress34091.dart
diff --git a/tests/language_2/regress/regress34091_test.dart b/tests/language_2/regress/regress34091.dart
similarity index 100%
rename from tests/language_2/regress/regress34091_test.dart
rename to tests/language_2/regress/regress34091.dart
diff --git a/tools/VERSION b/tools/VERSION
index f1b398f..762f723 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -27,5 +27,5 @@
MAJOR 2
MINOR 14
PATCH 0
-PRERELEASE 153
+PRERELEASE 154
PRERELEASE_PATCH 0
\ No newline at end of file