Version 2.19.0-1.0.dev
Merge commit 'cbadb50b95aae022f31f44484e10a40285f39007' into 'dev'
diff --git a/pkg/analyzer/lib/dart/element/element.dart b/pkg/analyzer/lib/dart/element/element.dart
index efcf572..57556ad 100644
--- a/pkg/analyzer/lib/dart/element/element.dart
+++ b/pkg/analyzer/lib/dart/element/element.dart
@@ -56,12 +56,19 @@
///
/// Clients may not extend, implement or mix-in this class.
@experimental
-abstract class AugmentationImportElement implements UriReferencedElement {
- /// Returns the augmentation library that this element imports.
- LibraryAugmentationElement get augmentation;
-
+abstract class AugmentationImportElement implements _ExistingElement {
@override
LibraryOrAugmentationElement get enclosingElement;
+
+ /// Returns the [LibraryAugmentationElement], if [uri] is a
+ /// [DirectiveUriWithAugmentation].
+ LibraryAugmentationElement? get importedAugmentation;
+
+ /// The offset of the `import` keyword.
+ int get importKeywordOffset;
+
+ /// The interpretation of the URI specified in the directive.
+ DirectiveUri get uri;
}
/// An element that represents a class or a mixin. The class can be defined by
@@ -514,6 +521,13 @@
/// Clients may not extend, implement or mix-in this class.
abstract class DirectiveUri {}
+/// [DirectiveUriWithSource] that references a [LibraryAugmentationElement].
+///
+/// Clients may not extend, implement or mix-in this class.
+abstract class DirectiveUriWithAugmentation extends DirectiveUriWithSource {
+ LibraryAugmentationElement get augmentation;
+}
+
/// [DirectiveUriWithSource] that references a [LibraryElement].
///
/// Clients may not extend, implement or mix-in this class.
diff --git a/pkg/analyzer/lib/src/dart/analysis/driver.dart b/pkg/analyzer/lib/src/dart/analysis/driver.dart
index 79b5ba1..6a3129d 100644
--- a/pkg/analyzer/lib/src/dart/analysis/driver.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/driver.dart
@@ -85,7 +85,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 = 231;
+ static const int DATA_VERSION = 232;
/// The number of exception contexts allowed to write. Once this field is
/// zero, we stop writing any new exception contexts in this process.
diff --git a/pkg/analyzer/lib/src/dart/analysis/file_state.dart b/pkg/analyzer/lib/src/dart/analysis/file_state.dart
index 5120f96..f370099 100644
--- a/pkg/analyzer/lib/src/dart/analysis/file_state.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/file_state.dart
@@ -104,6 +104,17 @@
}
@override
+ void dispose() {
+ super.dispose();
+ invalidateLibraryCycle();
+ }
+
+ @override
+ void invalidateLibraryCycle() {
+ augmented?.invalidateLibraryCycle();
+ }
+
+ @override
bool isAugmentationOf(LibraryOrAugmentationFileKind container) {
return uriFile == container.file;
}
@@ -1688,7 +1699,7 @@
FileState get importedFile => uri.file;
@override
- Source? get importedSource => importedFile.source;
+ Source get importedSource => importedFile.source;
@override
void dispose() {
@@ -1839,7 +1850,23 @@
}
}
- // TODO(scheglov) Include augmentations.
+ // TODO(scheglov) Test how augmentations affect signatures.
+ void visitAugmentations(LibraryOrAugmentationFileKind kind) {
+ if (kind is AugmentationFileStateKind) {
+ files.add(kind.file);
+ }
+ for (final import in kind.augmentations) {
+ if (import is ImportAugmentationDirectiveWithFile) {
+ final augmentation = import.importedAugmentation;
+ if (augmentation != null) {
+ visitAugmentations(augmentation);
+ }
+ }
+ }
+ }
+
+ visitAugmentations(this);
+
return files;
}
@@ -1922,6 +1949,7 @@
_libraryCycle = cycle;
}
+ @override
void invalidateLibraryCycle() {
_libraryCycle?.invalidate();
_libraryCycle = null;
@@ -2084,6 +2112,9 @@
}
return false;
}
+
+ /// Invalidates the containing [LibraryFileStateKind] cycle.
+ void invalidateLibraryCycle() {}
}
class NamespaceDirectiveUris {
diff --git a/pkg/analyzer/lib/src/dart/ast/ast.dart b/pkg/analyzer/lib/src/dart/ast/ast.dart
index 56ef705..fe4ec68 100644
--- a/pkg/analyzer/lib/src/dart/ast/ast.dart
+++ b/pkg/analyzer/lib/src/dart/ast/ast.dart
@@ -919,7 +919,7 @@
@override
LibraryAugmentationElement? get uriElement {
- return element?.augmentation;
+ return element?.importedAugmentation;
}
@override
diff --git a/pkg/analyzer/lib/src/dart/element/element.dart b/pkg/analyzer/lib/src/dart/element/element.dart
index 14175b6..4c718a3 100644
--- a/pkg/analyzer/lib/src/dart/element/element.dart
+++ b/pkg/analyzer/lib/src/dart/element/element.dart
@@ -526,16 +526,18 @@
}
}
-/// A concrete implementation of a [AugmentationImportElement].
-class AugmentationImportElementImpl extends UriReferencedElementImpl
+class AugmentationImportElementImpl extends _ExistingElementImpl
implements AugmentationImportElement {
@override
- final LibraryAugmentationElement augmentation;
+ final int importKeywordOffset;
+
+ @override
+ final DirectiveUri uri;
AugmentationImportElementImpl({
- required this.augmentation,
- required int nameOffset,
- }) : super(null, nameOffset);
+ required this.importKeywordOffset,
+ required this.uri,
+ }) : super(null, importKeywordOffset);
@override
LibraryOrAugmentationElementImpl get enclosingElement {
@@ -543,6 +545,15 @@
}
@override
+ LibraryAugmentationElementImpl? get importedAugmentation {
+ final uri = this.uri;
+ if (uri is DirectiveUriWithAugmentationImpl) {
+ return uri.augmentation;
+ }
+ return null;
+ }
+
+ @override
ElementKind get kind => ElementKind.AUGMENTATION_IMPORT;
@override
@@ -1671,6 +1682,19 @@
class DirectiveUriImpl implements DirectiveUri {}
+class DirectiveUriWithAugmentationImpl extends DirectiveUriWithSourceImpl
+ implements DirectiveUriWithAugmentation {
+ @override
+ late LibraryAugmentationElementImpl augmentation;
+
+ DirectiveUriWithAugmentationImpl({
+ required super.relativeUriString,
+ required super.relativeUri,
+ required super.source,
+ required this.augmentation,
+ });
+}
+
class DirectiveUriWithLibraryImpl extends DirectiveUriWithSourceImpl
implements DirectiveUriWithLibrary {
@override
@@ -2619,7 +2643,11 @@
E? thisOrAncestorOfType<E extends Element>() {
Element? element = this;
while (element != null && element is! E) {
- element = element.enclosingElement;
+ if (element is CompilationUnitElement) {
+ element = element.enclosingElement2;
+ } else {
+ element = element.enclosingElement;
+ }
}
return element as E?;
}
@@ -2697,7 +2725,12 @@
Element? ancestor = element;
while (ancestor != null) {
components.insert(0, (ancestor as ElementImpl).identifier);
- ancestor = ancestor.enclosingElement;
+ if (ancestor is CompilationUnitElementImpl) {
+ // TODO(scheglov) switch everything to `enclosingElement2`.
+ ancestor = ancestor.enclosingElement2;
+ } else {
+ ancestor = ancestor.enclosingElement;
+ }
}
_components = components;
}
@@ -3887,6 +3920,8 @@
@override
final LibraryOrAugmentationElementImpl augmented;
+ LibraryElementLinkedData? linkedData;
+
LibraryAugmentationElementImpl({
required this.augmented,
required super.nameOffset,
@@ -3897,15 +3932,19 @@
List<ExtensionElement> get accessibleExtensions => throw UnimplementedError();
@override
- // TODO: implement exports2
- List<ExportElement2> get exports2 => throw UnimplementedError();
+ List<ExportElement2> get exports2 {
+ linkedData?.read(this);
+ return _exports2;
+ }
@override
FeatureSet get featureSet => augmented.featureSet;
@override
- // TODO: implement imports2
- List<ImportElement2> get imports2 => throw UnimplementedError();
+ List<ImportElement2> get imports2 {
+ linkedData?.read(this);
+ return _imports2;
+ }
@override
bool get isNonNullableByDefault => augmented.isNonNullableByDefault;
@@ -4241,9 +4280,30 @@
return [
_definingCompilationUnit,
..._partUnits,
+ ..._augmentationUnits,
];
}
+ List<CompilationUnitElementImpl> get _augmentationUnits {
+ final result = <CompilationUnitElementImpl>[];
+
+ void visitAugmentations(LibraryOrAugmentationElementImpl container) {
+ if (container is LibraryAugmentationElementImpl) {
+ result.add(container.definingCompilationUnit);
+ }
+ for (final import in container.augmentationImports) {
+ import as AugmentationImportElementImpl;
+ final augmentation = import.importedAugmentation;
+ if (augmentation != null) {
+ visitAugmentations(augmentation);
+ }
+ }
+ }
+
+ visitAugmentations(this);
+ return result;
+ }
+
List<CompilationUnitElement> get _partUnits {
return parts2
.map((e) => e.uri)
@@ -4436,7 +4496,9 @@
set augmentationImports(List<AugmentationImportElement> imports) {
for (final importElement in imports) {
- (importElement as AugmentationImportElementImpl).enclosingElement = this;
+ importElement as AugmentationImportElementImpl;
+ importElement.enclosingElement = this;
+ importElement.importedAugmentation?.enclosingElement = this;
}
_augmentationImports = imports;
}
diff --git a/pkg/analyzer/lib/src/summary2/ast_binary_tag.dart b/pkg/analyzer/lib/src/summary2/ast_binary_tag.dart
index a59dff8..95d41a9 100644
--- a/pkg/analyzer/lib/src/summary2/ast_binary_tag.dart
+++ b/pkg/analyzer/lib/src/summary2/ast_binary_tag.dart
@@ -8,6 +8,7 @@
}
enum DirectiveUriKind {
+ withAugmentation,
withLibrary,
withUnit,
withSource,
diff --git a/pkg/analyzer/lib/src/summary2/bundle_reader.dart b/pkg/analyzer/lib/src/summary2/bundle_reader.dart
index 88a738e..f0c804e 100644
--- a/pkg/analyzer/lib/src/summary2/bundle_reader.dart
+++ b/pkg/analyzer/lib/src/summary2/bundle_reader.dart
@@ -461,6 +461,11 @@
libraryElement: libraryElement,
);
});
+ libraryElement.augmentationImports = _reader.readTypedList(() {
+ return _readAugmentationImportElement(
+ libraryElement: libraryElement,
+ );
+ });
LibraryElementFlags.read(_reader, libraryElement);
for (final import in libraryElement.imports2) {
@@ -509,6 +514,38 @@
}
}
+ LibraryAugmentationElementImpl _readAugmentationElement({
+ required LibraryOrAugmentationElementImpl augmented,
+ required LibraryElementImpl libraryElement,
+ required Source unitSource,
+ }) {
+ final definingUnit = _readUnitElement(
+ libraryElement: libraryElement,
+ librarySource: unitSource,
+ unitSource: unitSource,
+ );
+
+ final augmentation = LibraryAugmentationElementImpl(
+ augmented: augmented,
+ nameOffset: -1, // TODO(scheglov) implement, test
+ );
+ augmentation.definingCompilationUnit = definingUnit;
+
+ return augmentation;
+ }
+
+ AugmentationImportElementImpl _readAugmentationImportElement({
+ required LibraryElementImpl libraryElement,
+ }) {
+ final uri = _readDirectiveUri(
+ libraryElement: libraryElement,
+ );
+ return AugmentationImportElementImpl(
+ importKeywordOffset: -1, // TODO(scheglov) implement, test
+ uri: uri,
+ );
+ }
+
ClassElementImpl _readClassElement(
CompilationUnitElementImpl unitElement,
Reference unitReference,
@@ -639,6 +676,26 @@
final kindIndex = _reader.readByte();
final kind = DirectiveUriKind.values[kindIndex];
switch (kind) {
+ case DirectiveUriKind.withAugmentation:
+ final parent = readWithSource();
+ final augmentation = _readAugmentationElement(
+ augmented: libraryElement,
+ libraryElement: libraryElement,
+ unitSource: parent.source,
+ );
+ return DirectiveUriWithAugmentationImpl(
+ relativeUriString: parent.relativeUriString,
+ relativeUri: parent.relativeUri,
+ source: parent.source,
+ augmentation: augmentation,
+ );
+ case DirectiveUriKind.withLibrary:
+ final parent = readWithSource();
+ return DirectiveUriWithLibraryImpl.read(
+ relativeUriString: parent.relativeUriString,
+ relativeUri: parent.relativeUri,
+ source: parent.source,
+ );
case DirectiveUriKind.withUnit:
final parent = readWithSource();
final unitElement = _readUnitElement(
@@ -651,13 +708,6 @@
relativeUri: parent.relativeUri,
unit: unitElement,
);
- case DirectiveUriKind.withLibrary:
- final parent = readWithSource();
- return DirectiveUriWithLibraryImpl.read(
- relativeUriString: parent.relativeUriString,
- relativeUri: parent.relativeUri,
- source: parent.source,
- );
case DirectiveUriKind.withSource:
return readWithSource();
case DirectiveUriKind.withRelativeUri:
diff --git a/pkg/analyzer/lib/src/summary2/bundle_writer.dart b/pkg/analyzer/lib/src/summary2/bundle_writer.dart
index 8ff8bbd..c8b469e 100644
--- a/pkg/analyzer/lib/src/summary2/bundle_writer.dart
+++ b/pkg/analyzer/lib/src/summary2/bundle_writer.dart
@@ -104,6 +104,10 @@
_resolutionSink._writeAnnotationList(libraryElement.metadata);
_writeList(libraryElement.imports2, _writeImportElement);
_writeList(libraryElement.exports2, _writeExportElement);
+ _writeList(
+ libraryElement.augmentationImports,
+ _writeAugmentationImportElement,
+ );
for (final partElement in libraryElement.parts2) {
_resolutionSink._writeAnnotationList(partElement.metadata);
}
@@ -123,6 +127,17 @@
);
}
+ void _writeAugmentationElement(LibraryAugmentationElement augmentation) {
+ augmentation as LibraryAugmentationElementImpl;
+ _writeUnitElement(augmentation.definingCompilationUnit);
+ }
+
+ void _writeAugmentationImportElement(AugmentationImportElement element) {
+ element as AugmentationImportElementImpl;
+ _resolutionSink._writeAnnotationList(element.metadata);
+ _writeDirectiveUri(element.uri);
+ }
+
void _writeClassElement(ClassElement element) {
element as ClassElementImpl;
_sink.writeUInt30(_resolutionSink.offset);
@@ -189,7 +204,11 @@
_sink._writeStringReference('${element.source.uri}');
}
- if (element is DirectiveUriWithLibrary) {
+ if (element is DirectiveUriWithAugmentationImpl) {
+ _sink.writeByte(DirectiveUriKind.withAugmentation.index);
+ writeWithSource(element);
+ _writeAugmentationElement(element.augmentation);
+ } else if (element is DirectiveUriWithLibrary) {
_sink.writeByte(DirectiveUriKind.withLibrary.index);
writeWithSource(element);
} else if (element is DirectiveUriWithUnit) {
diff --git a/pkg/analyzer/lib/src/summary2/element_builder.dart b/pkg/analyzer/lib/src/summary2/element_builder.dart
index a4aace3..2451694 100644
--- a/pkg/analyzer/lib/src/summary2/element_builder.dart
+++ b/pkg/analyzer/lib/src/summary2/element_builder.dart
@@ -24,6 +24,7 @@
final CompilationUnitElementImpl _unitElement;
var _isFirstLibraryDirective = true;
+ var _augmentationDirectiveIndex = 0;
var _exportDirectiveIndex = 0;
var _importDirectiveIndex = 0;
var _partDirectiveIndex = 0;
@@ -77,6 +78,14 @@
}
@override
+ void visitAugmentationImportDirective(AugmentationImportDirective node) {
+ final index = _augmentationDirectiveIndex++;
+ final element = _libraryElement.augmentationImports[index];
+ element as AugmentationImportElementImpl;
+ element.metadata = _buildAnnotations(node.metadata);
+ }
+
+ @override
void visitClassDeclaration(covariant ClassDeclarationImpl node) {
var nameNode = node.name;
var name = nameNode.name;
@@ -740,6 +749,12 @@
}
@override
+ void visitLibraryAugmentationDirective(LibraryAugmentationDirective node) {
+ // TODO: implement visitLibraryAugmentationDirective
+ // super.visitLibraryAugmentationDirective(node);
+ }
+
+ @override
void visitLibraryDirective(covariant LibraryDirectiveImpl node) {
if (_isFirstLibraryDirective) {
_isFirstLibraryDirective = false;
diff --git a/pkg/analyzer/lib/src/summary2/library_builder.dart b/pkg/analyzer/lib/src/summary2/library_builder.dart
index 9af3b1b..0ad9d076 100644
--- a/pkg/analyzer/lib/src/summary2/library_builder.dart
+++ b/pkg/analyzer/lib/src/summary2/library_builder.dart
@@ -28,6 +28,14 @@
import 'package:analyzer/src/summary2/types_builder.dart';
import 'package:analyzer/src/util/performance/operation_performance.dart';
+class DefiningLinkingUnit extends LinkingUnit {
+ DefiningLinkingUnit({
+ required super.reference,
+ required super.node,
+ required super.element,
+ });
+}
+
class ImplicitEnumNodes {
final EnumElementImpl element;
final ast.NamedTypeImpl valuesTypeNode;
@@ -133,8 +141,10 @@
/// Build elements for declarations in the library units, add top-level
/// declarations to the local scope, for combining into export scopes.
void buildElements() {
- element.exports2 = kind.exports.map(_buildExport).toList();
- element.imports2 = kind.imports.map(_buildImport).toList();
+ _buildDirectives(
+ kind: kind,
+ element: element,
+ );
for (var linkingUnit in units) {
var elementBuilder = ElementBuilder(
@@ -142,7 +152,7 @@
unitReference: linkingUnit.reference,
unitElement: linkingUnit.element,
);
- if (linkingUnit.isDefiningUnit) {
+ if (linkingUnit is DefiningLinkingUnit) {
elementBuilder.buildLibraryElementChildren(linkingUnit.node);
}
elementBuilder.buildDeclarationElements(linkingUnit.node);
@@ -347,7 +357,6 @@
units.add(
LinkingUnit(
- isDefiningUnit: false,
reference: unitReference,
node: unitNode,
element: unitElement,
@@ -406,6 +415,83 @@
}
}
+ AugmentationImportElementImpl _buildAugmentationImport(
+ LibraryOrAugmentationElementImpl augmentedElement,
+ ImportAugmentationDirectiveState state,
+ ) {
+ final DirectiveUri uri;
+ if (state is ImportAugmentationDirectiveWithFile) {
+ final importedAugmentation = state.importedAugmentation;
+ if (importedAugmentation != null) {
+ final importedFile = importedAugmentation.file;
+
+ final unitNode = importedFile.parse();
+ final unitElement = CompilationUnitElementImpl(
+ source: importedFile.source,
+ // TODO(scheglov) Remove this parameter.
+ librarySource: importedFile.source,
+ lineInfo: unitNode.lineInfo,
+ );
+ unitElement.setCodeRange(0, unitNode.length);
+
+ final unitReference =
+ reference.getChild('@augmentation').getChild(importedFile.uriStr);
+ _bindReference(unitReference, unitElement);
+
+ units.add(
+ DefiningLinkingUnit(
+ reference: unitReference,
+ node: unitNode,
+ element: unitElement,
+ ),
+ );
+
+ final augmentation = LibraryAugmentationElementImpl(
+ augmented: augmentedElement,
+ nameOffset: -1, // TODO(scheglov) fix it
+ );
+ augmentation.definingCompilationUnit = unitElement;
+
+ _buildDirectives(
+ kind: importedAugmentation,
+ element: augmentation,
+ );
+
+ uri = DirectiveUriWithAugmentationImpl(
+ relativeUriString: state.uri.relativeUriStr,
+ relativeUri: state.uri.relativeUri,
+ source: importedFile.source,
+ augmentation: augmentation,
+ );
+ } else {
+ uri = DirectiveUriWithSourceImpl(
+ relativeUriString: state.uri.relativeUriStr,
+ relativeUri: state.uri.relativeUri,
+ source: state.importedSource,
+ );
+ }
+ } else {
+ final selectedUri = state.uri;
+ if (selectedUri is file_state.DirectiveUriWithUri) {
+ uri = DirectiveUriWithRelativeUriImpl(
+ relativeUriString: selectedUri.relativeUriStr,
+ relativeUri: selectedUri.relativeUri,
+ );
+ } else if (selectedUri is file_state.DirectiveUriWithString) {
+ uri = DirectiveUriWithRelativeUriStringImpl(
+ relativeUriString: selectedUri.relativeUriStr,
+ );
+ } else {
+ uri = DirectiveUriImpl();
+ }
+ }
+
+ return AugmentationImportElementImpl(
+ importKeywordOffset: -1, // TODO(scheglov) fix it
+ uri: uri,
+ );
+ }
+
List<NamespaceCombinator> _buildCombinators(
List<UnlinkedCombinator> combinators2,
) {
@@ -422,6 +508,20 @@
}).toList();
}
+ /// Builds directive elements, for the library and recursively for its
+ /// augmentations.
+ void _buildDirectives({
+ required LibraryOrAugmentationFileKind kind,
+ required LibraryOrAugmentationElementImpl element,
+ }) {
+ element.exports2 = kind.exports.map(_buildExport).toList();
+ element.imports2 = kind.imports.map(_buildImport).toList();
+
+ element.augmentationImports = kind.augmentations.map((state) {
+ return _buildAugmentationImport(element, state);
+ }).toList();
+ }
+
ExportElement2Impl _buildExport(ExportDirectiveState state) {
final combinators = _buildCombinators(
state.directive.combinators,
@@ -660,8 +760,7 @@
_bindReference(unitReference, unitElement);
linkingUnits.add(
- LinkingUnit(
- isDefiningUnit: true,
+ DefiningLinkingUnit(
reference: unitReference,
node: libraryUnitNode,
element: unitElement,
@@ -695,7 +794,6 @@
linkingUnits.add(
LinkingUnit(
- isDefiningUnit: false,
reference: unitReference,
node: partUnitNode,
element: unitElement,
@@ -761,13 +859,11 @@
}
class LinkingUnit {
- final bool isDefiningUnit;
final Reference reference;
final ast.CompilationUnitImpl node;
final CompilationUnitElementImpl element;
LinkingUnit({
- required this.isDefiningUnit,
required this.reference,
required this.node,
required this.element,
diff --git a/pkg/analyzer/lib/src/summary2/metadata_resolver.dart b/pkg/analyzer/lib/src/summary2/metadata_resolver.dart
index faac307..1dc9caa 100644
--- a/pkg/analyzer/lib/src/summary2/metadata_resolver.dart
+++ b/pkg/analyzer/lib/src/summary2/metadata_resolver.dart
@@ -35,6 +35,12 @@
}
@override
+ void visitAugmentationImportDirective(AugmentationImportDirective node) {
+ // TODO(scheglov) write test
+ node.metadata.accept(this);
+ }
+
+ @override
void visitClassDeclaration(ClassDeclaration node) {
node.metadata.accept(this);
node.typeParameters?.accept(this);
@@ -171,6 +177,12 @@
}
@override
+ void visitLibraryAugmentationDirective(LibraryAugmentationDirective node) {
+ // TODO(scheglov) write test
+ node.metadata.accept(this);
+ }
+
+ @override
void visitLibraryDirective(LibraryDirective node) {
node.metadata.accept(this);
}
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 29bb1a8..2ad78f3 100644
--- a/pkg/analyzer/test/src/dart/analysis/file_state_test.dart
+++ b/pkg/analyzer/test/src/dart/analysis/file_state_test.dart
@@ -4118,7 +4118,6 @@
// Not an augmentation anymore, but a library.
// But `a.dart` still uses `b.dart` as an augmentation.
- // TODO(scheglov) Any `augmentation_to_X` should change the signature.
assertDriverStateString(testFile, r'''
files
/home/test/lib/a.dart
@@ -4130,10 +4129,10 @@
library_2 dart:core synthetic
augmentations
notAugmentation file_1
- cycle_0
+ cycle_2
dependencies: dart:core
libraries: library_0
- apiSignature_0
+ apiSignature_1
unlinkedKey: k00
/home/test/lib/b.dart
uri: package:test/b.dart
@@ -4142,10 +4141,10 @@
kind: library_7
imports
library_2 dart:core synthetic
- cycle_2
+ cycle_3
dependencies: dart:core
libraries: library_7
- apiSignature_1
+ apiSignature_2
referencingFiles: file_0
unlinkedKey: k02
libraryCycles
@@ -4165,10 +4164,10 @@
library_2 dart:core synthetic
augmentations
notAugmentation file_1
- cycle_3
+ cycle_4
dependencies: dart:core
libraries: library_8
- apiSignature_0
+ apiSignature_1
unlinkedKey: k00
/home/test/lib/b.dart
uri: package:test/b.dart
@@ -4177,10 +4176,10 @@
kind: library_7
imports
library_2 dart:core synthetic
- cycle_2
+ cycle_3
dependencies: dart:core
libraries: library_7
- apiSignature_1
+ apiSignature_2
referencingFiles: file_0
unlinkedKey: k02
libraryCycles
@@ -4259,7 +4258,7 @@
cycle_2
dependencies: dart:core
libraries: library_0
- apiSignature_0
+ apiSignature_1
unlinkedKey: k00
/home/test/lib/b.dart
uri: package:test/b.dart
@@ -4291,7 +4290,7 @@
cycle_3
dependencies: dart:core
libraries: library_8
- apiSignature_0
+ apiSignature_1
unlinkedKey: k00
/home/test/lib/b.dart
uri: package:test/b.dart
@@ -4329,7 +4328,7 @@
cycle_4
dependencies: dart:core
libraries: library_9
- apiSignature_1
+ apiSignature_2
unlinkedKey: k03
/home/test/lib/b.dart
uri: package:test/b.dart
@@ -4409,7 +4408,7 @@
cycle_2
dependencies: dart:core
libraries: library_0
- apiSignature_0
+ apiSignature_1
unlinkedKey: k00
/home/test/lib/b.dart
uri: package:test/b.dart
@@ -4439,7 +4438,7 @@
cycle_3
dependencies: dart:core
libraries: library_8
- apiSignature_0
+ apiSignature_1
unlinkedKey: k00
/home/test/lib/b.dart
uri: package:test/b.dart
@@ -4474,7 +4473,7 @@
cycle_4
dependencies: dart:core
libraries: library_9
- apiSignature_1
+ apiSignature_2
unlinkedKey: k03
/home/test/lib/b.dart
uri: package:test/b.dart
diff --git a/pkg/analyzer/test/src/summary/element_text.dart b/pkg/analyzer/test/src/summary/element_text.dart
index 0ca1f33..5be2704 100644
--- a/pkg/analyzer/test/src/summary/element_text.dart
+++ b/pkg/analyzer/test/src/summary/element_text.dart
@@ -155,20 +155,7 @@
_writelnWithIndent('nameOffset: $nameOffset');
}
- _writeDocumentation(e);
- _writeMetadata(e);
-
- var imports = e.imports2
- .where((import) => withSyntheticDartCoreImport || !import.isSynthetic)
- .toList();
- _writeElements('imports', imports, _writeImportElement);
-
- _writeElements('exports', e.exports2, _writeExportElement);
-
- _writelnWithIndent('definingUnit');
- _withIndent(() {
- _writeUnitElement(e.definingCompilationUnit);
- });
+ _writeLibraryOrAugmentationElement(e);
_writeElements('parts', e.parts2, _writePartElement);
@@ -261,6 +248,24 @@
indent = savedIndent;
}
+ void _writeAugmentationElement(LibraryAugmentationElement e) {
+ _writeLibraryOrAugmentationElement(e);
+ }
+
+ void _writeAugmentationImportElement(AugmentationImportElement e) {
+ final uri = e.uri;
+ _writeIndentedLine(() {
+ _writeDirectiveUri(e.uri);
+ });
+
+ _withIndent(() {
+ _writeMetadata(e);
+ if (uri is DirectiveUriWithAugmentation) {
+ _writeAugmentationElement(uri.augmentation);
+ }
+ });
+ }
+
void _writeBodyModifiers(ExecutableElement e) {
if (e.isAsynchronous) {
expect(e.isSynchronous, isFalse);
@@ -432,7 +437,9 @@
}
void _writeDirectiveUri(DirectiveUri uri) {
- if (uri is DirectiveUriWithLibraryImpl) {
+ if (uri is DirectiveUriWithAugmentationImpl) {
+ buffer.write('${uri.augmentation.source.uri}');
+ } else if (uri is DirectiveUriWithLibraryImpl) {
buffer.write('${uri.library.source.uri}');
} else if (uri is DirectiveUriWithUnit) {
buffer.write('${uri.unit.source.uri}');
@@ -606,6 +613,26 @@
buffer.writeln();
}
+ void _writeLibraryOrAugmentationElement(LibraryOrAugmentationElement e) {
+ _writeDocumentation(e);
+ _writeMetadata(e);
+
+ var imports = e.imports2
+ .where((import) => withSyntheticDartCoreImport || !import.isSynthetic)
+ .toList();
+ _writeElements('imports', imports, _writeImportElement);
+
+ _writeElements('exports', e.exports2, _writeExportElement);
+
+ _writeElements('augmentationImports', e.augmentationImports,
+ _writeAugmentationImportElement);
+
+ _writelnWithIndent('definingUnit');
+ _withIndent(() {
+ _writeUnitElement(e.definingCompilationUnit);
+ });
+ }
+
void _writelnWithIndent(String line) {
buffer.write(indent);
buffer.writeln(line);
diff --git a/pkg/analyzer/test/src/summary/elements_test.dart b/pkg/analyzer/test/src/summary/elements_test.dart
index 309f16f..9fd06aa 100644
--- a/pkg/analyzer/test/src/summary/elements_test.dart
+++ b/pkg/analyzer/test/src/summary/elements_test.dart
@@ -25366,6 +25366,126 @@
''');
}
+ test_library_augmentationImports_augmentation() async {
+ newFile('$testPackageLibPath/a.dart', r'''
+library augment 'test.dart';
+class A {}
+''');
+ final library = await buildLibrary(r'''
+import augment 'a.dart';
+class B {}
+''');
+ checkElementText(library, r'''
+library
+ augmentationImports
+ package:test/a.dart
+ definingUnit
+ classes
+ class A @35
+ constructors
+ synthetic @-1
+ definingUnit
+ classes
+ class B @31
+ constructors
+ synthetic @-1
+''');
+
+ final import_0 = library.augmentationImports[0];
+ final augmentation = import_0.importedAugmentation!;
+ expect(augmentation.enclosingElement, same(library));
+ }
+
+ test_library_augmentationImports_noRelativeUriStr() async {
+ final library = await buildLibrary(r'''
+import augment '${'foo'}.dart';
+''');
+ checkElementText(library, r'''
+library
+ augmentationImports
+ noRelativeUriString
+ definingUnit
+''');
+ }
+
+ test_library_augmentationImports_withRelativeUri_emptyUriSelf() async {
+ final library = await buildLibrary(r'''
+import augment '';
+''');
+ checkElementText(library, r'''
+library
+ augmentationImports
+ source 'package:test/test.dart'
+ definingUnit
+''');
+ }
+
+ test_library_augmentationImports_withRelativeUri_noSource() async {
+ final library = await buildLibrary(r'''
+import augment 'foo:bar';
+''');
+ checkElementText(library, r'''
+library
+ augmentationImports
+ relativeUri 'foo:bar'
+ definingUnit
+''');
+ }
+
+ test_library_augmentationImports_withRelativeUri_notAugmentation_library() async {
+ newFile('$testPackageLibPath/a.dart', r'''
+library my.lib;
+''');
+ final library = await buildLibrary(r'''
+import augment 'a.dart';
+''');
+ checkElementText(library, r'''
+library
+ augmentationImports
+ source 'package:test/a.dart'
+ definingUnit
+''');
+ }
+
+ test_library_augmentationImports_withRelativeUri_notAugmentation_part() async {
+ newFile('$testPackageLibPath/a.dart', r'''
+part of other.lib;
+''');
+ final library = await buildLibrary(r'''
+import augment 'a.dart';
+''');
+ checkElementText(library, r'''
+library
+ augmentationImports
+ source 'package:test/a.dart'
+ definingUnit
+''');
+ }
+
+ test_library_augmentationImports_withRelativeUri_notExists() async {
+ final library = await buildLibrary(r'''
+import augment 'a.dart';
+''');
+ checkElementText(library, r'''
+library
+ augmentationImports
+ source 'package:test/a.dart'
+ definingUnit
+''');
+ }
+
+ test_library_augmentationImports_withRelativeUriString() async {
+ final library = await buildLibrary(r'''
+import augment ':';
+''');
+ checkElementText(library, r'''
+library
+ augmentationImports
+ relativeUriString ':'
+ definingUnit
+''');
+ }
+
test_library_documented_lines() async {
var library = await buildLibrary('''
/// aaa
diff --git a/runtime/lib/timeline.cc b/runtime/lib/timeline.cc
index 7deea5c..0b3816c 100644
--- a/runtime/lib/timeline.cc
+++ b/runtime/lib/timeline.cc
@@ -24,11 +24,15 @@
return Bool::False().ptr();
}
-DEFINE_NATIVE_ENTRY(Timeline_getNextTaskId, 0, 0) {
+DEFINE_NATIVE_ENTRY(Timeline_getNextAsyncId, 0, 0) {
#if !defined(SUPPORT_TIMELINE)
return Integer::New(0);
#else
- return Integer::New(thread->GetNextTaskId());
+ TimelineEventRecorder* recorder = Timeline::recorder();
+ if (recorder == NULL) {
+ return Integer::New(0);
+ }
+ return Integer::New(recorder->GetNextAsyncId());
#endif
}
diff --git a/runtime/vm/bootstrap_natives.h b/runtime/vm/bootstrap_natives.h
index dbbaa95..6e82679 100644
--- a/runtime/vm/bootstrap_natives.h
+++ b/runtime/vm/bootstrap_natives.h
@@ -153,7 +153,7 @@
V(TypeError_throwNew, 4) \
V(Stopwatch_now, 0) \
V(Stopwatch_frequency, 0) \
- V(Timeline_getNextTaskId, 0) \
+ V(Timeline_getNextAsyncId, 0) \
V(Timeline_getTraceClock, 0) \
V(Timeline_isDartStreamEnabled, 0) \
V(Timeline_reportFlowEvent, 5) \
diff --git a/runtime/vm/compiler/asm_intrinsifier_arm.cc b/runtime/vm/compiler/asm_intrinsifier_arm.cc
index c061a93..5bd61d7 100644
--- a/runtime/vm/compiler/asm_intrinsifier_arm.cc
+++ b/runtime/vm/compiler/asm_intrinsifier_arm.cc
@@ -1900,23 +1900,6 @@
#endif
}
-void AsmIntrinsifier::Timeline_getNextTaskId(Assembler* assembler,
- Label* normal_ir_body) {
-#if !defined(SUPPORT_TIMELINE)
- __ LoadImmediate(R0, target::ToRawSmi(0));
- __ Ret();
-#else
- __ ldr(R1, Address(THR, target::Thread::next_task_id_offset()));
- __ ldr(R2, Address(THR, target::Thread::next_task_id_offset() + 4));
- __ SmiTag(R0, R1); // Ignore loss of precision.
- __ adds(R1, R1, Operand(1));
- __ adcs(R2, R2, Operand(0));
- __ str(R1, Address(THR, target::Thread::next_task_id_offset()));
- __ str(R2, Address(THR, target::Thread::next_task_id_offset() + 4));
- __ Ret();
-#endif
-}
-
#undef __
} // namespace compiler
diff --git a/runtime/vm/compiler/asm_intrinsifier_arm64.cc b/runtime/vm/compiler/asm_intrinsifier_arm64.cc
index 33e850c..2cd0d6e 100644
--- a/runtime/vm/compiler/asm_intrinsifier_arm64.cc
+++ b/runtime/vm/compiler/asm_intrinsifier_arm64.cc
@@ -2146,20 +2146,6 @@
#endif
}
-void AsmIntrinsifier::Timeline_getNextTaskId(Assembler* assembler,
- Label* normal_ir_body) {
-#if !defined(SUPPORT_TIMELINE)
- __ LoadImmediate(R0, target::ToRawSmi(0));
- __ ret();
-#else
- __ ldr(R0, Address(THR, target::Thread::next_task_id_offset()));
- __ add(R1, R0, Operand(1));
- __ str(R1, Address(THR, target::Thread::next_task_id_offset()));
- __ SmiTag(R0); // Ignore loss of precision.
- __ ret();
-#endif
-}
-
#undef __
} // namespace compiler
diff --git a/runtime/vm/compiler/asm_intrinsifier_ia32.cc b/runtime/vm/compiler/asm_intrinsifier_ia32.cc
index bc39517..538ce05 100644
--- a/runtime/vm/compiler/asm_intrinsifier_ia32.cc
+++ b/runtime/vm/compiler/asm_intrinsifier_ia32.cc
@@ -1937,24 +1937,6 @@
#endif
}
-void AsmIntrinsifier::Timeline_getNextTaskId(Assembler* assembler,
- Label* normal_ir_body) {
-#if !defined(SUPPORT_TIMELINE)
- __ LoadImmediate(EAX, target::ToRawSmi(0));
- __ ret();
-#else
- __ movl(EBX, Address(THR, target::Thread::next_task_id_offset()));
- __ movl(ECX, Address(THR, target::Thread::next_task_id_offset() + 4));
- __ movl(EAX, EBX);
- __ SmiTag(EAX); // Ignore loss of precision.
- __ addl(EBX, Immediate(1));
- __ adcl(ECX, Immediate(0));
- __ movl(Address(THR, target::Thread::next_task_id_offset()), EBX);
- __ movl(Address(THR, target::Thread::next_task_id_offset() + 4), ECX);
- __ ret();
-#endif
-}
-
#undef __
} // namespace compiler
diff --git a/runtime/vm/compiler/asm_intrinsifier_riscv.cc b/runtime/vm/compiler/asm_intrinsifier_riscv.cc
index e6bdde0..a1b94de 100644
--- a/runtime/vm/compiler/asm_intrinsifier_riscv.cc
+++ b/runtime/vm/compiler/asm_intrinsifier_riscv.cc
@@ -2160,30 +2160,6 @@
#endif
}
-void AsmIntrinsifier::Timeline_getNextTaskId(Assembler* assembler,
- Label* normal_ir_body) {
-#if !defined(SUPPORT_TIMELINE)
- __ LoadImmediate(A0, target::ToRawSmi(0));
- __ ret();
-#elif XLEN == 64
- __ ld(A0, Address(THR, target::Thread::next_task_id_offset()));
- __ addi(A1, A0, 1);
- __ sd(A1, Address(THR, target::Thread::next_task_id_offset()));
- __ SmiTag(A0); // Ignore loss of precision.
- __ ret();
-#else
- __ lw(T0, Address(THR, target::Thread::next_task_id_offset()));
- __ lw(T1, Address(THR, target::Thread::next_task_id_offset() + 4));
- __ SmiTag(A0, T0); // Ignore loss of precision.
- __ addi(T2, T0, 1);
- __ sltu(T3, T2, T0); // Carry.
- __ add(T1, T1, T3);
- __ sw(T2, Address(THR, target::Thread::next_task_id_offset()));
- __ sw(T1, Address(THR, target::Thread::next_task_id_offset() + 4));
- __ ret();
-#endif
-}
-
#undef __
} // namespace compiler
diff --git a/runtime/vm/compiler/asm_intrinsifier_x64.cc b/runtime/vm/compiler/asm_intrinsifier_x64.cc
index ad0d3a8..9ff337a 100644
--- a/runtime/vm/compiler/asm_intrinsifier_x64.cc
+++ b/runtime/vm/compiler/asm_intrinsifier_x64.cc
@@ -2034,21 +2034,6 @@
#endif
}
-void AsmIntrinsifier::Timeline_getNextTaskId(Assembler* assembler,
- Label* normal_ir_body) {
-#if !defined(SUPPORT_TIMELINE)
- __ xorq(RAX, RAX); // Return Smi 0.
- __ ret();
-#else
- __ movq(RAX, Address(THR, target::Thread::next_task_id_offset()));
- __ movq(RBX, RAX);
- __ incq(RBX);
- __ movq(Address(THR, target::Thread::next_task_id_offset()), RBX);
- __ SmiTag(RAX); // Ignore loss of precision.
- __ ret();
-#endif
-}
-
#undef __
} // namespace compiler
diff --git a/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc b/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc
index ef1b9a0..8af3c49 100644
--- a/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc
+++ b/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc
@@ -698,22 +698,14 @@
return body;
}
-Fragment StreamingFlowGraphBuilder::BuildEveryTimePrologue(
+Fragment StreamingFlowGraphBuilder::BuildRegularFunctionPrologue(
const Function& dart_function,
TokenPosition token_position,
- intptr_t type_parameters_offset) {
+ LocalVariable* first_parameter) {
Fragment F;
F += CheckStackOverflowInPrologue(dart_function);
F += DebugStepCheckInPrologue(dart_function, token_position);
F += B->InitConstantParameters();
- return F;
-}
-
-Fragment StreamingFlowGraphBuilder::BuildFirstTimePrologue(
- const Function& dart_function,
- LocalVariable* first_parameter,
- intptr_t type_parameters_offset) {
- Fragment F;
F += SetupCapturedParameters(dart_function);
F += ShortcutForUserDefinedEquals(dart_function, first_parameter);
return F;
@@ -747,8 +739,7 @@
UncheckedEntryPointStyle StreamingFlowGraphBuilder::ChooseEntryPointStyle(
const Function& dart_function,
const Fragment& implicit_type_checks,
- const Fragment& first_time_prologue,
- const Fragment& every_time_prologue,
+ const Fragment& regular_function_prologue,
const Fragment& type_args_handling) {
ASSERT(!dart_function.IsImplicitClosureFunction());
if (!dart_function.MayHaveUncheckedEntryPoint() ||
@@ -761,17 +752,21 @@
//
// 1. There is a non-empty PrologueBuilder-prologue.
//
- // 2. There is a non-empty "first-time" prologue.
+ // 2. The regular function prologue has more than two instructions
+ // (DebugStepCheck and CheckStackOverflow).
//
- // 3. The "every-time" prologue has more than two instructions (DebugStepCheck
- // and CheckStackOverflow).
- //
- // TODO(#34162): For regular closures we can often avoid the
- // PrologueBuilder-prologue on non-dynamic invocations.
if (!PrologueBuilder::HasEmptyPrologue(dart_function) ||
- !type_args_handling.is_empty() || !first_time_prologue.is_empty() ||
- !(every_time_prologue.entry == every_time_prologue.current ||
- every_time_prologue.current->previous() == every_time_prologue.entry)) {
+ !type_args_handling.is_empty()) {
+ return UncheckedEntryPointStyle::kSharedWithVariable;
+ }
+ Instruction* instr = regular_function_prologue.entry;
+ if (instr != nullptr && instr->IsCheckStackOverflow()) {
+ instr = instr->next();
+ }
+ if (instr != nullptr && instr->IsDebugStepCheck()) {
+ instr = instr->next();
+ }
+ if (instr != nullptr) {
return UncheckedEntryPointStyle::kSharedWithVariable;
}
@@ -782,16 +777,12 @@
bool is_constructor) {
const Function& dart_function = parsed_function()->function();
- intptr_t type_parameters_offset = 0;
LocalVariable* first_parameter = nullptr;
TokenPosition token_position = TokenPosition::kNoSource;
{
AlternativeReadingScope alt(&reader_);
FunctionNodeHelper function_node_helper(this);
function_node_helper.ReadUntilExcluding(
- FunctionNodeHelper::kTypeParameters);
- type_parameters_offset = ReaderOffset();
- function_node_helper.ReadUntilExcluding(
FunctionNodeHelper::kPositionalParameters);
intptr_t list_length = ReadListLength(); // read number of positionals.
if (list_length > 0) {
@@ -811,15 +802,8 @@
BlockEntryInstr* instruction_cursor =
flow_graph_builder_->BuildPrologue(normal_entry, &prologue_info);
- // The 'every_time_prologue' runs first and is run when resuming from yield
- // points.
- const Fragment every_time_prologue = BuildEveryTimePrologue(
- dart_function, token_position, type_parameters_offset);
-
- // The 'first_time_prologue' run after 'every_time_prologue' and is *not* run
- // when resuming from yield points.
- const Fragment first_time_prologue = BuildFirstTimePrologue(
- dart_function, first_parameter, type_parameters_offset);
+ const Fragment regular_prologue = BuildRegularFunctionPrologue(
+ dart_function, token_position, first_parameter);
// TODO(#34162): We can remove the default type handling (and
// shorten the prologue type handling sequence) for non-dynamic invocations of
@@ -847,30 +831,28 @@
InitSuspendableFunction(dart_function) +
BuildFunctionBody(dart_function, first_parameter, is_constructor);
- auto extra_entry_point_style = ChooseEntryPointStyle(
- dart_function, implicit_type_checks, first_time_prologue,
- every_time_prologue, type_args_handling);
+ auto extra_entry_point_style =
+ ChooseEntryPointStyle(dart_function, implicit_type_checks,
+ regular_prologue, type_args_handling);
Fragment function(instruction_cursor);
FunctionEntryInstr* extra_entry = nullptr;
switch (extra_entry_point_style) {
case UncheckedEntryPointStyle::kNone: {
- function += every_time_prologue + first_time_prologue +
- type_args_handling + implicit_type_checks +
+ function += regular_prologue + type_args_handling + implicit_type_checks +
explicit_type_checks + body;
break;
}
case UncheckedEntryPointStyle::kSeparate: {
ASSERT(instruction_cursor == normal_entry);
- ASSERT(first_time_prologue.is_empty());
ASSERT(type_args_handling.is_empty());
- const Fragment prologue_copy = BuildEveryTimePrologue(
- dart_function, token_position, type_parameters_offset);
+ const Fragment prologue_copy = BuildRegularFunctionPrologue(
+ dart_function, token_position, first_parameter);
extra_entry = B->BuildSeparateUncheckedEntryPoint(
normal_entry,
- /*normal_prologue=*/every_time_prologue + implicit_type_checks,
+ /*normal_prologue=*/regular_prologue + implicit_type_checks,
/*extra_prologue=*/prologue_copy,
/*shared_prologue=*/explicit_type_checks,
/*body=*/body);
@@ -878,8 +860,7 @@
}
case UncheckedEntryPointStyle::kSharedWithVariable: {
Fragment prologue(normal_entry, instruction_cursor);
- prologue += every_time_prologue;
- prologue += first_time_prologue;
+ prologue += regular_prologue;
prologue += type_args_handling;
prologue += explicit_type_checks;
extra_entry = B->BuildSharedUncheckedEntryPoint(
diff --git a/runtime/vm/compiler/frontend/kernel_binary_flowgraph.h b/runtime/vm/compiler/frontend/kernel_binary_flowgraph.h
index bf95ac2..6daf672 100644
--- a/runtime/vm/compiler/frontend/kernel_binary_flowgraph.h
+++ b/runtime/vm/compiler/frontend/kernel_binary_flowgraph.h
@@ -82,16 +82,12 @@
bool constructor);
// Pieces of the prologue. They are all agnostic to the current Kernel offset.
- Fragment BuildEveryTimePrologue(const Function& dart_function,
- TokenPosition token_position,
- intptr_t type_parameters_offset);
- Fragment BuildFirstTimePrologue(const Function& dart_function,
- LocalVariable* first_parameter,
- intptr_t type_parameters_offset);
+ Fragment BuildRegularFunctionPrologue(const Function& dart_function,
+ TokenPosition token_position,
+ LocalVariable* first_parameter);
Fragment ClearRawParameters(const Function& dart_function);
Fragment DebugStepCheckInPrologue(const Function& dart_function,
TokenPosition position);
- Fragment SetAsyncStackTrace(const Function& dart_function);
Fragment CheckStackOverflowInPrologue(const Function& dart_function);
Fragment SetupCapturedParameters(const Function& dart_function);
Fragment InitSuspendableFunction(const Function& dart_function);
@@ -102,8 +98,7 @@
static UncheckedEntryPointStyle ChooseEntryPointStyle(
const Function& dart_function,
const Fragment& implicit_type_checks,
- const Fragment& first_time_prologue,
- const Fragment& every_time_prologue,
+ const Fragment& regular_function_prologue,
const Fragment& type_args_handling);
void loop_depth_inc();
diff --git a/runtime/vm/compiler/frontend/scope_builder.cc b/runtime/vm/compiler/frontend/scope_builder.cc
index 8673b84..b6e849e 100644
--- a/runtime/vm/compiler/frontend/scope_builder.cc
+++ b/runtime/vm/compiler/frontend/scope_builder.cc
@@ -148,7 +148,6 @@
helper_.ReadUntilFunctionNode();
function_node_helper.ReadUntilExcluding(
FunctionNodeHelper::kPositionalParameters);
- current_function_async_marker_ = function_node_helper.async_marker_;
// NOTE: FunctionNode is read further below the if.
intptr_t pos = 0;
@@ -368,7 +367,6 @@
scope_->InsertParameterAt(pos++, parsed_function_->receiver_var());
// Create all positional and named parameters.
- current_function_async_marker_ = FunctionNodeHelper::kSync;
AddPositionalAndNamedParameters(
pos, kTypeCheckEverythingNotCheckedInNonDynamicallyInvokedMethod,
attrs);
@@ -393,7 +391,6 @@
// Callbacks and calls with handles need try/catch variables.
if ((function.FfiCallbackTarget() != Function::null() ||
function.FfiCSignatureContainsHandles())) {
- current_function_async_marker_ = FunctionNodeHelper::kSync;
++depth_.try_;
AddTryVariables();
--depth_.try_;
@@ -1462,13 +1459,10 @@
function_node_helper.ReadUntilExcluding(FunctionNodeHelper::kTypeParameters);
LocalScope* saved_function_scope = current_function_scope_;
- FunctionNodeHelper::AsyncMarker saved_function_async_marker =
- current_function_async_marker_;
DepthState saved_depth_state = depth_;
depth_ = DepthState(depth_.function_ + 1);
EnterScope(parent_kernel_offset);
current_function_scope_ = scope_;
- current_function_async_marker_ = function_node_helper.async_marker_;
if (depth_.function_ == 1) {
FunctionScope function_scope = {offset, scope_};
result_->function_scopes.Add(function_scope);
@@ -1516,7 +1510,6 @@
ExitScope(function_node_helper.position_, function_node_helper.end_position_);
depth_ = saved_depth_state;
current_function_scope_ = saved_function_scope;
- current_function_async_marker_ = saved_function_async_marker;
}
void ScopeBuilder::EnterScope(intptr_t kernel_offset) {
diff --git a/runtime/vm/compiler/frontend/scope_builder.h b/runtime/vm/compiler/frontend/scope_builder.h
index 9805939..ef1a985 100644
--- a/runtime/vm/compiler/frontend/scope_builder.h
+++ b/runtime/vm/compiler/frontend/scope_builder.h
@@ -154,7 +154,6 @@
TranslationHelper translation_helper_;
Zone* zone_;
- FunctionNodeHelper::AsyncMarker current_function_async_marker_;
LocalScope* current_function_scope_;
LocalScope* scope_;
DepthState depth_;
diff --git a/runtime/vm/compiler/recognized_methods_list.h b/runtime/vm/compiler/recognized_methods_list.h
index b5fa0e5..8b6678d 100644
--- a/runtime/vm/compiler/recognized_methods_list.h
+++ b/runtime/vm/compiler/recognized_methods_list.h
@@ -97,9 +97,9 @@
0xc40903ac) \
V(_SuspendState, _clone, SuspendState_clone, 0xae1a40a0) \
V(_SuspendState, _createAsyncCallbacks, SuspendState_createAsyncCallbacks, \
- 0x68be1bf3) \
+ 0x967521b1) \
V(_SuspendState, _createAsyncStarCallback, \
- SuspendState_createAsyncStarCallback, 0xfa7537e4) \
+ SuspendState_createAsyncStarCallback, 0xa50f923c) \
V(_SuspendState, _resume, SuspendState_resume, 0x5d7a8489) \
V(_IntegerImplementation, toDouble, IntegerToDouble, 0x97728b46) \
V(_Double, _add, DoubleAdd, 0xea666327) \
@@ -437,7 +437,6 @@
V(::, _getDefaultTag, UserTag_defaultTag, 0x6c19c8a5) \
V(::, _getCurrentTag, Profiler_getCurrentTag, 0x70ead08e) \
V(::, _isDartStreamEnabled, Timeline_isDartStreamEnabled, 0xc97aafb3) \
- V(::, _getNextTaskId, Timeline_getNextTaskId, 0x5b2b0b0b) \
#define INTERNAL_LIB_INTRINSIC_LIST(V) \
V(::, allocateOneByteString, AllocateOneByteString, 0x9e7745d5) \
diff --git a/runtime/vm/compiler/runtime_api.h b/runtime/vm/compiler/runtime_api.h
index f30f579..0d77869 100644
--- a/runtime/vm/compiler/runtime_api.h
+++ b/runtime/vm/compiler/runtime_api.h
@@ -1249,7 +1249,6 @@
THREAD_XMM_CONSTANT_LIST(DECLARE_CONSTANT_OFFSET_GETTER)
#undef DECLARE_CONSTANT_OFFSET_GETTER
- static word next_task_id_offset();
static word random_offset();
static word suspend_state_init_async_entry_point_offset();
diff --git a/runtime/vm/compiler/runtime_offsets_extracted.h b/runtime/vm/compiler/runtime_offsets_extracted.h
index 098de96..fd7de86 100644
--- a/runtime/vm/compiler/runtime_offsets_extracted.h
+++ b/runtime/vm/compiler/runtime_offsets_extracted.h
@@ -320,13 +320,13 @@
Thread_call_to_runtime_entry_point_offset = 296;
static constexpr dart::compiler::target::word
Thread_call_to_runtime_stub_offset = 140;
-static constexpr dart::compiler::target::word Thread_dart_stream_offset = 904;
+static constexpr dart::compiler::target::word Thread_dart_stream_offset = 896;
static constexpr dart::compiler::target::word
Thread_dispatch_table_array_offset = 44;
static constexpr dart::compiler::target::word
Thread_double_truncate_round_supported_offset = 872;
static constexpr dart::compiler::target::word
- Thread_service_extension_stream_offset = 908;
+ Thread_service_extension_stream_offset = 900;
static constexpr dart::compiler::target::word Thread_optimize_entry_offset =
336;
static constexpr dart::compiler::target::word Thread_optimize_stub_offset = 248;
@@ -370,7 +370,7 @@
static constexpr dart::compiler::target::word Thread_exit_through_ffi_offset =
864;
static constexpr dart::compiler::target::word Thread_isolate_offset = 40;
-static constexpr dart::compiler::target::word Thread_isolate_group_offset = 912;
+static constexpr dart::compiler::target::word Thread_isolate_group_offset = 904;
static constexpr dart::compiler::target::word Thread_field_table_values_offset =
64;
static constexpr dart::compiler::target::word
@@ -480,11 +480,10 @@
static constexpr dart::compiler::target::word Thread_callback_code_offset = 856;
static constexpr dart::compiler::target::word
Thread_callback_stack_return_offset = 860;
-static constexpr dart::compiler::target::word Thread_next_task_id_offset = 880;
-static constexpr dart::compiler::target::word Thread_random_offset = 888;
+static constexpr dart::compiler::target::word Thread_random_offset = 880;
static constexpr dart::compiler::target::word
Thread_jump_to_frame_entry_point_offset = 348;
-static constexpr dart::compiler::target::word Thread_tsan_utils_offset = 896;
+static constexpr dart::compiler::target::word Thread_tsan_utils_offset = 888;
static constexpr dart::compiler::target::word TsanUtils_setjmp_function_offset =
0;
static constexpr dart::compiler::target::word TsanUtils_setjmp_buffer_offset =
@@ -983,13 +982,13 @@
Thread_call_to_runtime_entry_point_offset = 568;
static constexpr dart::compiler::target::word
Thread_call_to_runtime_stub_offset = 256;
-static constexpr dart::compiler::target::word Thread_dart_stream_offset = 1784;
+static constexpr dart::compiler::target::word Thread_dart_stream_offset = 1776;
static constexpr dart::compiler::target::word
Thread_dispatch_table_array_offset = 88;
static constexpr dart::compiler::target::word
Thread_double_truncate_round_supported_offset = 1744;
static constexpr dart::compiler::target::word
- Thread_service_extension_stream_offset = 1792;
+ Thread_service_extension_stream_offset = 1784;
static constexpr dart::compiler::target::word Thread_optimize_entry_offset =
648;
static constexpr dart::compiler::target::word Thread_optimize_stub_offset = 472;
@@ -1034,7 +1033,7 @@
1728;
static constexpr dart::compiler::target::word Thread_isolate_offset = 80;
static constexpr dart::compiler::target::word Thread_isolate_group_offset =
- 1800;
+ 1792;
static constexpr dart::compiler::target::word Thread_field_table_values_offset =
128;
static constexpr dart::compiler::target::word
@@ -1145,11 +1144,10 @@
1712;
static constexpr dart::compiler::target::word
Thread_callback_stack_return_offset = 1720;
-static constexpr dart::compiler::target::word Thread_next_task_id_offset = 1752;
-static constexpr dart::compiler::target::word Thread_random_offset = 1760;
+static constexpr dart::compiler::target::word Thread_random_offset = 1752;
static constexpr dart::compiler::target::word
Thread_jump_to_frame_entry_point_offset = 672;
-static constexpr dart::compiler::target::word Thread_tsan_utils_offset = 1768;
+static constexpr dart::compiler::target::word Thread_tsan_utils_offset = 1760;
static constexpr dart::compiler::target::word TsanUtils_setjmp_function_offset =
0;
static constexpr dart::compiler::target::word TsanUtils_setjmp_buffer_offset =
@@ -1647,13 +1645,13 @@
Thread_call_to_runtime_entry_point_offset = 296;
static constexpr dart::compiler::target::word
Thread_call_to_runtime_stub_offset = 140;
-static constexpr dart::compiler::target::word Thread_dart_stream_offset = 872;
+static constexpr dart::compiler::target::word Thread_dart_stream_offset = 864;
static constexpr dart::compiler::target::word
Thread_dispatch_table_array_offset = 44;
static constexpr dart::compiler::target::word
Thread_double_truncate_round_supported_offset = 840;
static constexpr dart::compiler::target::word
- Thread_service_extension_stream_offset = 876;
+ Thread_service_extension_stream_offset = 868;
static constexpr dart::compiler::target::word Thread_optimize_entry_offset =
336;
static constexpr dart::compiler::target::word Thread_optimize_stub_offset = 248;
@@ -1697,7 +1695,7 @@
static constexpr dart::compiler::target::word Thread_exit_through_ffi_offset =
832;
static constexpr dart::compiler::target::word Thread_isolate_offset = 40;
-static constexpr dart::compiler::target::word Thread_isolate_group_offset = 880;
+static constexpr dart::compiler::target::word Thread_isolate_group_offset = 872;
static constexpr dart::compiler::target::word Thread_field_table_values_offset =
64;
static constexpr dart::compiler::target::word
@@ -1807,11 +1805,10 @@
static constexpr dart::compiler::target::word Thread_callback_code_offset = 824;
static constexpr dart::compiler::target::word
Thread_callback_stack_return_offset = 828;
-static constexpr dart::compiler::target::word Thread_next_task_id_offset = 848;
-static constexpr dart::compiler::target::word Thread_random_offset = 856;
+static constexpr dart::compiler::target::word Thread_random_offset = 848;
static constexpr dart::compiler::target::word
Thread_jump_to_frame_entry_point_offset = 348;
-static constexpr dart::compiler::target::word Thread_tsan_utils_offset = 864;
+static constexpr dart::compiler::target::word Thread_tsan_utils_offset = 856;
static constexpr dart::compiler::target::word TsanUtils_setjmp_function_offset =
0;
static constexpr dart::compiler::target::word TsanUtils_setjmp_buffer_offset =
@@ -2307,13 +2304,13 @@
Thread_call_to_runtime_entry_point_offset = 568;
static constexpr dart::compiler::target::word
Thread_call_to_runtime_stub_offset = 256;
-static constexpr dart::compiler::target::word Thread_dart_stream_offset = 1848;
+static constexpr dart::compiler::target::word Thread_dart_stream_offset = 1840;
static constexpr dart::compiler::target::word
Thread_dispatch_table_array_offset = 88;
static constexpr dart::compiler::target::word
Thread_double_truncate_round_supported_offset = 1808;
static constexpr dart::compiler::target::word
- Thread_service_extension_stream_offset = 1856;
+ Thread_service_extension_stream_offset = 1848;
static constexpr dart::compiler::target::word Thread_optimize_entry_offset =
648;
static constexpr dart::compiler::target::word Thread_optimize_stub_offset = 472;
@@ -2358,7 +2355,7 @@
1792;
static constexpr dart::compiler::target::word Thread_isolate_offset = 80;
static constexpr dart::compiler::target::word Thread_isolate_group_offset =
- 1864;
+ 1856;
static constexpr dart::compiler::target::word Thread_field_table_values_offset =
128;
static constexpr dart::compiler::target::word
@@ -2469,11 +2466,10 @@
1776;
static constexpr dart::compiler::target::word
Thread_callback_stack_return_offset = 1784;
-static constexpr dart::compiler::target::word Thread_next_task_id_offset = 1816;
-static constexpr dart::compiler::target::word Thread_random_offset = 1824;
+static constexpr dart::compiler::target::word Thread_random_offset = 1816;
static constexpr dart::compiler::target::word
Thread_jump_to_frame_entry_point_offset = 672;
-static constexpr dart::compiler::target::word Thread_tsan_utils_offset = 1832;
+static constexpr dart::compiler::target::word Thread_tsan_utils_offset = 1824;
static constexpr dart::compiler::target::word TsanUtils_setjmp_function_offset =
0;
static constexpr dart::compiler::target::word TsanUtils_setjmp_buffer_offset =
@@ -2974,13 +2970,13 @@
Thread_call_to_runtime_entry_point_offset = 568;
static constexpr dart::compiler::target::word
Thread_call_to_runtime_stub_offset = 256;
-static constexpr dart::compiler::target::word Thread_dart_stream_offset = 1784;
+static constexpr dart::compiler::target::word Thread_dart_stream_offset = 1776;
static constexpr dart::compiler::target::word
Thread_dispatch_table_array_offset = 88;
static constexpr dart::compiler::target::word
Thread_double_truncate_round_supported_offset = 1744;
static constexpr dart::compiler::target::word
- Thread_service_extension_stream_offset = 1792;
+ Thread_service_extension_stream_offset = 1784;
static constexpr dart::compiler::target::word Thread_optimize_entry_offset =
648;
static constexpr dart::compiler::target::word Thread_optimize_stub_offset = 472;
@@ -3025,7 +3021,7 @@
1728;
static constexpr dart::compiler::target::word Thread_isolate_offset = 80;
static constexpr dart::compiler::target::word Thread_isolate_group_offset =
- 1800;
+ 1792;
static constexpr dart::compiler::target::word Thread_field_table_values_offset =
128;
static constexpr dart::compiler::target::word
@@ -3136,11 +3132,10 @@
1712;
static constexpr dart::compiler::target::word
Thread_callback_stack_return_offset = 1720;
-static constexpr dart::compiler::target::word Thread_next_task_id_offset = 1752;
-static constexpr dart::compiler::target::word Thread_random_offset = 1760;
+static constexpr dart::compiler::target::word Thread_random_offset = 1752;
static constexpr dart::compiler::target::word
Thread_jump_to_frame_entry_point_offset = 672;
-static constexpr dart::compiler::target::word Thread_tsan_utils_offset = 1768;
+static constexpr dart::compiler::target::word Thread_tsan_utils_offset = 1760;
static constexpr dart::compiler::target::word TsanUtils_setjmp_function_offset =
0;
static constexpr dart::compiler::target::word TsanUtils_setjmp_buffer_offset =
@@ -3640,13 +3635,13 @@
Thread_call_to_runtime_entry_point_offset = 568;
static constexpr dart::compiler::target::word
Thread_call_to_runtime_stub_offset = 256;
-static constexpr dart::compiler::target::word Thread_dart_stream_offset = 1848;
+static constexpr dart::compiler::target::word Thread_dart_stream_offset = 1840;
static constexpr dart::compiler::target::word
Thread_dispatch_table_array_offset = 88;
static constexpr dart::compiler::target::word
Thread_double_truncate_round_supported_offset = 1808;
static constexpr dart::compiler::target::word
- Thread_service_extension_stream_offset = 1856;
+ Thread_service_extension_stream_offset = 1848;
static constexpr dart::compiler::target::word Thread_optimize_entry_offset =
648;
static constexpr dart::compiler::target::word Thread_optimize_stub_offset = 472;
@@ -3691,7 +3686,7 @@
1792;
static constexpr dart::compiler::target::word Thread_isolate_offset = 80;
static constexpr dart::compiler::target::word Thread_isolate_group_offset =
- 1864;
+ 1856;
static constexpr dart::compiler::target::word Thread_field_table_values_offset =
128;
static constexpr dart::compiler::target::word
@@ -3802,11 +3797,10 @@
1776;
static constexpr dart::compiler::target::word
Thread_callback_stack_return_offset = 1784;
-static constexpr dart::compiler::target::word Thread_next_task_id_offset = 1816;
-static constexpr dart::compiler::target::word Thread_random_offset = 1824;
+static constexpr dart::compiler::target::word Thread_random_offset = 1816;
static constexpr dart::compiler::target::word
Thread_jump_to_frame_entry_point_offset = 672;
-static constexpr dart::compiler::target::word Thread_tsan_utils_offset = 1832;
+static constexpr dart::compiler::target::word Thread_tsan_utils_offset = 1824;
static constexpr dart::compiler::target::word TsanUtils_setjmp_function_offset =
0;
static constexpr dart::compiler::target::word TsanUtils_setjmp_buffer_offset =
@@ -4305,13 +4299,13 @@
Thread_call_to_runtime_entry_point_offset = 296;
static constexpr dart::compiler::target::word
Thread_call_to_runtime_stub_offset = 140;
-static constexpr dart::compiler::target::word Thread_dart_stream_offset = 944;
+static constexpr dart::compiler::target::word Thread_dart_stream_offset = 936;
static constexpr dart::compiler::target::word
Thread_dispatch_table_array_offset = 44;
static constexpr dart::compiler::target::word
Thread_double_truncate_round_supported_offset = 912;
static constexpr dart::compiler::target::word
- Thread_service_extension_stream_offset = 948;
+ Thread_service_extension_stream_offset = 940;
static constexpr dart::compiler::target::word Thread_optimize_entry_offset =
336;
static constexpr dart::compiler::target::word Thread_optimize_stub_offset = 248;
@@ -4355,7 +4349,7 @@
static constexpr dart::compiler::target::word Thread_exit_through_ffi_offset =
904;
static constexpr dart::compiler::target::word Thread_isolate_offset = 40;
-static constexpr dart::compiler::target::word Thread_isolate_group_offset = 952;
+static constexpr dart::compiler::target::word Thread_isolate_group_offset = 944;
static constexpr dart::compiler::target::word Thread_field_table_values_offset =
64;
static constexpr dart::compiler::target::word
@@ -4465,11 +4459,10 @@
static constexpr dart::compiler::target::word Thread_callback_code_offset = 896;
static constexpr dart::compiler::target::word
Thread_callback_stack_return_offset = 900;
-static constexpr dart::compiler::target::word Thread_next_task_id_offset = 920;
-static constexpr dart::compiler::target::word Thread_random_offset = 928;
+static constexpr dart::compiler::target::word Thread_random_offset = 920;
static constexpr dart::compiler::target::word
Thread_jump_to_frame_entry_point_offset = 348;
-static constexpr dart::compiler::target::word Thread_tsan_utils_offset = 936;
+static constexpr dart::compiler::target::word Thread_tsan_utils_offset = 928;
static constexpr dart::compiler::target::word TsanUtils_setjmp_function_offset =
0;
static constexpr dart::compiler::target::word TsanUtils_setjmp_buffer_offset =
@@ -4970,13 +4963,13 @@
Thread_call_to_runtime_entry_point_offset = 568;
static constexpr dart::compiler::target::word
Thread_call_to_runtime_stub_offset = 256;
-static constexpr dart::compiler::target::word Thread_dart_stream_offset = 1840;
+static constexpr dart::compiler::target::word Thread_dart_stream_offset = 1832;
static constexpr dart::compiler::target::word
Thread_dispatch_table_array_offset = 88;
static constexpr dart::compiler::target::word
Thread_double_truncate_round_supported_offset = 1800;
static constexpr dart::compiler::target::word
- Thread_service_extension_stream_offset = 1848;
+ Thread_service_extension_stream_offset = 1840;
static constexpr dart::compiler::target::word Thread_optimize_entry_offset =
648;
static constexpr dart::compiler::target::word Thread_optimize_stub_offset = 472;
@@ -5021,7 +5014,7 @@
1784;
static constexpr dart::compiler::target::word Thread_isolate_offset = 80;
static constexpr dart::compiler::target::word Thread_isolate_group_offset =
- 1856;
+ 1848;
static constexpr dart::compiler::target::word Thread_field_table_values_offset =
128;
static constexpr dart::compiler::target::word
@@ -5132,11 +5125,10 @@
1768;
static constexpr dart::compiler::target::word
Thread_callback_stack_return_offset = 1776;
-static constexpr dart::compiler::target::word Thread_next_task_id_offset = 1808;
-static constexpr dart::compiler::target::word Thread_random_offset = 1816;
+static constexpr dart::compiler::target::word Thread_random_offset = 1808;
static constexpr dart::compiler::target::word
Thread_jump_to_frame_entry_point_offset = 672;
-static constexpr dart::compiler::target::word Thread_tsan_utils_offset = 1824;
+static constexpr dart::compiler::target::word Thread_tsan_utils_offset = 1816;
static constexpr dart::compiler::target::word TsanUtils_setjmp_function_offset =
0;
static constexpr dart::compiler::target::word TsanUtils_setjmp_buffer_offset =
@@ -5629,13 +5621,13 @@
Thread_call_to_runtime_entry_point_offset = 296;
static constexpr dart::compiler::target::word
Thread_call_to_runtime_stub_offset = 140;
-static constexpr dart::compiler::target::word Thread_dart_stream_offset = 904;
+static constexpr dart::compiler::target::word Thread_dart_stream_offset = 896;
static constexpr dart::compiler::target::word
Thread_dispatch_table_array_offset = 44;
static constexpr dart::compiler::target::word
Thread_double_truncate_round_supported_offset = 872;
static constexpr dart::compiler::target::word
- Thread_service_extension_stream_offset = 908;
+ Thread_service_extension_stream_offset = 900;
static constexpr dart::compiler::target::word Thread_optimize_entry_offset =
336;
static constexpr dart::compiler::target::word Thread_optimize_stub_offset = 248;
@@ -5679,7 +5671,7 @@
static constexpr dart::compiler::target::word Thread_exit_through_ffi_offset =
864;
static constexpr dart::compiler::target::word Thread_isolate_offset = 40;
-static constexpr dart::compiler::target::word Thread_isolate_group_offset = 912;
+static constexpr dart::compiler::target::word Thread_isolate_group_offset = 904;
static constexpr dart::compiler::target::word Thread_field_table_values_offset =
64;
static constexpr dart::compiler::target::word
@@ -5789,11 +5781,10 @@
static constexpr dart::compiler::target::word Thread_callback_code_offset = 856;
static constexpr dart::compiler::target::word
Thread_callback_stack_return_offset = 860;
-static constexpr dart::compiler::target::word Thread_next_task_id_offset = 880;
-static constexpr dart::compiler::target::word Thread_random_offset = 888;
+static constexpr dart::compiler::target::word Thread_random_offset = 880;
static constexpr dart::compiler::target::word
Thread_jump_to_frame_entry_point_offset = 348;
-static constexpr dart::compiler::target::word Thread_tsan_utils_offset = 896;
+static constexpr dart::compiler::target::word Thread_tsan_utils_offset = 888;
static constexpr dart::compiler::target::word TsanUtils_setjmp_function_offset =
0;
static constexpr dart::compiler::target::word TsanUtils_setjmp_buffer_offset =
@@ -6284,13 +6275,13 @@
Thread_call_to_runtime_entry_point_offset = 568;
static constexpr dart::compiler::target::word
Thread_call_to_runtime_stub_offset = 256;
-static constexpr dart::compiler::target::word Thread_dart_stream_offset = 1784;
+static constexpr dart::compiler::target::word Thread_dart_stream_offset = 1776;
static constexpr dart::compiler::target::word
Thread_dispatch_table_array_offset = 88;
static constexpr dart::compiler::target::word
Thread_double_truncate_round_supported_offset = 1744;
static constexpr dart::compiler::target::word
- Thread_service_extension_stream_offset = 1792;
+ Thread_service_extension_stream_offset = 1784;
static constexpr dart::compiler::target::word Thread_optimize_entry_offset =
648;
static constexpr dart::compiler::target::word Thread_optimize_stub_offset = 472;
@@ -6335,7 +6326,7 @@
1728;
static constexpr dart::compiler::target::word Thread_isolate_offset = 80;
static constexpr dart::compiler::target::word Thread_isolate_group_offset =
- 1800;
+ 1792;
static constexpr dart::compiler::target::word Thread_field_table_values_offset =
128;
static constexpr dart::compiler::target::word
@@ -6446,11 +6437,10 @@
1712;
static constexpr dart::compiler::target::word
Thread_callback_stack_return_offset = 1720;
-static constexpr dart::compiler::target::word Thread_next_task_id_offset = 1752;
-static constexpr dart::compiler::target::word Thread_random_offset = 1760;
+static constexpr dart::compiler::target::word Thread_random_offset = 1752;
static constexpr dart::compiler::target::word
Thread_jump_to_frame_entry_point_offset = 672;
-static constexpr dart::compiler::target::word Thread_tsan_utils_offset = 1768;
+static constexpr dart::compiler::target::word Thread_tsan_utils_offset = 1760;
static constexpr dart::compiler::target::word TsanUtils_setjmp_function_offset =
0;
static constexpr dart::compiler::target::word TsanUtils_setjmp_buffer_offset =
@@ -6940,13 +6930,13 @@
Thread_call_to_runtime_entry_point_offset = 296;
static constexpr dart::compiler::target::word
Thread_call_to_runtime_stub_offset = 140;
-static constexpr dart::compiler::target::word Thread_dart_stream_offset = 872;
+static constexpr dart::compiler::target::word Thread_dart_stream_offset = 864;
static constexpr dart::compiler::target::word
Thread_dispatch_table_array_offset = 44;
static constexpr dart::compiler::target::word
Thread_double_truncate_round_supported_offset = 840;
static constexpr dart::compiler::target::word
- Thread_service_extension_stream_offset = 876;
+ Thread_service_extension_stream_offset = 868;
static constexpr dart::compiler::target::word Thread_optimize_entry_offset =
336;
static constexpr dart::compiler::target::word Thread_optimize_stub_offset = 248;
@@ -6990,7 +6980,7 @@
static constexpr dart::compiler::target::word Thread_exit_through_ffi_offset =
832;
static constexpr dart::compiler::target::word Thread_isolate_offset = 40;
-static constexpr dart::compiler::target::word Thread_isolate_group_offset = 880;
+static constexpr dart::compiler::target::word Thread_isolate_group_offset = 872;
static constexpr dart::compiler::target::word Thread_field_table_values_offset =
64;
static constexpr dart::compiler::target::word
@@ -7100,11 +7090,10 @@
static constexpr dart::compiler::target::word Thread_callback_code_offset = 824;
static constexpr dart::compiler::target::word
Thread_callback_stack_return_offset = 828;
-static constexpr dart::compiler::target::word Thread_next_task_id_offset = 848;
-static constexpr dart::compiler::target::word Thread_random_offset = 856;
+static constexpr dart::compiler::target::word Thread_random_offset = 848;
static constexpr dart::compiler::target::word
Thread_jump_to_frame_entry_point_offset = 348;
-static constexpr dart::compiler::target::word Thread_tsan_utils_offset = 864;
+static constexpr dart::compiler::target::word Thread_tsan_utils_offset = 856;
static constexpr dart::compiler::target::word TsanUtils_setjmp_function_offset =
0;
static constexpr dart::compiler::target::word TsanUtils_setjmp_buffer_offset =
@@ -7592,13 +7581,13 @@
Thread_call_to_runtime_entry_point_offset = 568;
static constexpr dart::compiler::target::word
Thread_call_to_runtime_stub_offset = 256;
-static constexpr dart::compiler::target::word Thread_dart_stream_offset = 1848;
+static constexpr dart::compiler::target::word Thread_dart_stream_offset = 1840;
static constexpr dart::compiler::target::word
Thread_dispatch_table_array_offset = 88;
static constexpr dart::compiler::target::word
Thread_double_truncate_round_supported_offset = 1808;
static constexpr dart::compiler::target::word
- Thread_service_extension_stream_offset = 1856;
+ Thread_service_extension_stream_offset = 1848;
static constexpr dart::compiler::target::word Thread_optimize_entry_offset =
648;
static constexpr dart::compiler::target::word Thread_optimize_stub_offset = 472;
@@ -7643,7 +7632,7 @@
1792;
static constexpr dart::compiler::target::word Thread_isolate_offset = 80;
static constexpr dart::compiler::target::word Thread_isolate_group_offset =
- 1864;
+ 1856;
static constexpr dart::compiler::target::word Thread_field_table_values_offset =
128;
static constexpr dart::compiler::target::word
@@ -7754,11 +7743,10 @@
1776;
static constexpr dart::compiler::target::word
Thread_callback_stack_return_offset = 1784;
-static constexpr dart::compiler::target::word Thread_next_task_id_offset = 1816;
-static constexpr dart::compiler::target::word Thread_random_offset = 1824;
+static constexpr dart::compiler::target::word Thread_random_offset = 1816;
static constexpr dart::compiler::target::word
Thread_jump_to_frame_entry_point_offset = 672;
-static constexpr dart::compiler::target::word Thread_tsan_utils_offset = 1832;
+static constexpr dart::compiler::target::word Thread_tsan_utils_offset = 1824;
static constexpr dart::compiler::target::word TsanUtils_setjmp_function_offset =
0;
static constexpr dart::compiler::target::word TsanUtils_setjmp_buffer_offset =
@@ -8251,13 +8239,13 @@
Thread_call_to_runtime_entry_point_offset = 568;
static constexpr dart::compiler::target::word
Thread_call_to_runtime_stub_offset = 256;
-static constexpr dart::compiler::target::word Thread_dart_stream_offset = 1784;
+static constexpr dart::compiler::target::word Thread_dart_stream_offset = 1776;
static constexpr dart::compiler::target::word
Thread_dispatch_table_array_offset = 88;
static constexpr dart::compiler::target::word
Thread_double_truncate_round_supported_offset = 1744;
static constexpr dart::compiler::target::word
- Thread_service_extension_stream_offset = 1792;
+ Thread_service_extension_stream_offset = 1784;
static constexpr dart::compiler::target::word Thread_optimize_entry_offset =
648;
static constexpr dart::compiler::target::word Thread_optimize_stub_offset = 472;
@@ -8302,7 +8290,7 @@
1728;
static constexpr dart::compiler::target::word Thread_isolate_offset = 80;
static constexpr dart::compiler::target::word Thread_isolate_group_offset =
- 1800;
+ 1792;
static constexpr dart::compiler::target::word Thread_field_table_values_offset =
128;
static constexpr dart::compiler::target::word
@@ -8413,11 +8401,10 @@
1712;
static constexpr dart::compiler::target::word
Thread_callback_stack_return_offset = 1720;
-static constexpr dart::compiler::target::word Thread_next_task_id_offset = 1752;
-static constexpr dart::compiler::target::word Thread_random_offset = 1760;
+static constexpr dart::compiler::target::word Thread_random_offset = 1752;
static constexpr dart::compiler::target::word
Thread_jump_to_frame_entry_point_offset = 672;
-static constexpr dart::compiler::target::word Thread_tsan_utils_offset = 1768;
+static constexpr dart::compiler::target::word Thread_tsan_utils_offset = 1760;
static constexpr dart::compiler::target::word TsanUtils_setjmp_function_offset =
0;
static constexpr dart::compiler::target::word TsanUtils_setjmp_buffer_offset =
@@ -8909,13 +8896,13 @@
Thread_call_to_runtime_entry_point_offset = 568;
static constexpr dart::compiler::target::word
Thread_call_to_runtime_stub_offset = 256;
-static constexpr dart::compiler::target::word Thread_dart_stream_offset = 1848;
+static constexpr dart::compiler::target::word Thread_dart_stream_offset = 1840;
static constexpr dart::compiler::target::word
Thread_dispatch_table_array_offset = 88;
static constexpr dart::compiler::target::word
Thread_double_truncate_round_supported_offset = 1808;
static constexpr dart::compiler::target::word
- Thread_service_extension_stream_offset = 1856;
+ Thread_service_extension_stream_offset = 1848;
static constexpr dart::compiler::target::word Thread_optimize_entry_offset =
648;
static constexpr dart::compiler::target::word Thread_optimize_stub_offset = 472;
@@ -8960,7 +8947,7 @@
1792;
static constexpr dart::compiler::target::word Thread_isolate_offset = 80;
static constexpr dart::compiler::target::word Thread_isolate_group_offset =
- 1864;
+ 1856;
static constexpr dart::compiler::target::word Thread_field_table_values_offset =
128;
static constexpr dart::compiler::target::word
@@ -9071,11 +9058,10 @@
1776;
static constexpr dart::compiler::target::word
Thread_callback_stack_return_offset = 1784;
-static constexpr dart::compiler::target::word Thread_next_task_id_offset = 1816;
-static constexpr dart::compiler::target::word Thread_random_offset = 1824;
+static constexpr dart::compiler::target::word Thread_random_offset = 1816;
static constexpr dart::compiler::target::word
Thread_jump_to_frame_entry_point_offset = 672;
-static constexpr dart::compiler::target::word Thread_tsan_utils_offset = 1832;
+static constexpr dart::compiler::target::word Thread_tsan_utils_offset = 1824;
static constexpr dart::compiler::target::word TsanUtils_setjmp_function_offset =
0;
static constexpr dart::compiler::target::word TsanUtils_setjmp_buffer_offset =
@@ -9566,13 +9552,13 @@
Thread_call_to_runtime_entry_point_offset = 296;
static constexpr dart::compiler::target::word
Thread_call_to_runtime_stub_offset = 140;
-static constexpr dart::compiler::target::word Thread_dart_stream_offset = 944;
+static constexpr dart::compiler::target::word Thread_dart_stream_offset = 936;
static constexpr dart::compiler::target::word
Thread_dispatch_table_array_offset = 44;
static constexpr dart::compiler::target::word
Thread_double_truncate_round_supported_offset = 912;
static constexpr dart::compiler::target::word
- Thread_service_extension_stream_offset = 948;
+ Thread_service_extension_stream_offset = 940;
static constexpr dart::compiler::target::word Thread_optimize_entry_offset =
336;
static constexpr dart::compiler::target::word Thread_optimize_stub_offset = 248;
@@ -9616,7 +9602,7 @@
static constexpr dart::compiler::target::word Thread_exit_through_ffi_offset =
904;
static constexpr dart::compiler::target::word Thread_isolate_offset = 40;
-static constexpr dart::compiler::target::word Thread_isolate_group_offset = 952;
+static constexpr dart::compiler::target::word Thread_isolate_group_offset = 944;
static constexpr dart::compiler::target::word Thread_field_table_values_offset =
64;
static constexpr dart::compiler::target::word
@@ -9726,11 +9712,10 @@
static constexpr dart::compiler::target::word Thread_callback_code_offset = 896;
static constexpr dart::compiler::target::word
Thread_callback_stack_return_offset = 900;
-static constexpr dart::compiler::target::word Thread_next_task_id_offset = 920;
-static constexpr dart::compiler::target::word Thread_random_offset = 928;
+static constexpr dart::compiler::target::word Thread_random_offset = 920;
static constexpr dart::compiler::target::word
Thread_jump_to_frame_entry_point_offset = 348;
-static constexpr dart::compiler::target::word Thread_tsan_utils_offset = 936;
+static constexpr dart::compiler::target::word Thread_tsan_utils_offset = 928;
static constexpr dart::compiler::target::word TsanUtils_setjmp_function_offset =
0;
static constexpr dart::compiler::target::word TsanUtils_setjmp_buffer_offset =
@@ -10223,13 +10208,13 @@
Thread_call_to_runtime_entry_point_offset = 568;
static constexpr dart::compiler::target::word
Thread_call_to_runtime_stub_offset = 256;
-static constexpr dart::compiler::target::word Thread_dart_stream_offset = 1840;
+static constexpr dart::compiler::target::word Thread_dart_stream_offset = 1832;
static constexpr dart::compiler::target::word
Thread_dispatch_table_array_offset = 88;
static constexpr dart::compiler::target::word
Thread_double_truncate_round_supported_offset = 1800;
static constexpr dart::compiler::target::word
- Thread_service_extension_stream_offset = 1848;
+ Thread_service_extension_stream_offset = 1840;
static constexpr dart::compiler::target::word Thread_optimize_entry_offset =
648;
static constexpr dart::compiler::target::word Thread_optimize_stub_offset = 472;
@@ -10274,7 +10259,7 @@
1784;
static constexpr dart::compiler::target::word Thread_isolate_offset = 80;
static constexpr dart::compiler::target::word Thread_isolate_group_offset =
- 1856;
+ 1848;
static constexpr dart::compiler::target::word Thread_field_table_values_offset =
128;
static constexpr dart::compiler::target::word
@@ -10385,11 +10370,10 @@
1768;
static constexpr dart::compiler::target::word
Thread_callback_stack_return_offset = 1776;
-static constexpr dart::compiler::target::word Thread_next_task_id_offset = 1808;
-static constexpr dart::compiler::target::word Thread_random_offset = 1816;
+static constexpr dart::compiler::target::word Thread_random_offset = 1808;
static constexpr dart::compiler::target::word
Thread_jump_to_frame_entry_point_offset = 672;
-static constexpr dart::compiler::target::word Thread_tsan_utils_offset = 1824;
+static constexpr dart::compiler::target::word Thread_tsan_utils_offset = 1816;
static constexpr dart::compiler::target::word TsanUtils_setjmp_function_offset =
0;
static constexpr dart::compiler::target::word TsanUtils_setjmp_buffer_offset =
@@ -10920,13 +10904,13 @@
static constexpr dart::compiler::target::word
AOT_Thread_call_to_runtime_stub_offset = 140;
static constexpr dart::compiler::target::word AOT_Thread_dart_stream_offset =
- 904;
+ 896;
static constexpr dart::compiler::target::word
AOT_Thread_dispatch_table_array_offset = 44;
static constexpr dart::compiler::target::word
AOT_Thread_double_truncate_round_supported_offset = 872;
static constexpr dart::compiler::target::word
- AOT_Thread_service_extension_stream_offset = 908;
+ AOT_Thread_service_extension_stream_offset = 900;
static constexpr dart::compiler::target::word AOT_Thread_optimize_entry_offset =
336;
static constexpr dart::compiler::target::word AOT_Thread_optimize_stub_offset =
@@ -10972,7 +10956,7 @@
AOT_Thread_exit_through_ffi_offset = 864;
static constexpr dart::compiler::target::word AOT_Thread_isolate_offset = 40;
static constexpr dart::compiler::target::word AOT_Thread_isolate_group_offset =
- 912;
+ 904;
static constexpr dart::compiler::target::word
AOT_Thread_field_table_values_offset = 64;
static constexpr dart::compiler::target::word
@@ -11089,13 +11073,11 @@
856;
static constexpr dart::compiler::target::word
AOT_Thread_callback_stack_return_offset = 860;
-static constexpr dart::compiler::target::word AOT_Thread_next_task_id_offset =
- 880;
-static constexpr dart::compiler::target::word AOT_Thread_random_offset = 888;
+static constexpr dart::compiler::target::word AOT_Thread_random_offset = 880;
static constexpr dart::compiler::target::word
AOT_Thread_jump_to_frame_entry_point_offset = 348;
static constexpr dart::compiler::target::word AOT_Thread_tsan_utils_offset =
- 896;
+ 888;
static constexpr dart::compiler::target::word
AOT_TsanUtils_setjmp_function_offset = 0;
static constexpr dart::compiler::target::word
@@ -11656,13 +11638,13 @@
static constexpr dart::compiler::target::word
AOT_Thread_call_to_runtime_stub_offset = 256;
static constexpr dart::compiler::target::word AOT_Thread_dart_stream_offset =
- 1784;
+ 1776;
static constexpr dart::compiler::target::word
AOT_Thread_dispatch_table_array_offset = 88;
static constexpr dart::compiler::target::word
AOT_Thread_double_truncate_round_supported_offset = 1744;
static constexpr dart::compiler::target::word
- AOT_Thread_service_extension_stream_offset = 1792;
+ AOT_Thread_service_extension_stream_offset = 1784;
static constexpr dart::compiler::target::word AOT_Thread_optimize_entry_offset =
648;
static constexpr dart::compiler::target::word AOT_Thread_optimize_stub_offset =
@@ -11708,7 +11690,7 @@
AOT_Thread_exit_through_ffi_offset = 1728;
static constexpr dart::compiler::target::word AOT_Thread_isolate_offset = 80;
static constexpr dart::compiler::target::word AOT_Thread_isolate_group_offset =
- 1800;
+ 1792;
static constexpr dart::compiler::target::word
AOT_Thread_field_table_values_offset = 128;
static constexpr dart::compiler::target::word
@@ -11826,13 +11808,11 @@
1712;
static constexpr dart::compiler::target::word
AOT_Thread_callback_stack_return_offset = 1720;
-static constexpr dart::compiler::target::word AOT_Thread_next_task_id_offset =
- 1752;
-static constexpr dart::compiler::target::word AOT_Thread_random_offset = 1760;
+static constexpr dart::compiler::target::word AOT_Thread_random_offset = 1752;
static constexpr dart::compiler::target::word
AOT_Thread_jump_to_frame_entry_point_offset = 672;
static constexpr dart::compiler::target::word AOT_Thread_tsan_utils_offset =
- 1768;
+ 1760;
static constexpr dart::compiler::target::word
AOT_TsanUtils_setjmp_function_offset = 0;
static constexpr dart::compiler::target::word
@@ -12398,13 +12378,13 @@
static constexpr dart::compiler::target::word
AOT_Thread_call_to_runtime_stub_offset = 256;
static constexpr dart::compiler::target::word AOT_Thread_dart_stream_offset =
- 1848;
+ 1840;
static constexpr dart::compiler::target::word
AOT_Thread_dispatch_table_array_offset = 88;
static constexpr dart::compiler::target::word
AOT_Thread_double_truncate_round_supported_offset = 1808;
static constexpr dart::compiler::target::word
- AOT_Thread_service_extension_stream_offset = 1856;
+ AOT_Thread_service_extension_stream_offset = 1848;
static constexpr dart::compiler::target::word AOT_Thread_optimize_entry_offset =
648;
static constexpr dart::compiler::target::word AOT_Thread_optimize_stub_offset =
@@ -12450,7 +12430,7 @@
AOT_Thread_exit_through_ffi_offset = 1792;
static constexpr dart::compiler::target::word AOT_Thread_isolate_offset = 80;
static constexpr dart::compiler::target::word AOT_Thread_isolate_group_offset =
- 1864;
+ 1856;
static constexpr dart::compiler::target::word
AOT_Thread_field_table_values_offset = 128;
static constexpr dart::compiler::target::word
@@ -12568,13 +12548,11 @@
1776;
static constexpr dart::compiler::target::word
AOT_Thread_callback_stack_return_offset = 1784;
-static constexpr dart::compiler::target::word AOT_Thread_next_task_id_offset =
- 1816;
-static constexpr dart::compiler::target::word AOT_Thread_random_offset = 1824;
+static constexpr dart::compiler::target::word AOT_Thread_random_offset = 1816;
static constexpr dart::compiler::target::word
AOT_Thread_jump_to_frame_entry_point_offset = 672;
static constexpr dart::compiler::target::word AOT_Thread_tsan_utils_offset =
- 1832;
+ 1824;
static constexpr dart::compiler::target::word
AOT_TsanUtils_setjmp_function_offset = 0;
static constexpr dart::compiler::target::word
@@ -13137,13 +13115,13 @@
static constexpr dart::compiler::target::word
AOT_Thread_call_to_runtime_stub_offset = 256;
static constexpr dart::compiler::target::word AOT_Thread_dart_stream_offset =
- 1784;
+ 1776;
static constexpr dart::compiler::target::word
AOT_Thread_dispatch_table_array_offset = 88;
static constexpr dart::compiler::target::word
AOT_Thread_double_truncate_round_supported_offset = 1744;
static constexpr dart::compiler::target::word
- AOT_Thread_service_extension_stream_offset = 1792;
+ AOT_Thread_service_extension_stream_offset = 1784;
static constexpr dart::compiler::target::word AOT_Thread_optimize_entry_offset =
648;
static constexpr dart::compiler::target::word AOT_Thread_optimize_stub_offset =
@@ -13189,7 +13167,7 @@
AOT_Thread_exit_through_ffi_offset = 1728;
static constexpr dart::compiler::target::word AOT_Thread_isolate_offset = 80;
static constexpr dart::compiler::target::word AOT_Thread_isolate_group_offset =
- 1800;
+ 1792;
static constexpr dart::compiler::target::word
AOT_Thread_field_table_values_offset = 128;
static constexpr dart::compiler::target::word
@@ -13307,13 +13285,11 @@
1712;
static constexpr dart::compiler::target::word
AOT_Thread_callback_stack_return_offset = 1720;
-static constexpr dart::compiler::target::word AOT_Thread_next_task_id_offset =
- 1752;
-static constexpr dart::compiler::target::word AOT_Thread_random_offset = 1760;
+static constexpr dart::compiler::target::word AOT_Thread_random_offset = 1752;
static constexpr dart::compiler::target::word
AOT_Thread_jump_to_frame_entry_point_offset = 672;
static constexpr dart::compiler::target::word AOT_Thread_tsan_utils_offset =
- 1768;
+ 1760;
static constexpr dart::compiler::target::word
AOT_TsanUtils_setjmp_function_offset = 0;
static constexpr dart::compiler::target::word
@@ -13875,13 +13851,13 @@
static constexpr dart::compiler::target::word
AOT_Thread_call_to_runtime_stub_offset = 256;
static constexpr dart::compiler::target::word AOT_Thread_dart_stream_offset =
- 1848;
+ 1840;
static constexpr dart::compiler::target::word
AOT_Thread_dispatch_table_array_offset = 88;
static constexpr dart::compiler::target::word
AOT_Thread_double_truncate_round_supported_offset = 1808;
static constexpr dart::compiler::target::word
- AOT_Thread_service_extension_stream_offset = 1856;
+ AOT_Thread_service_extension_stream_offset = 1848;
static constexpr dart::compiler::target::word AOT_Thread_optimize_entry_offset =
648;
static constexpr dart::compiler::target::word AOT_Thread_optimize_stub_offset =
@@ -13927,7 +13903,7 @@
AOT_Thread_exit_through_ffi_offset = 1792;
static constexpr dart::compiler::target::word AOT_Thread_isolate_offset = 80;
static constexpr dart::compiler::target::word AOT_Thread_isolate_group_offset =
- 1864;
+ 1856;
static constexpr dart::compiler::target::word
AOT_Thread_field_table_values_offset = 128;
static constexpr dart::compiler::target::word
@@ -14045,13 +14021,11 @@
1776;
static constexpr dart::compiler::target::word
AOT_Thread_callback_stack_return_offset = 1784;
-static constexpr dart::compiler::target::word AOT_Thread_next_task_id_offset =
- 1816;
-static constexpr dart::compiler::target::word AOT_Thread_random_offset = 1824;
+static constexpr dart::compiler::target::word AOT_Thread_random_offset = 1816;
static constexpr dart::compiler::target::word
AOT_Thread_jump_to_frame_entry_point_offset = 672;
static constexpr dart::compiler::target::word AOT_Thread_tsan_utils_offset =
- 1832;
+ 1824;
static constexpr dart::compiler::target::word
AOT_TsanUtils_setjmp_function_offset = 0;
static constexpr dart::compiler::target::word
@@ -14614,13 +14588,13 @@
static constexpr dart::compiler::target::word
AOT_Thread_call_to_runtime_stub_offset = 140;
static constexpr dart::compiler::target::word AOT_Thread_dart_stream_offset =
- 944;
+ 936;
static constexpr dart::compiler::target::word
AOT_Thread_dispatch_table_array_offset = 44;
static constexpr dart::compiler::target::word
AOT_Thread_double_truncate_round_supported_offset = 912;
static constexpr dart::compiler::target::word
- AOT_Thread_service_extension_stream_offset = 948;
+ AOT_Thread_service_extension_stream_offset = 940;
static constexpr dart::compiler::target::word AOT_Thread_optimize_entry_offset =
336;
static constexpr dart::compiler::target::word AOT_Thread_optimize_stub_offset =
@@ -14666,7 +14640,7 @@
AOT_Thread_exit_through_ffi_offset = 904;
static constexpr dart::compiler::target::word AOT_Thread_isolate_offset = 40;
static constexpr dart::compiler::target::word AOT_Thread_isolate_group_offset =
- 952;
+ 944;
static constexpr dart::compiler::target::word
AOT_Thread_field_table_values_offset = 64;
static constexpr dart::compiler::target::word
@@ -14783,13 +14757,11 @@
896;
static constexpr dart::compiler::target::word
AOT_Thread_callback_stack_return_offset = 900;
-static constexpr dart::compiler::target::word AOT_Thread_next_task_id_offset =
- 920;
-static constexpr dart::compiler::target::word AOT_Thread_random_offset = 928;
+static constexpr dart::compiler::target::word AOT_Thread_random_offset = 920;
static constexpr dart::compiler::target::word
AOT_Thread_jump_to_frame_entry_point_offset = 348;
static constexpr dart::compiler::target::word AOT_Thread_tsan_utils_offset =
- 936;
+ 928;
static constexpr dart::compiler::target::word
AOT_TsanUtils_setjmp_function_offset = 0;
static constexpr dart::compiler::target::word
@@ -15352,13 +15324,13 @@
static constexpr dart::compiler::target::word
AOT_Thread_call_to_runtime_stub_offset = 256;
static constexpr dart::compiler::target::word AOT_Thread_dart_stream_offset =
- 1840;
+ 1832;
static constexpr dart::compiler::target::word
AOT_Thread_dispatch_table_array_offset = 88;
static constexpr dart::compiler::target::word
AOT_Thread_double_truncate_round_supported_offset = 1800;
static constexpr dart::compiler::target::word
- AOT_Thread_service_extension_stream_offset = 1848;
+ AOT_Thread_service_extension_stream_offset = 1840;
static constexpr dart::compiler::target::word AOT_Thread_optimize_entry_offset =
648;
static constexpr dart::compiler::target::word AOT_Thread_optimize_stub_offset =
@@ -15404,7 +15376,7 @@
AOT_Thread_exit_through_ffi_offset = 1784;
static constexpr dart::compiler::target::word AOT_Thread_isolate_offset = 80;
static constexpr dart::compiler::target::word AOT_Thread_isolate_group_offset =
- 1856;
+ 1848;
static constexpr dart::compiler::target::word
AOT_Thread_field_table_values_offset = 128;
static constexpr dart::compiler::target::word
@@ -15522,13 +15494,11 @@
1768;
static constexpr dart::compiler::target::word
AOT_Thread_callback_stack_return_offset = 1776;
-static constexpr dart::compiler::target::word AOT_Thread_next_task_id_offset =
- 1808;
-static constexpr dart::compiler::target::word AOT_Thread_random_offset = 1816;
+static constexpr dart::compiler::target::word AOT_Thread_random_offset = 1808;
static constexpr dart::compiler::target::word
AOT_Thread_jump_to_frame_entry_point_offset = 672;
static constexpr dart::compiler::target::word AOT_Thread_tsan_utils_offset =
- 1824;
+ 1816;
static constexpr dart::compiler::target::word
AOT_TsanUtils_setjmp_function_offset = 0;
static constexpr dart::compiler::target::word
@@ -16084,13 +16054,13 @@
static constexpr dart::compiler::target::word
AOT_Thread_call_to_runtime_stub_offset = 140;
static constexpr dart::compiler::target::word AOT_Thread_dart_stream_offset =
- 904;
+ 896;
static constexpr dart::compiler::target::word
AOT_Thread_dispatch_table_array_offset = 44;
static constexpr dart::compiler::target::word
AOT_Thread_double_truncate_round_supported_offset = 872;
static constexpr dart::compiler::target::word
- AOT_Thread_service_extension_stream_offset = 908;
+ AOT_Thread_service_extension_stream_offset = 900;
static constexpr dart::compiler::target::word AOT_Thread_optimize_entry_offset =
336;
static constexpr dart::compiler::target::word AOT_Thread_optimize_stub_offset =
@@ -16136,7 +16106,7 @@
AOT_Thread_exit_through_ffi_offset = 864;
static constexpr dart::compiler::target::word AOT_Thread_isolate_offset = 40;
static constexpr dart::compiler::target::word AOT_Thread_isolate_group_offset =
- 912;
+ 904;
static constexpr dart::compiler::target::word
AOT_Thread_field_table_values_offset = 64;
static constexpr dart::compiler::target::word
@@ -16253,13 +16223,11 @@
856;
static constexpr dart::compiler::target::word
AOT_Thread_callback_stack_return_offset = 860;
-static constexpr dart::compiler::target::word AOT_Thread_next_task_id_offset =
- 880;
-static constexpr dart::compiler::target::word AOT_Thread_random_offset = 888;
+static constexpr dart::compiler::target::word AOT_Thread_random_offset = 880;
static constexpr dart::compiler::target::word
AOT_Thread_jump_to_frame_entry_point_offset = 348;
static constexpr dart::compiler::target::word AOT_Thread_tsan_utils_offset =
- 896;
+ 888;
static constexpr dart::compiler::target::word
AOT_TsanUtils_setjmp_function_offset = 0;
static constexpr dart::compiler::target::word
@@ -16811,13 +16779,13 @@
static constexpr dart::compiler::target::word
AOT_Thread_call_to_runtime_stub_offset = 256;
static constexpr dart::compiler::target::word AOT_Thread_dart_stream_offset =
- 1784;
+ 1776;
static constexpr dart::compiler::target::word
AOT_Thread_dispatch_table_array_offset = 88;
static constexpr dart::compiler::target::word
AOT_Thread_double_truncate_round_supported_offset = 1744;
static constexpr dart::compiler::target::word
- AOT_Thread_service_extension_stream_offset = 1792;
+ AOT_Thread_service_extension_stream_offset = 1784;
static constexpr dart::compiler::target::word AOT_Thread_optimize_entry_offset =
648;
static constexpr dart::compiler::target::word AOT_Thread_optimize_stub_offset =
@@ -16863,7 +16831,7 @@
AOT_Thread_exit_through_ffi_offset = 1728;
static constexpr dart::compiler::target::word AOT_Thread_isolate_offset = 80;
static constexpr dart::compiler::target::word AOT_Thread_isolate_group_offset =
- 1800;
+ 1792;
static constexpr dart::compiler::target::word
AOT_Thread_field_table_values_offset = 128;
static constexpr dart::compiler::target::word
@@ -16981,13 +16949,11 @@
1712;
static constexpr dart::compiler::target::word
AOT_Thread_callback_stack_return_offset = 1720;
-static constexpr dart::compiler::target::word AOT_Thread_next_task_id_offset =
- 1752;
-static constexpr dart::compiler::target::word AOT_Thread_random_offset = 1760;
+static constexpr dart::compiler::target::word AOT_Thread_random_offset = 1752;
static constexpr dart::compiler::target::word
AOT_Thread_jump_to_frame_entry_point_offset = 672;
static constexpr dart::compiler::target::word AOT_Thread_tsan_utils_offset =
- 1768;
+ 1760;
static constexpr dart::compiler::target::word
AOT_TsanUtils_setjmp_function_offset = 0;
static constexpr dart::compiler::target::word
@@ -17544,13 +17510,13 @@
static constexpr dart::compiler::target::word
AOT_Thread_call_to_runtime_stub_offset = 256;
static constexpr dart::compiler::target::word AOT_Thread_dart_stream_offset =
- 1848;
+ 1840;
static constexpr dart::compiler::target::word
AOT_Thread_dispatch_table_array_offset = 88;
static constexpr dart::compiler::target::word
AOT_Thread_double_truncate_round_supported_offset = 1808;
static constexpr dart::compiler::target::word
- AOT_Thread_service_extension_stream_offset = 1856;
+ AOT_Thread_service_extension_stream_offset = 1848;
static constexpr dart::compiler::target::word AOT_Thread_optimize_entry_offset =
648;
static constexpr dart::compiler::target::word AOT_Thread_optimize_stub_offset =
@@ -17596,7 +17562,7 @@
AOT_Thread_exit_through_ffi_offset = 1792;
static constexpr dart::compiler::target::word AOT_Thread_isolate_offset = 80;
static constexpr dart::compiler::target::word AOT_Thread_isolate_group_offset =
- 1864;
+ 1856;
static constexpr dart::compiler::target::word
AOT_Thread_field_table_values_offset = 128;
static constexpr dart::compiler::target::word
@@ -17714,13 +17680,11 @@
1776;
static constexpr dart::compiler::target::word
AOT_Thread_callback_stack_return_offset = 1784;
-static constexpr dart::compiler::target::word AOT_Thread_next_task_id_offset =
- 1816;
-static constexpr dart::compiler::target::word AOT_Thread_random_offset = 1824;
+static constexpr dart::compiler::target::word AOT_Thread_random_offset = 1816;
static constexpr dart::compiler::target::word
AOT_Thread_jump_to_frame_entry_point_offset = 672;
static constexpr dart::compiler::target::word AOT_Thread_tsan_utils_offset =
- 1832;
+ 1824;
static constexpr dart::compiler::target::word
AOT_TsanUtils_setjmp_function_offset = 0;
static constexpr dart::compiler::target::word
@@ -18274,13 +18238,13 @@
static constexpr dart::compiler::target::word
AOT_Thread_call_to_runtime_stub_offset = 256;
static constexpr dart::compiler::target::word AOT_Thread_dart_stream_offset =
- 1784;
+ 1776;
static constexpr dart::compiler::target::word
AOT_Thread_dispatch_table_array_offset = 88;
static constexpr dart::compiler::target::word
AOT_Thread_double_truncate_round_supported_offset = 1744;
static constexpr dart::compiler::target::word
- AOT_Thread_service_extension_stream_offset = 1792;
+ AOT_Thread_service_extension_stream_offset = 1784;
static constexpr dart::compiler::target::word AOT_Thread_optimize_entry_offset =
648;
static constexpr dart::compiler::target::word AOT_Thread_optimize_stub_offset =
@@ -18326,7 +18290,7 @@
AOT_Thread_exit_through_ffi_offset = 1728;
static constexpr dart::compiler::target::word AOT_Thread_isolate_offset = 80;
static constexpr dart::compiler::target::word AOT_Thread_isolate_group_offset =
- 1800;
+ 1792;
static constexpr dart::compiler::target::word
AOT_Thread_field_table_values_offset = 128;
static constexpr dart::compiler::target::word
@@ -18444,13 +18408,11 @@
1712;
static constexpr dart::compiler::target::word
AOT_Thread_callback_stack_return_offset = 1720;
-static constexpr dart::compiler::target::word AOT_Thread_next_task_id_offset =
- 1752;
-static constexpr dart::compiler::target::word AOT_Thread_random_offset = 1760;
+static constexpr dart::compiler::target::word AOT_Thread_random_offset = 1752;
static constexpr dart::compiler::target::word
AOT_Thread_jump_to_frame_entry_point_offset = 672;
static constexpr dart::compiler::target::word AOT_Thread_tsan_utils_offset =
- 1768;
+ 1760;
static constexpr dart::compiler::target::word
AOT_TsanUtils_setjmp_function_offset = 0;
static constexpr dart::compiler::target::word
@@ -19003,13 +18965,13 @@
static constexpr dart::compiler::target::word
AOT_Thread_call_to_runtime_stub_offset = 256;
static constexpr dart::compiler::target::word AOT_Thread_dart_stream_offset =
- 1848;
+ 1840;
static constexpr dart::compiler::target::word
AOT_Thread_dispatch_table_array_offset = 88;
static constexpr dart::compiler::target::word
AOT_Thread_double_truncate_round_supported_offset = 1808;
static constexpr dart::compiler::target::word
- AOT_Thread_service_extension_stream_offset = 1856;
+ AOT_Thread_service_extension_stream_offset = 1848;
static constexpr dart::compiler::target::word AOT_Thread_optimize_entry_offset =
648;
static constexpr dart::compiler::target::word AOT_Thread_optimize_stub_offset =
@@ -19055,7 +19017,7 @@
AOT_Thread_exit_through_ffi_offset = 1792;
static constexpr dart::compiler::target::word AOT_Thread_isolate_offset = 80;
static constexpr dart::compiler::target::word AOT_Thread_isolate_group_offset =
- 1864;
+ 1856;
static constexpr dart::compiler::target::word
AOT_Thread_field_table_values_offset = 128;
static constexpr dart::compiler::target::word
@@ -19173,13 +19135,11 @@
1776;
static constexpr dart::compiler::target::word
AOT_Thread_callback_stack_return_offset = 1784;
-static constexpr dart::compiler::target::word AOT_Thread_next_task_id_offset =
- 1816;
-static constexpr dart::compiler::target::word AOT_Thread_random_offset = 1824;
+static constexpr dart::compiler::target::word AOT_Thread_random_offset = 1816;
static constexpr dart::compiler::target::word
AOT_Thread_jump_to_frame_entry_point_offset = 672;
static constexpr dart::compiler::target::word AOT_Thread_tsan_utils_offset =
- 1832;
+ 1824;
static constexpr dart::compiler::target::word
AOT_TsanUtils_setjmp_function_offset = 0;
static constexpr dart::compiler::target::word
@@ -19733,13 +19693,13 @@
static constexpr dart::compiler::target::word
AOT_Thread_call_to_runtime_stub_offset = 140;
static constexpr dart::compiler::target::word AOT_Thread_dart_stream_offset =
- 944;
+ 936;
static constexpr dart::compiler::target::word
AOT_Thread_dispatch_table_array_offset = 44;
static constexpr dart::compiler::target::word
AOT_Thread_double_truncate_round_supported_offset = 912;
static constexpr dart::compiler::target::word
- AOT_Thread_service_extension_stream_offset = 948;
+ AOT_Thread_service_extension_stream_offset = 940;
static constexpr dart::compiler::target::word AOT_Thread_optimize_entry_offset =
336;
static constexpr dart::compiler::target::word AOT_Thread_optimize_stub_offset =
@@ -19785,7 +19745,7 @@
AOT_Thread_exit_through_ffi_offset = 904;
static constexpr dart::compiler::target::word AOT_Thread_isolate_offset = 40;
static constexpr dart::compiler::target::word AOT_Thread_isolate_group_offset =
- 952;
+ 944;
static constexpr dart::compiler::target::word
AOT_Thread_field_table_values_offset = 64;
static constexpr dart::compiler::target::word
@@ -19902,13 +19862,11 @@
896;
static constexpr dart::compiler::target::word
AOT_Thread_callback_stack_return_offset = 900;
-static constexpr dart::compiler::target::word AOT_Thread_next_task_id_offset =
- 920;
-static constexpr dart::compiler::target::word AOT_Thread_random_offset = 928;
+static constexpr dart::compiler::target::word AOT_Thread_random_offset = 920;
static constexpr dart::compiler::target::word
AOT_Thread_jump_to_frame_entry_point_offset = 348;
static constexpr dart::compiler::target::word AOT_Thread_tsan_utils_offset =
- 936;
+ 928;
static constexpr dart::compiler::target::word
AOT_TsanUtils_setjmp_function_offset = 0;
static constexpr dart::compiler::target::word
@@ -20462,13 +20420,13 @@
static constexpr dart::compiler::target::word
AOT_Thread_call_to_runtime_stub_offset = 256;
static constexpr dart::compiler::target::word AOT_Thread_dart_stream_offset =
- 1840;
+ 1832;
static constexpr dart::compiler::target::word
AOT_Thread_dispatch_table_array_offset = 88;
static constexpr dart::compiler::target::word
AOT_Thread_double_truncate_round_supported_offset = 1800;
static constexpr dart::compiler::target::word
- AOT_Thread_service_extension_stream_offset = 1848;
+ AOT_Thread_service_extension_stream_offset = 1840;
static constexpr dart::compiler::target::word AOT_Thread_optimize_entry_offset =
648;
static constexpr dart::compiler::target::word AOT_Thread_optimize_stub_offset =
@@ -20514,7 +20472,7 @@
AOT_Thread_exit_through_ffi_offset = 1784;
static constexpr dart::compiler::target::word AOT_Thread_isolate_offset = 80;
static constexpr dart::compiler::target::word AOT_Thread_isolate_group_offset =
- 1856;
+ 1848;
static constexpr dart::compiler::target::word
AOT_Thread_field_table_values_offset = 128;
static constexpr dart::compiler::target::word
@@ -20632,13 +20590,11 @@
1768;
static constexpr dart::compiler::target::word
AOT_Thread_callback_stack_return_offset = 1776;
-static constexpr dart::compiler::target::word AOT_Thread_next_task_id_offset =
- 1808;
-static constexpr dart::compiler::target::word AOT_Thread_random_offset = 1816;
+static constexpr dart::compiler::target::word AOT_Thread_random_offset = 1808;
static constexpr dart::compiler::target::word
AOT_Thread_jump_to_frame_entry_point_offset = 672;
static constexpr dart::compiler::target::word AOT_Thread_tsan_utils_offset =
- 1824;
+ 1816;
static constexpr dart::compiler::target::word
AOT_TsanUtils_setjmp_function_offset = 0;
static constexpr dart::compiler::target::word
diff --git a/runtime/vm/compiler/runtime_offsets_list.h b/runtime/vm/compiler/runtime_offsets_list.h
index b651415..e1cd318 100644
--- a/runtime/vm/compiler/runtime_offsets_list.h
+++ b/runtime/vm/compiler/runtime_offsets_list.h
@@ -318,7 +318,6 @@
FIELD(Thread, heap_base_offset) \
FIELD(Thread, callback_code_offset) \
FIELD(Thread, callback_stack_return_offset) \
- FIELD(Thread, next_task_id_offset) \
FIELD(Thread, random_offset) \
FIELD(Thread, jump_to_frame_entry_point_offset) \
FIELD(Thread, tsan_utils_offset) \
diff --git a/runtime/vm/dart.cc b/runtime/vm/dart.cc
index a12f853..9d66e4d 100644
--- a/runtime/vm/dart.cc
+++ b/runtime/vm/dart.cc
@@ -307,7 +307,6 @@
#endif
OSThread::Init();
- Random::Init();
Zone::Init();
#if defined(SUPPORT_TIMELINE)
Timeline::Init();
@@ -780,7 +779,6 @@
Timeline::Cleanup();
#endif
Zone::Cleanup();
- Random::Cleanup();
// Delete the current thread's TLS and set it's TLS to null.
// If it is the last thread then the destructor would call
// OSThread::Cleanup.
diff --git a/runtime/vm/dart_api_impl.cc b/runtime/vm/dart_api_impl.cc
index 368fab3..32954d6 100644
--- a/runtime/vm/dart_api_impl.cc
+++ b/runtime/vm/dart_api_impl.cc
@@ -6361,10 +6361,10 @@
if (event != NULL) {
switch (type) {
case Dart_Timeline_Event_Begin:
- event->Begin(label, timestamp0, timestamp1_or_async_id);
+ event->Begin(label, timestamp0);
break;
case Dart_Timeline_Event_End:
- event->End(label, timestamp0, timestamp1_or_async_id);
+ event->End(label, timestamp0);
break;
case Dart_Timeline_Event_Instant:
event->Instant(label, timestamp0);
diff --git a/runtime/vm/debugger.cc b/runtime/vm/debugger.cc
index e2259d3..ac54b5f 100644
--- a/runtime/vm/debugger.cc
+++ b/runtime/vm/debugger.cc
@@ -306,7 +306,7 @@
pc_desc_(PcDescriptors::ZoneHandle()) {
// Extract the function and the code from the asynchronous activation.
function_ = async_activation.function();
- if (caller_closure_finder->IsCompactAsyncCallback(function_)) {
+ if (caller_closure_finder->IsAsyncCallback(function_)) {
const auto& suspend_state = SuspendState::Handle(
caller_closure_finder->GetSuspendStateFromAsyncCallback(
async_activation));
@@ -2944,16 +2944,6 @@
return bpt_location->AddPerClosure(this, closure, for_over_await);
}
-Breakpoint* Debugger::SetBreakpointAtAsyncOp(const Function& async_op) {
- const Script& script = Script::Handle(async_op.script());
- BreakpointLocation* bpt_location =
- SetBreakpoint(script, async_op.token_pos(), async_op.end_token_pos(), -1,
- -1 /* no line/col */, async_op);
- auto bpt = bpt_location->AddSingleShot(this);
- bpt->set_is_synthetic_async(true);
- return bpt;
-}
-
Breakpoint* Debugger::BreakpointAtActivation(const Instance& closure) {
if (!closure.IsClosure()) {
return NULL;
@@ -4422,7 +4412,7 @@
void Debugger::AsyncStepInto(const Closure& async_op) {
Zone* zone = Thread::Current()->zone();
CallerClosureFinder caller_closure_finder(zone);
- if (caller_closure_finder.IsCompactAsyncCallback(
+ if (caller_closure_finder.IsAsyncCallback(
Function::Handle(zone, async_op.function()))) {
const auto& suspend_state = SuspendState::Handle(
zone, caller_closure_finder.GetSuspendStateFromAsyncCallback(async_op));
diff --git a/runtime/vm/debugger.h b/runtime/vm/debugger.h
index 625d148..f3c461e 100644
--- a/runtime/vm/debugger.h
+++ b/runtime/vm/debugger.h
@@ -719,10 +719,6 @@
intptr_t line_number,
intptr_t column_number);
- // Sets synthetic breakpoint at async_op to step over the synthetic part of
- // the stack trace.
- Breakpoint* SetBreakpointAtAsyncOp(const Function& async_op);
-
BreakpointLocation* BreakpointLocationAtLineCol(const String& script_url,
intptr_t line_number,
intptr_t column_number);
diff --git a/runtime/vm/object.h b/runtime/vm/object.h
index 2c34da3..a3c025d 100644
--- a/runtime/vm/object.h
+++ b/runtime/vm/object.h
@@ -6996,13 +6996,6 @@
static const intptr_t kBytesPerElement = kCompressedWordSize;
static const intptr_t kMaxElements = kSmiMax / kBytesPerElement;
- static const intptr_t kAwaitJumpVarIndex = 0;
- static const intptr_t kAsyncFutureIndex = 1;
- static const intptr_t kControllerIndex = 1;
- // Expected context index of chained futures in recognized async functions.
- // These are used to unwind async stacks.
- static const intptr_t kIsSyncIndex = 2;
-
struct ArrayTraits {
static intptr_t elements_start_offset() { return sizeof(UntaggedContext); }
static constexpr intptr_t kElementSize = kBytesPerElement;
diff --git a/runtime/vm/random.cc b/runtime/vm/random.cc
index e14ab64..2cc2335 100644
--- a/runtime/vm/random.cc
+++ b/runtime/vm/random.cc
@@ -75,26 +75,4 @@
return static_cast<uint32_t>(NextState() & MASK_32);
}
-static Random* global_random = nullptr;
-static Mutex* global_random_mutex = nullptr;
-
-void Random::Init() {
- ASSERT(global_random_mutex == nullptr);
- global_random_mutex = new Mutex(NOT_IN_PRODUCT("global_random_mutex"));
- ASSERT(global_random == nullptr);
- global_random = new Random();
-}
-
-void Random::Cleanup() {
- delete global_random_mutex;
- global_random_mutex = nullptr;
- delete global_random;
- global_random = nullptr;
-}
-
-uint64_t Random::GlobalNextUInt64() {
- MutexLocker locker(global_random_mutex);
- return global_random->NextUInt64();
-}
-
} // namespace dart
diff --git a/runtime/vm/random.h b/runtime/vm/random.h
index 077089b..4af724b 100644
--- a/runtime/vm/random.h
+++ b/runtime/vm/random.h
@@ -28,10 +28,6 @@
static_cast<uint64_t>(NextUInt32());
}
- static uint64_t GlobalNextUInt64();
- static void Init();
- static void Cleanup();
-
private:
uint64_t NextState();
void Initialize(uint64_t seed);
diff --git a/runtime/vm/stack_trace.cc b/runtime/vm/stack_trace.cc
index 8e43ef4..8562cac 100644
--- a/runtime/vm/stack_trace.cc
+++ b/runtime/vm/stack_trace.cc
@@ -133,13 +133,6 @@
return GetCallerInFutureListener(listener);
}
-ClosurePtr CallerClosureFinder::FindCallerInAsyncGenClosure(
- const Context& receiver_context) {
- // Get the async* _AsyncStarStreamController.
- context_entry_ = receiver_context.At(Context::kControllerIndex);
- return FindCallerInAsyncStarStreamController(context_entry_);
-}
-
ClosurePtr CallerClosureFinder::FindCallerInAsyncStarStreamController(
const Object& async_star_stream_controller) {
ASSERT(async_star_stream_controller.IsInstance());
@@ -246,7 +239,7 @@
}
}
-bool CallerClosureFinder::IsCompactAsyncCallback(const Function& function) {
+bool CallerClosureFinder::IsAsyncCallback(const Function& function) {
parent_function_ = function.parent_function();
auto kind = parent_function_.recognized_kind();
return (kind == MethodRecognizer::kSuspendState_createAsyncCallbacks) ||
@@ -255,7 +248,7 @@
SuspendStatePtr CallerClosureFinder::GetSuspendStateFromAsyncCallback(
const Closure& closure) {
- ASSERT(IsCompactAsyncCallback(Function::Handle(closure.function())));
+ ASSERT(IsAsyncCallback(Function::Handle(closure.function())));
// Async/async* handler only captures the receiver (SuspendState).
receiver_context_ = closure.context();
RELEASE_ASSERT(receiver_context_.num_variables() == 1);
@@ -266,7 +259,7 @@
receiver_function_ = receiver_closure.function();
receiver_context_ = receiver_closure.context();
- if (IsCompactAsyncCallback(receiver_function_)) {
+ if (IsAsyncCallback(receiver_function_)) {
suspend_state_ = GetSuspendStateFromAsyncCallback(receiver_closure);
return FindCallerFromSuspendState(suspend_state_);
}
@@ -302,12 +295,6 @@
return Closure::null();
}
-ObjectPtr CallerClosureFinder::GetAsyncFuture(const Closure& receiver_closure) {
- // Closure -> Context -> _Future.
- receiver_context_ = receiver_closure.context();
- return receiver_context_.At(Context::kAsyncFutureIndex);
-}
-
ObjectPtr CallerClosureFinder::GetFutureFutureListener(const Object& future) {
ASSERT(future.GetClassId() == future_impl_class.id());
auto& listener = Object::Handle(
@@ -462,7 +449,7 @@
if (function.IsNull()) {
continue;
}
- if (caller_closure_finder->IsCompactAsyncCallback(function)) {
+ if (caller_closure_finder->IsAsyncCallback(function)) {
suspend_state =
caller_closure_finder->GetSuspendStateFromAsyncCallback(closure);
const uword pc = suspend_state.pc();
diff --git a/runtime/vm/stack_trace.h b/runtime/vm/stack_trace.h
index 44e05c8..6242f72 100644
--- a/runtime/vm/stack_trace.h
+++ b/runtime/vm/stack_trace.h
@@ -27,10 +27,6 @@
// Returns closure found either via the `result` Future, or the `callback`.
ClosurePtr GetCallerInFutureListener(const Object& future_listener);
- // Find caller closure from an async* function receiver context.
- // Returns either the `onData` or the Future awaiter.
- ClosurePtr FindCallerInAsyncGenClosure(const Context& receiver_context);
-
// Find caller closure from an _AsyncStarStreamController instance
// corresponding to async* function.
// Returns either the `onData` or the Future awaiter.
@@ -47,15 +43,12 @@
// Returns true if given closure function is a Future callback
// corresponding to an async/async* function or async* body callback.
- bool IsCompactAsyncCallback(const Function& function);
+ bool IsAsyncCallback(const Function& function);
// Returns SuspendState from the given callback which corresponds
// to an async/async* function.
SuspendStatePtr GetSuspendStateFromAsyncCallback(const Closure& closure);
- // Finds the awaited Future from an async function receiver closure.
- ObjectPtr GetAsyncFuture(const Closure& receiver_closure);
-
// Get sdk/lib/async/future_impl.dart:_FutureListener.state.
intptr_t GetFutureListenerState(const Object& future_listener);
diff --git a/runtime/vm/symbols.h b/runtime/vm/symbols.h
index 7b5bd6a..8dbc6ba7 100644
--- a/runtime/vm/symbols.h
+++ b/runtime/vm/symbols.h
@@ -235,7 +235,6 @@
V(SpaceOfSpace, " of ") \
V(SpaceWhereNewLine, " where\n") \
V(StackOverflowError, "StackOverflowError") \
- V(StackTraceParameter, ":stack_trace") \
V(Stream, "Stream") \
V(StringBase, "_StringBase") \
V(Struct, "Struct") \
@@ -436,7 +435,6 @@
V(_returnAsync, "_returnAsync") \
V(_returnAsyncNotFuture, "_returnAsyncNotFuture") \
V(_returnAsyncStar, "_returnAsyncStar") \
- V(_returnSyncStar, "_returnSyncStar") \
V(_runExtension, "_runExtension") \
V(_runPendingImmediateCallback, "_runPendingImmediateCallback") \
V(_scanFlags, "_scanFlags") \
diff --git a/runtime/vm/thread.cc b/runtime/vm/thread.cc
index 1bc5236..9689781 100644
--- a/runtime/vm/thread.cc
+++ b/runtime/vm/thread.cc
@@ -143,12 +143,6 @@
if (!is_vm_isolate) {
InitVMConstants();
}
-
-#if defined(DART_HOST_OS_FUCHSIA)
- next_task_id_ = trace_generate_nonce();
-#else
- next_task_id_ = Random::GlobalNextUInt64();
-#endif
}
static const double double_nan_constant = NAN;
diff --git a/runtime/vm/thread.h b/runtime/vm/thread.h
index bbda502..df80a86 100644
--- a/runtime/vm/thread.h
+++ b/runtime/vm/thread.h
@@ -1094,10 +1094,6 @@
void InitVMConstants();
- int64_t GetNextTaskId() { return next_task_id_++; }
- static intptr_t next_task_id_offset() {
- return OFFSET_OF(Thread, next_task_id_);
- }
Random* random() { return &thread_random_; }
static intptr_t random_offset() { return OFFSET_OF(Thread, thread_random_); }
@@ -1211,7 +1207,6 @@
uword exit_through_ffi_ = 0;
ApiLocalScope* api_top_scope_;
uint8_t double_truncate_round_supported_;
- ALIGN8 int64_t next_task_id_;
ALIGN8 Random thread_random_;
TsanUtils* tsan_utils_ = nullptr;
diff --git a/runtime/vm/timeline.cc b/runtime/vm/timeline.cc
index 90b0a23..086b86b 100644
--- a/runtime/vm/timeline.cc
+++ b/runtime/vm/timeline.cc
@@ -498,25 +498,19 @@
}
void TimelineEvent::Begin(const char* label,
- int64_t id,
int64_t micros,
int64_t thread_micros) {
Init(kBegin, label);
set_timestamp0(micros);
set_thread_timestamp0(thread_micros);
- // Overload timestamp1_ with the async_id.
- set_timestamp1(id);
}
void TimelineEvent::End(const char* label,
- int64_t id,
int64_t micros,
int64_t thread_micros) {
Init(kEnd, label);
set_timestamp0(micros);
set_thread_timestamp0(thread_micros);
- // Overload timestamp1_ with the async_id.
- set_timestamp1(id);
}
void TimelineEvent::Counter(const char* label, int64_t micros) {
@@ -661,31 +655,31 @@
} break;
case kAsyncBegin: {
writer->PrintProperty("ph", "b");
- writer->PrintfProperty("id", "%" Px64 "", Id());
+ writer->PrintfProperty("id", "%" Px64 "", AsyncId());
} break;
case kAsyncInstant: {
writer->PrintProperty("ph", "n");
- writer->PrintfProperty("id", "%" Px64 "", Id());
+ writer->PrintfProperty("id", "%" Px64 "", AsyncId());
} break;
case kAsyncEnd: {
writer->PrintProperty("ph", "e");
- writer->PrintfProperty("id", "%" Px64 "", Id());
+ writer->PrintfProperty("id", "%" Px64 "", AsyncId());
} break;
case kCounter: {
writer->PrintProperty("ph", "C");
} break;
case kFlowBegin: {
writer->PrintProperty("ph", "s");
- writer->PrintfProperty("id", "%" Px64 "", Id());
+ writer->PrintfProperty("id", "%" Px64 "", AsyncId());
} break;
case kFlowStep: {
writer->PrintProperty("ph", "t");
- writer->PrintfProperty("id", "%" Px64 "", Id());
+ writer->PrintfProperty("id", "%" Px64 "", AsyncId());
} break;
case kFlowEnd: {
writer->PrintProperty("ph", "f");
writer->PrintProperty("bp", "e");
- writer->PrintfProperty("id", "%" Px64 "", Id());
+ writer->PrintfProperty("id", "%" Px64 "", AsyncId());
} break;
case kMetadata: {
writer->PrintProperty("ph", "M");
@@ -734,6 +728,14 @@
writer->CloseObject();
}
+int64_t TimelineEvent::TimeOrigin() const {
+ return timestamp0_;
+}
+
+int64_t TimelineEvent::AsyncId() const {
+ return timestamp1_;
+}
+
int64_t TimelineEvent::LowTime() const {
return timestamp0_;
}
@@ -839,13 +841,6 @@
return;
}
enabled_ = true;
- Thread* thread = static_cast<Thread*>(this->thread());
- if (thread != NULL) {
- id_ = thread->GetNextTaskId();
- } else {
- static RelaxedAtomic<int64_t> next_bootstrap_task_id = {0};
- id_ = next_bootstrap_task_id.fetch_add(1);
- }
}
void TimelineEventScope::SetNumArguments(intptr_t length) {
@@ -924,7 +919,7 @@
}
ASSERT(event != NULL);
// Emit a begin event.
- event->Begin(label(), id());
+ event->Begin(label());
event->Complete();
}
@@ -940,7 +935,7 @@
}
ASSERT(event != NULL);
// Emit an end event.
- event->End(label(), id());
+ event->End(label());
StealArguments(event);
event->Complete();
}
@@ -963,7 +958,7 @@
isolate_id_(isolate_id) {}
TimelineEventRecorder::TimelineEventRecorder()
- : time_low_micros_(0), time_high_micros_(0) {}
+ : async_id_(0), time_low_micros_(0), time_high_micros_(0) {}
#ifndef PRODUCT
void TimelineEventRecorder::PrintJSONMeta(JSONArray* events) const {
@@ -1125,6 +1120,16 @@
}
#endif
+int64_t TimelineEventRecorder::GetNextAsyncId() {
+ // TODO(johnmccutchan): Gracefully handle wrap around.
+#if defined(DART_HOST_OS_FUCHSIA)
+ return trace_generate_nonce();
+#else
+ uint32_t next = static_cast<uint32_t>(async_id_.fetch_add(1u));
+ return static_cast<int64_t>(next);
+#endif
+}
+
void TimelineEventRecorder::FinishBlock(TimelineEventBlock* block) {
if (block == NULL) {
return;
@@ -1701,10 +1706,10 @@
event->AsyncEnd(name, id, start);
break;
case 'B':
- event->Begin(name, id, start, start_cpu);
+ event->Begin(name, start, start_cpu);
break;
case 'E':
- event->End(name, id, start, start_cpu);
+ event->End(name, start, start_cpu);
break;
default:
UNREACHABLE();
diff --git a/runtime/vm/timeline.h b/runtime/vm/timeline.h
index 7b89e4b..759e09f 100644
--- a/runtime/vm/timeline.h
+++ b/runtime/vm/timeline.h
@@ -334,12 +334,10 @@
void Begin(
const char* label,
- int64_t id,
int64_t micros = OS::GetCurrentMonotonicMicrosForTimeline(),
int64_t thread_micros = OS::GetCurrentThreadCPUMicrosForTimeline());
void End(const char* label,
- int64_t id,
int64_t micros = OS::GetCurrentMonotonicMicrosForTimeline(),
int64_t thread_micros = OS::GetCurrentThreadCPUMicrosForTimeline());
@@ -392,11 +390,8 @@
int64_t ThreadCPUTimeDuration() const;
int64_t ThreadCPUTimeOrigin() const;
- int64_t TimeOrigin() const { return timestamp0_; }
- int64_t Id() const {
- ASSERT(event_type() != kDuration);
- return timestamp1_;
- }
+ int64_t TimeOrigin() const;
+ int64_t AsyncId() const;
int64_t TimeDuration() const;
int64_t TimeEnd() const {
ASSERT(IsFinishedDuration());
@@ -603,8 +598,6 @@
const char* label() const { return label_; }
- int64_t id() const { return id_; }
-
TimelineEventArgument* arguments() const { return arguments_.buffer(); }
intptr_t arguments_length() const { return arguments_.length(); }
@@ -620,7 +613,6 @@
TimelineStream* stream_;
const char* label_;
- int64_t id_;
TimelineEventArguments arguments_;
bool enabled_;
@@ -791,6 +783,7 @@
virtual void PrintTraceEvent(JSONStream* js, TimelineEventFilter* filter) = 0;
#endif
virtual const char* name() const = 0;
+ int64_t GetNextAsyncId();
void FinishBlock(TimelineEventBlock* block);
@@ -821,6 +814,7 @@
int64_t TimeExtentMicros() const;
Mutex lock_;
+ RelaxedAtomic<uintptr_t> async_id_;
int64_t time_low_micros_;
int64_t time_high_micros_;
diff --git a/runtime/vm/timeline_android.cc b/runtime/vm/timeline_android.cc
index 37844f7..f91ee42 100644
--- a/runtime/vm/timeline_android.cc
+++ b/runtime/vm/timeline_android.cc
@@ -79,12 +79,12 @@
}
case TimelineEvent::kAsyncBegin: {
length = Utils::SNPrint(buffer, buffer_size, "S|%" Pd64 "|%s|%" Pd64 "",
- pid, event->label(), event->Id());
+ pid, event->label(), event->AsyncId());
break;
}
case TimelineEvent::kAsyncEnd: {
length = Utils::SNPrint(buffer, buffer_size, "F|%" Pd64 "|%s|%" Pd64 "",
- pid, event->label(), event->Id());
+ pid, event->label(), event->AsyncId());
break;
}
default:
diff --git a/runtime/vm/timeline_fuchsia.cc b/runtime/vm/timeline_fuchsia.cc
index 6dd671a..38bca29 100644
--- a/runtime/vm/timeline_fuchsia.cc
+++ b/runtime/vm/timeline_fuchsia.cc
@@ -78,19 +78,19 @@
args, num_args);
break;
case TimelineEvent::kAsyncBegin:
- trace_context_write_async_begin_event_record(context, start_time, &thread,
- &category, &name,
- event->Id(), args, num_args);
+ trace_context_write_async_begin_event_record(
+ context, start_time, &thread, &category, &name, event->AsyncId(),
+ args, num_args);
break;
case TimelineEvent::kAsyncEnd:
- trace_context_write_async_end_event_record(context, end_time, &thread,
- &category, &name, event->Id(),
- args, num_args);
+ trace_context_write_async_end_event_record(
+ context, end_time, &thread, &category, &name, event->AsyncId(), args,
+ num_args);
break;
case TimelineEvent::kAsyncInstant:
trace_context_write_async_instant_event_record(
- context, start_time, &thread, &category, &name, event->Id(), args,
- num_args);
+ context, start_time, &thread, &category, &name, event->AsyncId(),
+ args, num_args);
break;
case TimelineEvent::kDuration:
trace_context_write_duration_event_record(context, start_time, end_time,
@@ -98,19 +98,19 @@
num_args);
break;
case TimelineEvent::kFlowBegin:
- trace_context_write_flow_begin_event_record(context, start_time, &thread,
- &category, &name, event->Id(),
- args, num_args);
+ trace_context_write_flow_begin_event_record(
+ context, start_time, &thread, &category, &name, event->AsyncId(),
+ args, num_args);
break;
case TimelineEvent::kFlowStep:
- trace_context_write_flow_step_event_record(context, start_time, &thread,
- &category, &name, event->Id(),
- args, num_args);
+ trace_context_write_flow_step_event_record(
+ context, start_time, &thread, &category, &name, event->AsyncId(),
+ args, num_args);
break;
case TimelineEvent::kFlowEnd:
- trace_context_write_flow_end_event_record(context, start_time, &thread,
- &category, &name, event->Id(),
- args, num_args);
+ trace_context_write_flow_end_event_record(
+ context, start_time, &thread, &category, &name, event->AsyncId(),
+ args, num_args);
break;
default:
// TODO(zra): Figure out what to do with kCounter and kMetadata.
diff --git a/runtime/vm/timeline_linux.cc b/runtime/vm/timeline_linux.cc
index 407a790..a85f9e5 100644
--- a/runtime/vm/timeline_linux.cc
+++ b/runtime/vm/timeline_linux.cc
@@ -79,12 +79,12 @@
}
case TimelineEvent::kAsyncBegin: {
length = Utils::SNPrint(buffer, buffer_size, "S|%" Pd64 "|%s|%" Pd64 "",
- pid, event->label(), event->Id());
+ pid, event->label(), event->AsyncId());
break;
}
case TimelineEvent::kAsyncEnd: {
length = Utils::SNPrint(buffer, buffer_size, "F|%" Pd64 "|%s|%" Pd64 "",
- pid, event->label(), event->Id());
+ pid, event->label(), event->AsyncId());
break;
}
default:
diff --git a/runtime/vm/timeline_macos.cc b/runtime/vm/timeline_macos.cc
index d187617..cbb2efa 100644
--- a/runtime/vm/timeline_macos.cc
+++ b/runtime/vm/timeline_macos.cc
@@ -40,18 +40,28 @@
buffer, sizeof(buffer));
break;
}
- case TimelineEvent::kBegin:
- case TimelineEvent::kAsyncBegin: {
- _os_signpost_emit_with_name_impl(&__dso_handle, log,
- OS_SIGNPOST_INTERVAL_BEGIN, event->Id(),
- label, "", buffer, sizeof(buffer));
+ case TimelineEvent::kBegin: {
+ _os_signpost_emit_with_name_impl(
+ &__dso_handle, log, OS_SIGNPOST_INTERVAL_BEGIN,
+ OS_SIGNPOST_ID_EXCLUSIVE, label, "", buffer, sizeof(buffer));
break;
}
- case TimelineEvent::kEnd:
+ case TimelineEvent::kEnd: {
+ _os_signpost_emit_with_name_impl(
+ &__dso_handle, log, OS_SIGNPOST_INTERVAL_END,
+ OS_SIGNPOST_ID_EXCLUSIVE, label, "", buffer, sizeof(buffer));
+ break;
+ }
+ case TimelineEvent::kAsyncBegin: {
+ _os_signpost_emit_with_name_impl(
+ &__dso_handle, log, OS_SIGNPOST_INTERVAL_BEGIN, event->AsyncId(),
+ label, "", buffer, sizeof(buffer));
+ break;
+ }
case TimelineEvent::kAsyncEnd: {
- _os_signpost_emit_with_name_impl(&__dso_handle, log,
- OS_SIGNPOST_INTERVAL_END, event->Id(),
- label, "", buffer, sizeof(buffer));
+ _os_signpost_emit_with_name_impl(
+ &__dso_handle, log, OS_SIGNPOST_INTERVAL_END, event->AsyncId(), label,
+ "", buffer, sizeof(buffer));
break;
}
case TimelineEvent::kCounter: {
@@ -59,8 +69,8 @@
Utils::SNPrint(reinterpret_cast<char*>(buffer), sizeof(buffer), fmt,
event->arguments()[0].value);
_os_signpost_emit_with_name_impl(&__dso_handle, log, OS_SIGNPOST_EVENT,
- OS_SIGNPOST_ID_EXCLUSIVE, label, fmt,
- buffer, sizeof(buffer));
+ event->AsyncId(), label, fmt, buffer,
+ sizeof(buffer));
break;
}
default:
diff --git a/runtime/vm/timeline_test.cc b/runtime/vm/timeline_test.cc
index 3c5ec04..97699cd 100644
--- a/runtime/vm/timeline_test.cc
+++ b/runtime/vm/timeline_test.cc
@@ -318,8 +318,8 @@
event = stream.StartEvent();
EXPECT_EQ(0, override.recorder()->CountFor(TimelineEvent::kAsyncBegin));
- int64_t async_id = thread->GetNextTaskId();
- EXPECT(async_id != 0);
+ int64_t async_id = override.recorder()->GetNextAsyncId();
+ EXPECT(async_id >= 0);
event->AsyncBegin("asyncBeginCabbage", async_id);
EXPECT_EQ(0, override.recorder()->CountFor(TimelineEvent::kAsyncBegin));
event->Complete();
diff --git a/sdk/lib/_internal/js_dev_runtime/patch/developer_patch.dart b/sdk/lib/_internal/js_dev_runtime/patch/developer_patch.dart
index a8f6c4e..729dc22 100644
--- a/sdk/lib/_internal/js_dev_runtime/patch/developer_patch.dart
+++ b/sdk/lib/_internal/js_dev_runtime/patch/developer_patch.dart
@@ -157,7 +157,7 @@
}
@patch
-int _getNextTaskId() {
+int _getNextAsyncId() {
return 0;
}
diff --git a/sdk/lib/_internal/js_runtime/lib/developer_patch.dart b/sdk/lib/_internal/js_runtime/lib/developer_patch.dart
index d8439cc..05db6d6 100644
--- a/sdk/lib/_internal/js_runtime/lib/developer_patch.dart
+++ b/sdk/lib/_internal/js_runtime/lib/developer_patch.dart
@@ -80,7 +80,7 @@
}
@patch
-int _getNextTaskId() {
+int _getNextAsyncId() {
return 0;
}
diff --git a/sdk/lib/_internal/vm/lib/async_patch.dart b/sdk/lib/_internal/vm/lib/async_patch.dart
index 29ff029..c0d480e 100644
--- a/sdk/lib/_internal/vm/lib/async_patch.dart
+++ b/sdk/lib/_internal/vm/lib/async_patch.dart
@@ -39,7 +39,7 @@
@pragma("vm:entry-point")
StreamController<T> controller;
@pragma("vm:entry-point")
- Function? asyncStarBody;
+ void Function(Object?)? asyncStarBody;
bool isAdding = false;
bool onListenReceived = false;
bool isScheduled = false;
@@ -66,7 +66,7 @@
isSuspendedAtYield = false;
final bool? argument = continuationArgument;
continuationArgument = null;
- asyncStarBody!(argument, null);
+ asyncStarBody!(argument);
}
void scheduleGenerator() {
@@ -169,8 +169,7 @@
controller.close();
}
- _AsyncStarStreamController(this.asyncStarBody)
- : controller = new StreamController(sync: true) {
+ _AsyncStarStreamController() : controller = new StreamController(sync: true) {
controller.onListen = this.onListen;
controller.onResume = this.onResume;
controller.onCancel = this.onCancel;
@@ -217,32 +216,22 @@
@pragma("vm:entry-point")
class _SuspendState {
- static const bool _trace = false;
-
@pragma("vm:entry-point", "call")
@pragma("vm:invisible")
static Object? _initAsync<T>() {
- if (_trace) print('_initAsync<$T>');
return _Future<T>();
}
@pragma("vm:invisible")
@pragma("vm:recognized", "other")
void _createAsyncCallbacks() {
- if (_trace) print('_createAsyncCallbacks');
-
@pragma("vm:invisible")
thenCallback(value) {
- if (_trace) print('thenCallback (this=$this, value=$value)');
_resume(value, null, null);
}
@pragma("vm:invisible")
errorCallback(Object exception, StackTrace stackTrace) {
- if (_trace) {
- print('errorCallback (this=$this, '
- 'exception=$exception, stackTrace=$stackTrace)');
- }
_resume(null, exception, stackTrace);
}
@@ -335,7 +324,6 @@
@pragma("vm:entry-point", "call")
@pragma("vm:invisible")
Object? _await(Object? object) {
- if (_trace) print('_await (object=$object)');
if (_thenCallback == null) {
_createAsyncCallbacks();
}
@@ -358,10 +346,6 @@
@pragma("vm:entry-point", "call")
@pragma("vm:invisible")
static Future _returnAsync(Object suspendState, Object? returnValue) {
- if (_trace) {
- print('_returnAsync (suspendState=$suspendState, '
- 'returnValue=$returnValue)');
- }
_Future future;
if (suspendState is _SuspendState) {
future = unsafeCast<_Future>(suspendState._functionData);
@@ -380,10 +364,6 @@
@pragma("vm:invisible")
static Future _returnAsyncNotFuture(
Object suspendState, Object? returnValue) {
- if (_trace) {
- print('_returnAsyncNotFuture (suspendState=$suspendState, '
- 'returnValue=$returnValue)');
- }
_Future future;
if (suspendState is _SuspendState) {
future = unsafeCast<_Future>(suspendState._functionData);
@@ -397,15 +377,13 @@
@pragma("vm:entry-point", "call")
@pragma("vm:invisible")
static Object? _initAsyncStar<T>() {
- if (_trace) print('_initAsyncStar<$T>');
- return _AsyncStarStreamController<T>(null);
+ return _AsyncStarStreamController<T>();
}
@pragma("vm:invisible")
@pragma("vm:recognized", "other")
_createAsyncStarCallback(_AsyncStarStreamController controller) {
- controller.asyncStarBody = (value, _) {
- if (_trace) print('asyncStarBody callback (value=$value)');
+ controller.asyncStarBody = (value) {
_resume(value, null, null);
};
}
@@ -424,10 +402,6 @@
@pragma("vm:entry-point", "call")
@pragma("vm:invisible")
static void _returnAsyncStar(Object suspendState, Object? returnValue) {
- if (_trace) {
- print('_returnAsyncStar (suspendState=$suspendState, '
- 'returnValue=$returnValue)');
- }
final controller = unsafeCast<_AsyncStarStreamController>(
unsafeCast<_SuspendState>(suspendState)._functionData);
controller.close();
@@ -437,10 +411,6 @@
@pragma("vm:invisible")
static Object? _handleException(
Object suspendState, Object exception, StackTrace stackTrace) {
- if (_trace) {
- print('_handleException (suspendState=$suspendState, '
- 'exception=$exception, stackTrace=$stackTrace)');
- }
Object? functionData;
bool isSync = true;
if (suspendState is _SuspendState) {
@@ -469,14 +439,12 @@
@pragma("vm:entry-point", "call")
@pragma("vm:invisible")
static Object? _initSyncStar<T>() {
- if (_trace) print('_initSyncStar<$T>');
return _SyncStarIterable<T>();
}
@pragma("vm:entry-point", "call")
@pragma("vm:invisible")
Object? _suspendSyncStarAtStart(Object? object) {
- if (_trace) print('_suspendSyncStarAtStart($object)');
final data = _functionData;
unsafeCast<_SyncStarIterable>(data)._stateAtStart = this;
return data;
diff --git a/sdk/lib/_internal/vm/lib/timeline.dart b/sdk/lib/_internal/vm/lib/timeline.dart
index d65d975..e3e172c 100644
--- a/sdk/lib/_internal/vm/lib/timeline.dart
+++ b/sdk/lib/_internal/vm/lib/timeline.dart
@@ -13,8 +13,8 @@
external int _getTraceClock();
@patch
-@pragma("vm:external-name", "Timeline_getNextTaskId")
-external int _getNextTaskId();
+@pragma("vm:external-name", "Timeline_getNextAsyncId")
+external int _getNextAsyncId();
@patch
@pragma("vm:external-name", "Timeline_reportTaskEvent")
diff --git a/sdk/lib/_internal/wasm/lib/developer.dart b/sdk/lib/_internal/wasm/lib/developer.dart
index 32eb53d..32d3050 100644
--- a/sdk/lib/_internal/wasm/lib/developer.dart
+++ b/sdk/lib/_internal/wasm/lib/developer.dart
@@ -49,7 +49,7 @@
int _traceClock = 0;
@patch
-int _getNextTaskId() => 0;
+int _getNextAsyncId() => 0;
@patch
void _reportTaskEvent(int taskId, String phase, String category, String name,
diff --git a/sdk/lib/developer/timeline.dart b/sdk/lib/developer/timeline.dart
index fc4abd4..a9990a3 100644
--- a/sdk/lib/developer/timeline.dart
+++ b/sdk/lib/developer/timeline.dart
@@ -60,7 +60,7 @@
/// If [id] is not provided, an id that conflicts with no other Dart-generated
/// flow id's will be generated.
static Flow begin({int? id}) {
- return new Flow._(_begin, id ?? _getNextTaskId());
+ return new Flow._(_begin, id ?? _getNextAsyncId());
}
/// A "step" Flow event.
@@ -112,8 +112,7 @@
_stack.add(null);
return;
}
- var block = new _SyncBlock._(name, _getNextTaskId(),
- arguments: arguments, flow: flow);
+ var block = new _SyncBlock._(name, arguments: arguments, flow: flow);
_stack.add(block);
block._startSync();
}
@@ -191,7 +190,7 @@
TimelineTask({TimelineTask? parent, String? filterKey})
: _parent = parent,
_filterKey = filterKey,
- _taskId = _getNextTaskId() {}
+ _taskId = _getNextAsyncId() {}
/// Create a task with an explicit [taskId]. This is useful if you are
/// passing a task from one isolate to another.
@@ -336,9 +335,6 @@
/// The name of this block.
final String name;
- /// Signpost needs help matching begin and end events.
- final int taskId;
-
/// An (optional) set of arguments which will be serialized to JSON and
/// associated with this block.
final Map? arguments;
@@ -348,18 +344,18 @@
late final String _jsonArguments = _argumentsAsJson(arguments);
- _SyncBlock._(this.name, this.taskId, {this.arguments, this.flow});
+ _SyncBlock._(this.name, {this.arguments, this.flow});
/// Start this block of time.
void _startSync() {
- _reportTaskEvent(taskId, 'B', category, name, _jsonArguments);
+ _reportTaskEvent(0, 'B', category, name, _jsonArguments);
}
/// Finish this block of time. At this point, this block can no longer be
/// used.
void finish() {
// Report event to runtime.
- _reportTaskEvent(taskId, 'E', category, name, _jsonArguments);
+ _reportTaskEvent(0, 'E', category, name, _jsonArguments);
final Flow? tempFlow = flow;
if (tempFlow != null) {
_reportFlowEvent(category, "${tempFlow.id}", tempFlow._type, tempFlow.id,
@@ -380,9 +376,8 @@
@pragma("vm:recognized", "asm-intrinsic")
external bool _isDartStreamEnabled();
-/// Returns the next task id.
-@pragma("vm:recognized", "asm-intrinsic")
-external int _getNextTaskId();
+/// Returns the next async task id.
+external int _getNextAsyncId();
/// Returns the current value from the trace clock.
external int _getTraceClock();
diff --git a/tools/VERSION b/tools/VERSION
index e3f65ac..7bc95cb 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -27,5 +27,5 @@
MAJOR 2
MINOR 19
PATCH 0
-PRERELEASE 0
+PRERELEASE 1
PRERELEASE_PATCH 0
\ No newline at end of file