Version 2.12.0-107.0.dev
Merge commit 'bbce39d27c33b149494e07b3d18e314c6c44a955' into 'dev'
diff --git a/pkg/README.md b/pkg/README.md
new file mode 100644
index 0000000..474a204
--- /dev/null
+++ b/pkg/README.md
@@ -0,0 +1,43 @@
+# Package validation
+
+The packages in `pkg/` are automatically validated on the LUCI CI bots. The
+validation is largely done by the `tools/package_deps` package; it can be tested
+locally via:
+
+```
+dart tools/package_deps/bin/package_deps.dart
+```
+
+## Packages which are published
+
+There are several packages developed in `pkg/` which are published to pub.
+Validation of these packages is particularly important because the pub tools are
+not used for these packages during development; we get our dependency versions
+from the DEPS file. Its very easy for the dependencies specified in a package's
+pubspec file to get out of date wrt the packages and versions actually used.
+
+In order to better ensure we're publishing correct packages, we validate some
+properties of the pubspec files on our CI system. These validations include:
+
+- that the dependencies listed in the pubspec are used in the package
+- that all the packages used by the source are listed in the pubspec
+- that we don't use relative path deps to pkg/ or third_party/ packages
+
+## Packages which are not published
+
+For packages in pkg/ which we do not intend to be published, we put the
+following comment in the pubspec.yaml file:
+
+```
+# This package is not intended for consumption on pub.dev. DO NOT publish.
+publish_to: none
+```
+
+These pubspecs are still validated by the package validation tool. The contents
+are more informational as the pubspecs for these packages are not consumed by
+the pub tool or ecosystem.
+
+We validate:
+- that the dependencies listed in the pubspec are used in the package
+- that all the packages used by the source are listed in the pubspec
+- that a reference to a pkg/ package is done via a relative path dependency
diff --git a/pkg/analysis_server/pubspec.yaml b/pkg/analysis_server/pubspec.yaml
index 9a94f7d..ef86eeb 100644
--- a/pkg/analysis_server/pubspec.yaml
+++ b/pkg/analysis_server/pubspec.yaml
@@ -8,8 +8,10 @@
dependencies:
_fe_analyzer_shared:
path: ../_fe_analyzer_shared
- analyzer: any
- analyzer_plugin: any
+ analyzer:
+ path: ../analyzer
+ analyzer_plugin:
+ path: ../analyzer_plugin
args: any
cli_util: any
collection: any
@@ -19,7 +21,8 @@
html: any
intl: any
linter: any
- meta: any
+ meta:
+ path: ../meta
stream_channel: any
telemetry:
path: ../telemetry
@@ -29,7 +32,8 @@
yaml: any
dev_dependencies:
- analyzer_utilities: any
+ analyzer_utilities:
+ path: ../analyzer_utilities
http: any
logging: any
matcher: any
diff --git a/pkg/analyzer_cli/pubspec.yaml b/pkg/analyzer_cli/pubspec.yaml
index a1980aa..da7989b 100644
--- a/pkg/analyzer_cli/pubspec.yaml
+++ b/pkg/analyzer_cli/pubspec.yaml
@@ -8,13 +8,15 @@
sdk: "^2.7.0"
dependencies:
- analyzer: any
+ analyzer:
+ path: ../analyzer
args: '>=0.13.0 <2.0.0'
bazel_worker: ^0.1.0
collection: ^1.14.1
convert: any
linter: ^0.1.16
- meta: any
+ meta:
+ path: ../meta
path: any
pub_semver: ^1.4.2
yaml: any
@@ -24,7 +26,3 @@
protobuf: ^0.13.0
test_reflective_loader: ^0.1.8
test: ^1.0.0
-
-dependency_overrides:
- analyzer:
- path: ../analyzer
diff --git a/pkg/analyzer_plugin/test/src/utilities/completion/completion_target_test.dart b/pkg/analyzer_plugin/test/src/utilities/completion/completion_target_test.dart
index 6970a80..04ab568 100644
--- a/pkg/analyzer_plugin/test/src/utilities/completion/completion_target_test.dart
+++ b/pkg/analyzer_plugin/test/src/utilities/completion/completion_target_test.dart
@@ -642,11 +642,7 @@
Future<void> test_IfStatement_droppedToken() async {
// Comment ClassDeclaration CompilationUnit
await createTarget('main() { if (v i^) }');
- if (usingFastaParser) {
- assertTarget(')', 'if (v) ;', droppedToken: 'i');
- } else {
- assertTarget('i;', 'if (v) i;');
- }
+ assertTarget(')', 'if (v) ;', droppedToken: 'i');
}
Future<void> test_InstanceCreationExpression_identifier() async {
@@ -908,8 +904,6 @@
CompletionTarget target;
FindElement findElement;
- bool get usingFastaParser => analyzer.Parser.useFasta;
-
void assertTarget(
String entityText,
String nodeText, {
diff --git a/pkg/analyzer_utilities/pubspec.yaml b/pkg/analyzer_utilities/pubspec.yaml
index ed67a42..7142157 100644
--- a/pkg/analyzer_utilities/pubspec.yaml
+++ b/pkg/analyzer_utilities/pubspec.yaml
@@ -6,7 +6,8 @@
sdk: '>=2.1.0 <3.0.0'
dependencies:
- analyzer: any
+ analyzer:
+ path: ../analyzer
html: any
path: any
test: any
diff --git a/pkg/build_integration/pubspec.yaml b/pkg/build_integration/pubspec.yaml
index b741a4b..a7b79b1 100644
--- a/pkg/build_integration/pubspec.yaml
+++ b/pkg/build_integration/pubspec.yaml
@@ -9,11 +9,8 @@
sdk: '>=2.1.0 <3.0.0'
dependencies:
- front_end: any
+ front_end:
+ path: ../front_end
dev_dependencies:
test: any
-
-dependency_overrides:
- front_end:
- path: ../front_end
diff --git a/pkg/compiler/pubspec.yaml b/pkg/compiler/pubspec.yaml
index 6a7ec65..8a61bf9 100644
--- a/pkg/compiler/pubspec.yaml
+++ b/pkg/compiler/pubspec.yaml
@@ -13,8 +13,10 @@
collection: any
crypto: any
dart2js_info: any
- front_end: any
- kernel: any
+ front_end:
+ path: ../front_end
+ kernel:
+ path: ../kernel
# Unpublished packages that can be used via path dependency
_fe_analyzer_shared:
@@ -30,7 +32,8 @@
# Published packages - repo version ensured via dependency_overrides
args: any
http: any
- js: any
+ js:
+ path: ../js
package_config: any
path: any
source_maps: any
@@ -54,7 +57,7 @@
front_end:
path: ../front_end
kernel:
- path: ../../pkg/kernel
+ path: ../kernel
meta:
path: ../meta
diff --git a/pkg/dartdev/lib/src/commands/analyze.dart b/pkg/dartdev/lib/src/commands/analyze.dart
index 507f8cb..55984a9 100644
--- a/pkg/dartdev/lib/src/commands/analyze.dart
+++ b/pkg/dartdev/lib/src/commands/analyze.dart
@@ -24,6 +24,14 @@
/// message. The width left for the severity label plus the separator width.
static const int _bodyIndentWidth = _severityWidth + 3;
+ static final int _pipeCodeUnit = '|'.codeUnitAt(0);
+
+ static final int _slashCodeUnit = '\\'.codeUnitAt(0);
+
+ static final int _newline = '\n'.codeUnitAt(0);
+
+ static final int _return = '\r'.codeUnitAt(0);
+
AnalyzeCommand({bool verbose = false})
: super(cmdName, "Analyze the project's Dart code.") {
argParser
@@ -54,7 +62,6 @@
@override
String get invocation => '${super.invocation} [<directory>]';
-
@override
FutureOr<int> run() async {
if (argResults.rest.length > 1) {
@@ -176,15 +183,17 @@
'(${error.code})',
);
+ var padding = ' ' * _bodyIndentWidth;
if (verbose) {
- var padding = ' ' * _bodyIndentWidth;
for (var message in error.contextMessages) {
log.stdout('$padding${message.message} '
'at ${message.filePath}:${message.line}:${message.column}');
}
- if (error.correction != null) {
- log.stdout('$padding${error.correction}');
- }
+ }
+ if (error.correction != null) {
+ log.stdout('$padding${error.correction}');
+ }
+ if (verbose) {
if (error.url != null) {
log.stdout('$padding${error.url}');
}
@@ -213,11 +222,6 @@
}
}
- static final int _pipeCodeUnit = '|'.codeUnitAt(0);
- static final int _slashCodeUnit = '\\'.codeUnitAt(0);
- static final int _newline = '\n'.codeUnitAt(0);
- static final int _return = '\r'.codeUnitAt(0);
-
static String _escapeForMachineMode(String input) {
var result = StringBuffer();
for (var c in input.codeUnits) {
diff --git a/pkg/dartdev/pubspec.yaml b/pkg/dartdev/pubspec.yaml
index ecf8aed..d6347db 100644
--- a/pkg/dartdev/pubspec.yaml
+++ b/pkg/dartdev/pubspec.yaml
@@ -16,7 +16,8 @@
path: ../dart2native
dart_style: any
intl: any
- meta: any
+ meta:
+ path: ../meta
nnbd_migration:
path: ../nnbd_migration
path: ^1.0.0
diff --git a/pkg/dev_compiler/pubspec.yaml b/pkg/dev_compiler/pubspec.yaml
index 73cdcc9..155491d 100644
--- a/pkg/dev_compiler/pubspec.yaml
+++ b/pkg/dev_compiler/pubspec.yaml
@@ -19,7 +19,8 @@
path: ../front_end
kernel:
path: ../kernel
- meta: any
+ meta:
+ path: ../meta
path: any
source_maps: any
source_span: any
@@ -27,10 +28,12 @@
path: ../vm
dev_dependencies:
- analyzer: any
+ analyzer:
+ path: ../analyzer
expect:
path: ../expect
- js: any
+ js:
+ path: ../js
modular_test:
path: ../modular_test
package_config: any
diff --git a/pkg/expect/pubspec.yaml b/pkg/expect/pubspec.yaml
index b1b5bd1..6a8f0bc 100644
--- a/pkg/expect/pubspec.yaml
+++ b/pkg/expect/pubspec.yaml
@@ -12,4 +12,5 @@
sdk: '>=2.0.0'
dependencies:
- meta: any
+ meta:
+ path: ../meta
diff --git a/pkg/front_end/lib/src/fasta/kernel/combined_member_signature.dart b/pkg/front_end/lib/src/fasta/kernel/combined_member_signature.dart
index b1fcbcb..1478cf0 100644
--- a/pkg/front_end/lib/src/fasta/kernel/combined_member_signature.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/combined_member_signature.dart
@@ -521,10 +521,11 @@
ProcedureKind.Getter,
new FunctionNode(null, returnType: type),
isAbstract: true,
- isMemberSignature: true,
fileUri: fileUri,
- memberSignatureOrigin: member.memberSignatureOrigin ?? member,
reference: referenceFrom?.reference,
+ isSynthetic: true,
+ stubKind: ProcedureStubKind.MemberSignature,
+ stubTarget: member.memberSignatureOrigin ?? member,
)
..startFileOffset = startFileOffset
..fileOffset = fileOffset
@@ -562,20 +563,22 @@
fileOffset = startFileOffset = enclosingClass.fileOffset;
}
return new Procedure(
- member.name,
- ProcedureKind.Setter,
- new FunctionNode(null,
- returnType: const VoidType(),
- positionalParameters: [
- new VariableDeclaration(parameterName ?? 'value',
- type: type, isCovariant: isCovariant)
- ..isGenericCovariantImpl = isGenericCovariantImpl
- ]),
- isAbstract: true,
- isMemberSignature: true,
- fileUri: fileUri,
- memberSignatureOrigin: member.memberSignatureOrigin ?? member,
- reference: referenceFrom?.reference)
+ member.name,
+ ProcedureKind.Setter,
+ new FunctionNode(null,
+ returnType: const VoidType(),
+ positionalParameters: [
+ new VariableDeclaration(parameterName ?? 'value',
+ type: type, isCovariant: isCovariant)
+ ..isGenericCovariantImpl = isGenericCovariantImpl
+ ]),
+ isAbstract: true,
+ fileUri: fileUri,
+ reference: referenceFrom?.reference,
+ isSynthetic: true,
+ stubKind: ProcedureStubKind.MemberSignature,
+ stubTarget: member.memberSignatureOrigin ?? member,
+ )
..startFileOffset = startFileOffset
..fileOffset = fileOffset
..isNonNullableByDefault = containsNnbdTypes
@@ -642,19 +645,21 @@
}
}
return new Procedure(
- procedure.name,
- procedure.kind,
- new FunctionNode(null,
- typeParameters: functionType.typeParameters,
- returnType: functionType.returnType,
- positionalParameters: positionalParameters,
- namedParameters: namedParameters,
- requiredParameterCount: function.requiredParameterCount),
- isAbstract: true,
- isMemberSignature: true,
- fileUri: fileUri,
- memberSignatureOrigin: procedure.memberSignatureOrigin ?? procedure,
- reference: referenceFrom?.reference)
+ procedure.name,
+ procedure.kind,
+ new FunctionNode(null,
+ typeParameters: functionType.typeParameters,
+ returnType: functionType.returnType,
+ positionalParameters: positionalParameters,
+ namedParameters: namedParameters,
+ requiredParameterCount: function.requiredParameterCount),
+ isAbstract: true,
+ fileUri: fileUri,
+ reference: referenceFrom?.reference,
+ isSynthetic: true,
+ stubKind: ProcedureStubKind.MemberSignature,
+ stubTarget: procedure.memberSignatureOrigin ?? procedure,
+ )
..startFileOffset = startFileOffset
..fileOffset = fileOffset
..isNonNullableByDefault = containsNnbdTypes
diff --git a/pkg/front_end/lib/src/fasta/kernel/forwarding_node.dart b/pkg/front_end/lib/src/fasta/kernel/forwarding_node.dart
index 0b4a166..9ee07dd 100644
--- a/pkg/front_end/lib/src/fasta/kernel/forwarding_node.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/forwarding_node.dart
@@ -14,6 +14,7 @@
NamedExpression,
Procedure,
ProcedureKind,
+ ProcedureStubKind,
ReturnStatement,
SuperMethodInvocation,
SuperPropertyGet,
@@ -94,10 +95,8 @@
finalTarget =
interfaceMember.memberSignatureOrigin ?? interfaceMember;
}
- stub.isMemberSignature = false;
- stub.memberSignatureOrigin = null;
- stub.isForwardingStub = true;
- stub.forwardingStubInterfaceTarget = finalTarget;
+ stub.stubKind = ProcedureStubKind.ForwardingStub;
+ stub.stubTarget = finalTarget;
if (_combinedMemberSignature.needsSuperImpl) {
_createForwardingImplIfNeeded(
stub.function, stub.name, classBuilder.cls);
@@ -140,13 +139,6 @@
superTarget = superTarget.memberSignatureOrigin ?? superTarget;
}
procedure.isAbstract = false;
- if (!procedure.isForwardingStub) {
- // This procedure exists abstractly in the source code; we need to make it
- // concrete and give it a body that is a forwarding stub. This situation
- // is called a "forwarding semi-stub".
- procedure.isForwardingStub = true;
- procedure.isForwardingSemiStub = true;
- }
List<Expression> positionalArguments = function.positionalParameters
.map<Expression>((parameter) => new VariableGet(parameter))
.toList();
@@ -186,6 +178,7 @@
}
function.body = new ReturnStatement(superCall)..parent = function;
procedure.transformerFlags |= TransformerFlag.superCalls;
- procedure.forwardingStubSuperTarget = superTarget;
+ procedure.stubKind = ProcedureStubKind.ForwardingSuperStub;
+ procedure.stubTarget = superTarget;
}
}
diff --git a/pkg/front_end/lib/src/fasta/source/source_class_builder.dart b/pkg/front_end/lib/src/fasta/source/source_class_builder.dart
index 31186d8..8536d8c 100644
--- a/pkg/front_end/lib/src/fasta/source/source_class_builder.dart
+++ b/pkg/front_end/lib/src/fasta/source/source_class_builder.dart
@@ -828,13 +828,8 @@
procedure.function.dartAsyncMarker = AsyncMarker.Sync;
procedure.isAbstract = false;
- procedure.isNoSuchMethodForwarder = true;
- procedure.isMemberSignature = false;
- procedure.isForwardingStub = false;
- procedure.isForwardingSemiStub = false;
- procedure.memberSignatureOrigin = null;
- procedure.forwardingStubInterfaceTarget = null;
- procedure.forwardingStubSuperTarget = null;
+ procedure.stubKind = ProcedureStubKind.NoSuchMethodForwarder;
+ procedure.stubTarget = null;
}
void _addRedirectingConstructor(ProcedureBuilder constructorBuilder,
diff --git a/pkg/front_end/pubspec.yaml b/pkg/front_end/pubspec.yaml
index 77ae47b..20a36d8 100644
--- a/pkg/front_end/pubspec.yaml
+++ b/pkg/front_end/pubspec.yaml
@@ -9,12 +9,16 @@
sdk: '>=2.6.0 <3.0.0'
dependencies:
- _fe_analyzer_shared: any
- kernel: any
- package_config: any
+ _fe_analyzer_shared:
+ path: ../_fe_analyzer_shared
+ kernel:
+ path: ../kernel
+ package_config:
+ path: ../../third_party/pkg_tested/package_config
dev_dependencies:
- analyzer: any
+ analyzer:
+ path: ../analyzer
args: '>=0.13.0 <2.0.0'
async_helper:
path: ../async_helper
@@ -39,13 +43,3 @@
path: ../vm_service
web_socket_channel: ^1.0.4
yaml: any
-
-dependency_overrides:
- _fe_analyzer_shared:
- path: ../_fe_analyzer_shared/
- analyzer:
- path: ../analyzer
- kernel:
- path: ../kernel/
- package_config:
- path: ../../third_party/pkg_tested/package_config/
diff --git a/pkg/front_end/test/spell_checking_list_code.txt b/pkg/front_end/test/spell_checking_list_code.txt
index 71006e6..6c4e50f 100644
--- a/pkg/front_end/test/spell_checking_list_code.txt
+++ b/pkg/front_end/test/spell_checking_list_code.txt
@@ -833,6 +833,7 @@
pragma
pre
prebuilt
+preexisted
preexisting
preorder
prev
diff --git a/pkg/kernel/binary.md b/pkg/kernel/binary.md
index d2d2c47..99a36f4 100644
--- a/pkg/kernel/binary.md
+++ b/pkg/kernel/binary.md
@@ -147,7 +147,7 @@
type ComponentFile {
UInt32 magic = 0x90ABCDEF;
- UInt32 formatVersion = 50;
+ UInt32 formatVersion = 51;
Byte[10] shortSdkHash;
List<String> problemsAsJson; // Described in problems.md.
Library[] libraries;
@@ -396,6 +396,18 @@
}
*/
+/*
+enum ProcedureStubKind {
+ Regular,
+ ForwardingStub,
+ ForwardingSuperStub,
+ NoSuchMethodForwarder,
+ MemberSignature,
+ MixinStub,
+ MixinSuperStub,
+}
+*/
+
type Procedure extends Member {
Byte tag = 6;
CanonicalNameReference canonicalName;
@@ -405,16 +417,13 @@
FileOffset fileOffset; // Offset of the procedure name.
FileOffset fileEndOffset;
Byte kind; // Index into the ProcedureKind enum above.
- UInt flags (isStatic, isAbstract, isExternal, isConst, isForwardingStub,
- isForwardingSemiStub, isRedirectingFactoryConstructor,
- isNoSuchMethodForwarder, isExtensionMember, isMemberSignature,
+ Byte stubKind; // Index into the ProcedureStubKind enum above.
+ UInt flags (isStatic, isAbstract, isExternal, isConst,
+ isRedirectingFactoryConstructor, isExtensionMember,
isNonNullableByDefault);
Name name;
List<Expression> annotations;
- // Only present if the 'isForwardingStub' flag is set.
- MemberReference forwardingStubSuperTarget; // May be NullReference.
- MemberReference forwardingStubInterfaceTarget; // May be NullReference.
- MemberReference memberSignatureOrigin; // May be NullReference.
+ MemberReference stubTarget; // May be NullReference.
// Can only be absent if abstract, but tag is there anyway.
Option<FunctionNode> function;
}
diff --git a/pkg/kernel/lib/ast.dart b/pkg/kernel/lib/ast.dart
index 2ba1722..d91a3d1 100644
--- a/pkg/kernel/lib/ast.dart
+++ b/pkg/kernel/lib/ast.dart
@@ -2141,6 +2141,189 @@
}
}
+/// Enum for the semantics of the `Procedure.stubTarget` property.
+enum ProcedureStubKind {
+ /// A regular procedure declared in source code.
+ ///
+ /// The stub target is `null`.
+ Regular,
+
+ /// An abstract procedure inserted to add `isCovariant` and
+ /// `isGenericCovariantImpl` to parameters for a set of overridden members.
+ ///
+ /// The stub is inserted when not all of the overridden members agree on
+ /// the covariance flags. For instance:
+ ///
+ /// class A<T> {
+ /// void method1(num o) {}
+ /// void method2(T o) {}
+ /// }
+ /// class B {
+ /// void method1(covariant int o) {}
+ /// void method2(int o) {}
+ /// }
+ /// class C implements A<int>, B {
+ /// // Forwarding stub needed because the parameter is covariant in
+ /// // `B.method1` but not in `A.method1`.
+ /// void method1(covariant num o);
+ /// // Forwarding stub needed because the parameter is a generic
+ /// // covariant impl in `A.method2` but not in `B.method2`.
+ /// void method2(/*generic-covariant-impl*/ int o);
+ /// }
+ ///
+ /// The stub target is one of the overridden members.
+ ForwardingStub,
+
+ /// A concrete procedure inserted to add `isCovariant` and
+ /// `isGenericCovariantImpl` checks to parameters before calling the
+ /// overridden member in the superclass.
+ ///
+ /// The stub is inserted when not all of the overridden members agree on
+ /// the covariance flags and the overridden super class member does not
+ /// have the same covariance flags. For instance:
+ ///
+ /// class A<T> {
+ /// void method1(num o) {}
+ /// void method2(T o) {}
+ /// }
+ /// class B {
+ /// void method1(covariant int o) {}
+ /// void method2(int o) {}
+ /// }
+ /// class C extends A<int> implements B {
+ /// // Forwarding stub needed because the parameter is covariant in
+ /// // `B.method1` but not in `A.method1`.
+ /// void method1(covariant num o) => super.method1(o);
+ /// // No need for a super stub for `A.method2` because it has the
+ /// // right covariance flags already.
+ /// }
+ ///
+ /// The stub target is the called superclass member.
+ ForwardingSuperStub,
+
+ /// A concrete procedure inserted to forward calls to `noSuchMethod` for
+ /// an inherited member that it does not implement.
+ ///
+ /// The stub is inserted when a class implements private members of another
+ /// library or declares/inherits a user-defined `noSuchMethod` method. For
+ /// instance:
+ ///
+ /// // lib1:
+ /// class A {
+ /// void _privateMethod() {}
+ /// }
+ /// // lib2:
+ /// class B implements A {
+ /// // Forwarding stub inserted to forward calls to `A._privateMethod`.
+ /// void _privateMethod() => noSuchMethod(#_privateMethod, ...);
+ /// }
+ /// class C {
+ /// void method() {}
+ /// }
+ /// class D implements C {
+ /// noSuchMethod(o) { ... }
+ /// // Forwarding stub inserted to forward calls to `C.method`.
+ /// void method() => noSuchMethod(#method, ...);
+ /// }
+ ///
+ ///
+ /// The stub target is `null` if the procedure preexisted as an abstract
+ /// procedure. Otherwise the stub target is one of the inherited members.
+ NoSuchMethodForwarder,
+
+ /// An abstract procedure inserted to show the combined member signature type
+ /// of set of overridden members.
+ ///
+ /// The stub is inserted when an opt-in member is inherited into an opt-out
+ /// library or when NNBD_TOP_MERGE was used to compute the type of a merge
+ /// point in an opt-in library. For instance:
+ ///
+ /// // lib1: opt-in
+ /// class A {
+ /// int? method1() => null;
+ /// void method2(Object? o) {}
+ /// }
+ /// class B {
+ /// dynamic method2(dynamic o);
+ /// }
+ /// class C implements A, B {
+ /// // Member signature inserted for the NNBD_TOP_MERGE type of
+ /// // `A.method2` and `B.method2`.
+ /// Object? method2(Object? o);
+ /// }
+ /// // lib2: opt-out
+ /// class D extends A {
+ /// // Member signature inserted for the LEGACY_ERASURE type of
+ /// // `A.method1` and `A.method2` with types `int* Function()`
+ /// // and `void Function(Object*)`, respectively.
+ /// int method1();
+ /// void method2(Object o);
+ /// }
+ ///
+ /// The stub target is one of the overridden members.
+ MemberSignature,
+
+ /// An abstract procedure inserted for the application of an abstract mixin
+ /// member.
+ ///
+ /// The stub is inserted when an abstract member is mixed into a mixin
+ /// application. For instance:
+ ///
+ /// class Super {}
+ /// abstract class Mixin {
+ /// void method();
+ /// }
+ /// class Class = Super with Mixin
+ /// // A mixin stub for `A.method` is added to `Class`
+ /// void method();
+ /// ;
+ ///
+ /// This is added to ensure that interface targets are resolved consistently
+ /// in face of cloning. For instance, without the mixin stub, this call:
+ ///
+ /// method(Class c) => c.method();
+ ///
+ /// would use `Mixin.method` as its target, but after load from a VM .dill
+ /// (which clones all mixin members) the call would resolve to `Class.method`
+ /// instead. By adding the mixin stub to `Class`, all accesses both before
+ /// and after .dill will point to `Class.method`.
+ ///
+ /// The stub target is the mixin member.
+ MixinStub,
+
+ /// A concrete procedure inserted for the application of a concrete mixin
+ /// member. The implementation calls the mixin member via a super-call.
+ ///
+ /// The stub is inserted when a concrete member is mixed into a mixin
+ /// application. For instance:
+ ///
+ /// class Super {}
+ /// abstract class Mixin {
+ /// void method() {}
+ /// }
+ /// class Class = Super with Mixin
+ /// // A mixin stub for `A.method` is added to `Class` which calls
+ /// // `A.method`.
+ /// void method() => super.method();
+ /// ;
+ ///
+ /// This is added to ensure that super accesses are resolved correctly, even
+ /// in face of cloning. For instance, without the mixin super stub, this super
+ /// call:
+ ///
+ /// class Subclass extends Class {
+ /// method(Class c) => super.method();
+ /// }
+ ///
+ /// would use `Mixin.method` as its target, which would to be update to match
+ /// the cloning of mixin member performed for instance by the VM. By adding
+ /// the mixin super stub to `Class`, all accesses both before and after
+ /// cloning will point to `Class.method`.
+ ///
+ /// The stub target is the called mixin member.
+ MixinSuperStub,
+}
+
/// A method, getter, setter, index-getter, index-setter, operator overloader,
/// or factory.
///
@@ -2194,66 +2377,47 @@
super.transformerFlags = newValue;
}
- Reference forwardingStubSuperTargetReference;
- Reference forwardingStubInterfaceTargetReference;
- Reference memberSignatureOriginReference;
+ ProcedureStubKind stubKind;
+ Reference stubTargetReference;
Procedure(Name name, ProcedureKind kind, FunctionNode function,
{bool isAbstract: false,
bool isStatic: false,
bool isExternal: false,
bool isConst: false,
- bool isForwardingStub: false,
- bool isForwardingSemiStub: false,
- bool isMemberSignature: false,
bool isExtensionMember: false,
+ bool isSynthetic: false,
int transformerFlags: 0,
Uri fileUri,
Reference reference,
- Member forwardingStubSuperTarget,
- Member forwardingStubInterfaceTarget,
- Member memberSignatureOrigin})
- : this._byReferenceRenamed(
- name,
- kind,
- function,
- isAbstract: isAbstract,
- isStatic: isStatic,
- isExternal: isExternal,
- isConst: isConst,
- isForwardingStub: isForwardingStub,
- isMemberSignature: isMemberSignature,
- isForwardingSemiStub: isForwardingSemiStub,
- isExtensionMember: isExtensionMember,
- transformerFlags: transformerFlags,
- fileUri: fileUri,
- reference: reference,
- forwardingStubSuperTargetReference:
- getMemberReferenceBasedOnProcedureKind(
- forwardingStubSuperTarget, kind),
- forwardingStubInterfaceTargetReference:
- getMemberReferenceBasedOnProcedureKind(
- forwardingStubInterfaceTarget, kind),
- memberSignatureOriginReference:
- getMemberReferenceBasedOnProcedureKind(
- memberSignatureOrigin, kind),
- );
+ ProcedureStubKind stubKind: ProcedureStubKind.Regular,
+ Member stubTarget})
+ : this._byReferenceRenamed(name, kind, function,
+ isAbstract: isAbstract,
+ isStatic: isStatic,
+ isExternal: isExternal,
+ isConst: isConst,
+ isExtensionMember: isExtensionMember,
+ isSynthetic: isSynthetic,
+ transformerFlags: transformerFlags,
+ fileUri: fileUri,
+ reference: reference,
+ stubKind: stubKind,
+ stubTargetReference:
+ getMemberReferenceBasedOnProcedureKind(stubTarget, kind));
Procedure._byReferenceRenamed(Name name, this.kind, this.function,
{bool isAbstract: false,
bool isStatic: false,
bool isExternal: false,
bool isConst: false,
- bool isForwardingStub: false,
- bool isForwardingSemiStub: false,
- bool isMemberSignature: false,
bool isExtensionMember: false,
+ bool isSynthetic: false,
int transformerFlags: 0,
Uri fileUri,
Reference reference,
- this.forwardingStubSuperTargetReference,
- this.forwardingStubInterfaceTargetReference,
- this.memberSignatureOriginReference})
+ this.stubKind: ProcedureStubKind.Regular,
+ this.stubTargetReference})
: assert(kind != null),
super(name, fileUri, reference) {
function?.parent = this;
@@ -2261,12 +2425,10 @@
this.isStatic = isStatic;
this.isExternal = isExternal;
this.isConst = isConst;
- this.isForwardingStub = isForwardingStub;
- this.isForwardingSemiStub = isForwardingSemiStub;
- this.isMemberSignature = isMemberSignature;
this.isExtensionMember = isExtensionMember;
+ this.isSynthetic = isSynthetic;
this.transformerFlags = transformerFlags;
- assert(!(isMemberSignature && memberSignatureOriginReference == null),
+ assert(!(isMemberSignature && stubTargetReference == null),
"No member signature origin for member signature $this.");
assert(
!(memberSignatureOrigin is Procedure &&
@@ -2279,14 +2441,11 @@
static const int FlagAbstract = 1 << 1;
static const int FlagExternal = 1 << 2;
static const int FlagConst = 1 << 3; // Only for external const factories.
- static const int FlagForwardingStub = 1 << 4;
- static const int FlagForwardingSemiStub = 1 << 5;
// TODO(29841): Remove this flag after the issue is resolved.
- static const int FlagRedirectingFactoryConstructor = 1 << 6;
- static const int FlagNoSuchMethodForwarder = 1 << 7;
- static const int FlagExtensionMember = 1 << 8;
- static const int FlagMemberSignature = 1 << 9;
- static const int FlagNonNullableByDefault = 1 << 10;
+ static const int FlagRedirectingFactoryConstructor = 1 << 4;
+ static const int FlagExtensionMember = 1 << 5;
+ static const int FlagNonNullableByDefault = 1 << 6;
+ static const int FlagSynthetic = 1 << 7;
bool get isStatic => flags & FlagStatic != 0;
bool get isAbstract => flags & FlagAbstract != 0;
@@ -2304,11 +2463,16 @@
/// not declared in the source; it's possible that this is a forwarding
/// semi-stub (see isForwardingSemiStub). To determine whether this function
/// was present in the source, consult [isSyntheticForwarder].
- bool get isForwardingStub => flags & FlagForwardingStub != 0;
+ bool get isForwardingStub =>
+ stubKind == ProcedureStubKind.ForwardingStub ||
+ stubKind == ProcedureStubKind.ForwardingSuperStub;
/// If set, this flag indicates that although this function is a forwarding
/// stub, it was present in the original source as an abstract method.
- bool get isForwardingSemiStub => flags & FlagForwardingSemiStub != 0;
+ bool get isForwardingSemiStub =>
+ !isSynthetic &&
+ (stubKind == ProcedureStubKind.ForwardingStub ||
+ stubKind == ProcedureStubKind.ForwardingSuperStub);
/// If set, this method is a class member added to show the type of an
/// inherited member.
@@ -2317,7 +2481,7 @@
/// directly from the member(s) in the supertypes. For instance in case of
/// an nnbd opt-out class inheriting from an nnbd opt-in class; here all nnbd-
/// aware types are replaced with legacy types in the inherited signature.
- bool get isMemberSignature => flags & FlagMemberSignature != 0;
+ bool get isMemberSignature => stubKind == ProcedureStubKind.MemberSignature;
// Indicates if this [Procedure] represents a redirecting factory constructor
// and doesn't have a runnable body.
@@ -2329,8 +2493,10 @@
/// source, and it exists solely for the purpose of type checking arguments
/// and forwarding to [forwardingStubSuperTarget].
bool get isSyntheticForwarder => isForwardingStub && !isForwardingSemiStub;
+ bool get isSynthetic => flags & FlagSynthetic != 0;
- bool get isNoSuchMethodForwarder => flags & FlagNoSuchMethodForwarder != 0;
+ bool get isNoSuchMethodForwarder =>
+ stubKind == ProcedureStubKind.NoSuchMethodForwarder;
@override
bool get isExtensionMember => flags & FlagExtensionMember != 0;
@@ -2351,39 +2517,21 @@
flags = value ? (flags | FlagConst) : (flags & ~FlagConst);
}
- void set isForwardingStub(bool value) {
- flags =
- value ? (flags | FlagForwardingStub) : (flags & ~FlagForwardingStub);
- }
-
- void set isForwardingSemiStub(bool value) {
- flags = value
- ? (flags | FlagForwardingSemiStub)
- : (flags & ~FlagForwardingSemiStub);
- }
-
- void set isMemberSignature(bool value) {
- flags =
- value ? (flags | FlagMemberSignature) : (flags & ~FlagMemberSignature);
- }
-
void set isRedirectingFactoryConstructor(bool value) {
flags = value
? (flags | FlagRedirectingFactoryConstructor)
: (flags & ~FlagRedirectingFactoryConstructor);
}
- void set isNoSuchMethodForwarder(bool value) {
- flags = value
- ? (flags | FlagNoSuchMethodForwarder)
- : (flags & ~FlagNoSuchMethodForwarder);
- }
-
void set isExtensionMember(bool value) {
flags =
value ? (flags | FlagExtensionMember) : (flags & ~FlagExtensionMember);
}
+ void set isSynthetic(bool value) {
+ flags = value ? (flags | FlagSynthetic) : (flags & ~FlagSynthetic);
+ }
+
bool get isInstanceMember => !isStatic;
bool get isGetter => kind == ProcedureKind.Getter;
bool get isSetter => kind == ProcedureKind.Setter;
@@ -2403,28 +2551,25 @@
}
Member get forwardingStubSuperTarget =>
- forwardingStubSuperTargetReference?.asMember;
-
- void set forwardingStubSuperTarget(Member target) {
- forwardingStubSuperTargetReference =
- getMemberReferenceBasedOnProcedureKind(target, kind);
- }
+ stubKind == ProcedureStubKind.ForwardingSuperStub
+ ? stubTargetReference?.asMember
+ : null;
Member get forwardingStubInterfaceTarget =>
- forwardingStubInterfaceTargetReference?.asMember;
+ stubKind == ProcedureStubKind.ForwardingStub
+ ? stubTargetReference?.asMember
+ : null;
- void set forwardingStubInterfaceTarget(Member target) {
- forwardingStubInterfaceTargetReference =
- getMemberReferenceBasedOnProcedureKind(target, kind);
+ Member get stubTarget => stubTargetReference?.asMember;
+
+ void set stubTarget(Member target) {
+ stubTargetReference = getMemberReferenceBasedOnProcedureKind(target, kind);
}
- @override
- Member get memberSignatureOrigin => memberSignatureOriginReference?.asMember;
-
- void set memberSignatureOrigin(Member target) {
- memberSignatureOriginReference =
- getMemberReferenceBasedOnProcedureKind(target, kind);
- }
+ Member get memberSignatureOrigin =>
+ stubKind == ProcedureStubKind.MemberSignature
+ ? stubTargetReference?.asMember
+ : null;
R accept<R>(MemberVisitor<R> v) => v.visitProcedure(this);
diff --git a/pkg/kernel/lib/binary/ast_from_binary.dart b/pkg/kernel/lib/binary/ast_from_binary.dart
index 9461731..4730bc6 100644
--- a/pkg/kernel/lib/binary/ast_from_binary.dart
+++ b/pkg/kernel/lib/binary/ast_from_binary.dart
@@ -1420,6 +1420,7 @@
int fileEndOffset = readOffset();
int kindIndex = readByte();
ProcedureKind kind = ProcedureKind.values[kindIndex];
+ ProcedureStubKind stubKind = ProcedureStubKind.values[readByte()];
if (node == null) {
node = new Procedure(null, kind, null, reference: reference);
} else {
@@ -1437,12 +1438,7 @@
bool readFunctionNodeNow =
(kind == ProcedureKind.Factory && functionNodeSize <= 50) ||
_disableLazyReading;
- Reference forwardingStubSuperTargetReference =
- readMemberReference(allowNull: true);
- Reference forwardingStubInterfaceTargetReference =
- readMemberReference(allowNull: true);
- Reference memberSignatureTargetReference =
- readMemberReference(allowNull: true);
+ Reference stubTargetReference = readMemberReference(allowNull: true);
FunctionNode function =
readFunctionNodeOption(!readFunctionNodeNow, endOffset);
int transformerFlags = getAndResetTransformerFlags();
@@ -1457,17 +1453,13 @@
node.function = function;
function?.parent = node;
node.setTransformerFlagsWithoutLazyLoading(transformerFlags);
- node.forwardingStubSuperTargetReference =
- forwardingStubSuperTargetReference;
- node.forwardingStubInterfaceTargetReference =
- forwardingStubInterfaceTargetReference;
- node.memberSignatureOriginReference = memberSignatureTargetReference;
+ node.stubKind = stubKind;
+ node.stubTargetReference = stubTargetReference;
- assert((node.forwardingStubSuperTargetReference != null) ||
+ assert((node.stubKind == ProcedureStubKind.ForwardingSuperStub &&
+ node.stubTargetReference != null) ||
!(node.isForwardingStub && node.function.body != null));
- assert(
- !(node.isMemberSignature &&
- node.memberSignatureOriginReference == null),
+ assert(!(node.isMemberSignature && node.stubTargetReference == null),
"No member signature origin for member signature $node.");
return node;
}
diff --git a/pkg/kernel/lib/binary/ast_to_binary.dart b/pkg/kernel/lib/binary/ast_to_binary.dart
index 20881c8..15f1a67 100644
--- a/pkg/kernel/lib/binary/ast_to_binary.dart
+++ b/pkg/kernel/lib/binary/ast_to_binary.dart
@@ -1204,14 +1204,8 @@
@override
void visitProcedure(Procedure node) {
- assert(
- !(node.isMemberSignature &&
- node.memberSignatureOriginReference == null),
+ assert(!(node.isMemberSignature && node.stubTargetReference == null),
"No member signature origin for member signature $node.");
- assert(!(node.isMemberSignature && node.isForwardingStub),
- "Procedure is both member signature and forwarding stub: $node.");
- assert(!(node.isMemberSignature && node.isForwardingSemiStub),
- "Procedure is both member signature and forwarding semi stub: $node.");
assert(
!(node.forwardingStubInterfaceTarget is Procedure &&
(node.forwardingStubInterfaceTarget as Procedure)
@@ -1242,12 +1236,11 @@
writeOffset(node.fileOffset);
writeOffset(node.fileEndOffset);
writeByte(node.kind.index);
+ writeByte(node.stubKind.index);
writeUInt30(node.flags);
writeName(node.name ?? _emptyName);
writeAnnotationList(node.annotations);
- writeNullAllowedReference(node.forwardingStubSuperTargetReference);
- writeNullAllowedReference(node.forwardingStubInterfaceTargetReference);
- writeNullAllowedReference(node.memberSignatureOriginReference);
+ writeNullAllowedReference(node.stubTargetReference);
writeOptionalFunctionNode(node.function);
leaveScope(memberScope: true);
diff --git a/pkg/kernel/lib/binary/tag.dart b/pkg/kernel/lib/binary/tag.dart
index fced0fd..86522b9 100644
--- a/pkg/kernel/lib/binary/tag.dart
+++ b/pkg/kernel/lib/binary/tag.dart
@@ -146,7 +146,7 @@
/// Internal version of kernel binary format.
/// Bump it when making incompatible changes in kernel binaries.
/// Keep in sync with runtime/vm/kernel_binary.h, pkg/kernel/binary.md.
- static const int BinaryFormatVersion = 50;
+ static const int BinaryFormatVersion = 51;
}
abstract class ConstantTag {
diff --git a/pkg/kernel/lib/clone.dart b/pkg/kernel/lib/clone.dart
index b457805..3371d54 100644
--- a/pkg/kernel/lib/clone.dart
+++ b/pkg/kernel/lib/clone.dart
@@ -641,15 +641,17 @@
final Uri activeFileUriSaved = _activeFileUri;
_activeFileUri = node.fileUri ?? _activeFileUri;
- Constructor result = new Constructor(super.clone(node.function),
- name: node.name,
- isConst: node.isConst,
- isExternal: node.isExternal,
- isSynthetic: node.isSynthetic,
- initializers: node.initializers.map(super.clone).toList(),
- transformerFlags: node.transformerFlags,
- fileUri: _activeFileUri,
- reference: referenceFrom?.reference)
+ Constructor result = new Constructor(
+ super.clone(node.function),
+ name: node.name,
+ isConst: node.isConst,
+ isExternal: node.isExternal,
+ isSynthetic: node.isSynthetic,
+ initializers: node.initializers.map(super.clone).toList(),
+ transformerFlags: node.transformerFlags,
+ fileUri: _activeFileUri,
+ reference: referenceFrom?.reference,
+ )
..annotations = cloneAnnotations && !node.annotations.isEmpty
? node.annotations.map(super.clone).toList()
: const <Expression>[]
@@ -663,15 +665,13 @@
Procedure cloneProcedure(Procedure node, Procedure referenceFrom) {
final Uri activeFileUriSaved = _activeFileUri;
_activeFileUri = node.fileUri ?? _activeFileUri;
-
Procedure result = new Procedure(
node.name, node.kind, super.clone(node.function),
reference: referenceFrom?.reference,
transformerFlags: node.transformerFlags,
fileUri: _activeFileUri,
- forwardingStubSuperTarget: node.forwardingStubSuperTarget,
- forwardingStubInterfaceTarget: node.forwardingStubInterfaceTarget,
- memberSignatureOrigin: node.memberSignatureOrigin)
+ stubKind: node.stubKind,
+ stubTarget: node.stubTarget)
..annotations = cloneAnnotations && !node.annotations.isEmpty
? node.annotations.map(super.clone).toList()
: const <Expression>[]
diff --git a/pkg/kernel/lib/text/ast_to_text.dart b/pkg/kernel/lib/text/ast_to_text.dart
index 84c9ce8..1bed6f2 100644
--- a/pkg/kernel/lib/text/ast_to_text.dart
+++ b/pkg/kernel/lib/text/ast_to_text.dart
@@ -1146,14 +1146,14 @@
if (features.isNotEmpty) {
writeWord("/*${features.join(',')}*/");
}
- if (node.memberSignatureOriginReference != null) {
+ if (node.isMemberSignature) {
writeFunction(node.function,
name: getMemberName(node), terminateLine: false);
if (node.function.body is ReturnStatement) {
writeSymbol(';');
}
writeSymbol(' -> ');
- writeMemberReferenceFromReference(node.memberSignatureOriginReference);
+ writeMemberReferenceFromReference(node.stubTargetReference);
endLine();
} else {
writeFunction(node.function, name: getMemberName(node));
diff --git a/pkg/kernel/lib/text/text_serializer.dart b/pkg/kernel/lib/text/text_serializer.dart
index 0aee5ce..5ef2d8d 100644
--- a/pkg/kernel/lib/text/text_serializer.dart
+++ b/pkg/kernel/lib/text/text_serializer.dart
@@ -1433,14 +1433,11 @@
Procedure.FlagAbstract: "abstract",
Procedure.FlagExternal: "external",
Procedure.FlagConst: "const",
- Procedure.FlagForwardingStub: "forwarding-stub",
- Procedure.FlagForwardingSemiStub: "forwarding-semi-stub",
Procedure.FlagRedirectingFactoryConstructor:
"redirecting-factory-constructor",
- Procedure.FlagNoSuchMethodForwarder: "no-such-method-forwarder",
Procedure.FlagExtensionMember: "extension-member",
- Procedure.FlagMemberSignature: "member-signature",
Procedure.FlagNonNullableByDefault: "non-nullable-by-default",
+ Procedure.FlagSynthetic: "synthetic",
};
class ProcedureFlagTagger implements Tagger<int> {
diff --git a/pkg/kernel/pubspec.yaml b/pkg/kernel/pubspec.yaml
index dc4c5f73..3609233 100644
--- a/pkg/kernel/pubspec.yaml
+++ b/pkg/kernel/pubspec.yaml
@@ -8,7 +8,8 @@
environment:
sdk: '>=2.6.0 <3.0.0'
dependencies:
- meta: ^1.0.0
+ meta:
+ path: ../meta
dev_dependencies:
args: '>=0.13.4 <2.0.0'
expect:
diff --git a/pkg/nnbd_migration/pubspec.yaml b/pkg/nnbd_migration/pubspec.yaml
index ed3de13..0a382de 100644
--- a/pkg/nnbd_migration/pubspec.yaml
+++ b/pkg/nnbd_migration/pubspec.yaml
@@ -7,14 +7,18 @@
sdk: '>=2.6.0 <3.0.0'
dependencies:
- _fe_analyzer_shared: ^4.0.0
- analyzer: ^0.40.4
- analyzer_plugin: ^0.2.4
+ _fe_analyzer_shared:
+ path: ../_fe_analyzer_shared
+ analyzer:
+ path: ../analyzer
+ analyzer_plugin:
+ path: ../analyzer_plugin
args: ^1.4.4
cli_util: ^0.2.0
collection: ^1.14.11
crypto: ^2.0.6
- meta: ^1.1.6
+ meta:
+ path: ../meta
path: ^1.6.2
pub_semver: ^1.4.2
source_span: ^1.4.1
diff --git a/pkg/scrape/pubspec.yaml b/pkg/scrape/pubspec.yaml
index a011644..ffdaff1 100644
--- a/pkg/scrape/pubspec.yaml
+++ b/pkg/scrape/pubspec.yaml
@@ -2,11 +2,15 @@
description: Helper package for analyzing the syntax of Dart programs.
# This package is not intended for consumption on pub.dev. DO NOT publish.
publish_to: none
+
environment:
sdk: ^2.10.0
+
dependencies:
args: ^1.6.0
- analyzer: ^0.40.4
+ analyzer:
+ path: ../analyzer
path: ^1.7.0
+
dev_dependencies:
pedantic: ^1.9.2
diff --git a/pkg/telemetry/pubspec.yaml b/pkg/telemetry/pubspec.yaml
index c3ba85f..ca646aa 100644
--- a/pkg/telemetry/pubspec.yaml
+++ b/pkg/telemetry/pubspec.yaml
@@ -9,7 +9,8 @@
dependencies:
http: ^0.12.0
- meta: ^1.0.2
+ meta:
+ path: ../meta
path: ^1.4.0
stack_trace: ^1.7.0
usage: ^3.2.0+1
diff --git a/pkg/vm/lib/transformations/type_flow/transformer.dart b/pkg/vm/lib/transformations/type_flow/transformer.dart
index 06a0665..2ea1325 100644
--- a/pkg/vm/lib/transformations/type_flow/transformer.dart
+++ b/pkg/vm/lib/transformations/type_flow/transformer.dart
@@ -593,19 +593,19 @@
} else if (m is Procedure) {
func = m.function;
if (m.forwardingStubSuperTarget != null) {
- m.forwardingStubSuperTarget = fieldMorpher.adjustInstanceCallTarget(
+ m.stubTarget = fieldMorpher.adjustInstanceCallTarget(
m.forwardingStubSuperTarget,
isSetter: m.isSetter);
addUsedMember(m.forwardingStubSuperTarget);
}
if (m.forwardingStubInterfaceTarget != null) {
- m.forwardingStubInterfaceTarget = fieldMorpher
- .adjustInstanceCallTarget(m.forwardingStubInterfaceTarget,
- isSetter: m.isSetter);
+ m.stubTarget = fieldMorpher.adjustInstanceCallTarget(
+ m.forwardingStubInterfaceTarget,
+ isSetter: m.isSetter);
addUsedMember(m.forwardingStubInterfaceTarget);
}
if (m.memberSignatureOrigin != null) {
- m.memberSignatureOrigin = fieldMorpher.adjustInstanceCallTarget(
+ m.stubTarget = fieldMorpher.adjustInstanceCallTarget(
m.memberSignatureOrigin,
isSetter: m.isSetter);
addUsedMember(m.memberSignatureOrigin);
@@ -1328,8 +1328,10 @@
_makeUnreachableBody(node.function);
}
node.function.asyncMarker = AsyncMarker.Sync;
- node.forwardingStubSuperTargetReference = null;
- node.forwardingStubInterfaceTargetReference = null;
+ if (node.forwardingStubSuperTarget != null ||
+ node.forwardingStubInterfaceTarget != null) {
+ node.stubTarget = null;
+ }
Statistics.methodBodiesDropped++;
} else if (node is Field) {
node.initializer = null;
diff --git a/pkg/vm/pubspec.yaml b/pkg/vm/pubspec.yaml
index 9a2d487..95341eb 100644
--- a/pkg/vm/pubspec.yaml
+++ b/pkg/vm/pubspec.yaml
@@ -11,9 +11,12 @@
build_integration:
path: ../build_integration
crypto: any
- front_end: any
- kernel: ^0.3.6
- meta: any
+ front_end:
+ path: ../front_end
+ kernel:
+ path: ../kernel
+ meta:
+ path: ../meta
package_config: any
dev_dependencies:
diff --git a/runtime/vm/compiler/backend/il.cc b/runtime/vm/compiler/backend/il.cc
index 9fdefe6..04c0b16 100644
--- a/runtime/vm/compiler/backend/il.cc
+++ b/runtime/vm/compiler/backend/il.cc
@@ -824,7 +824,7 @@
const auto& cache = MegamorphicCache::Handle(
zone, MegamorphicCacheTable::Lookup(thread, name, descriptor));
{
- SafepointMutexLocker ml(thread->isolate()->type_feedback_mutex());
+ SafepointMutexLocker ml(thread->isolate_group()->type_feedback_mutex());
MegamorphicCacheEntries entries(Array::Handle(zone, cache.buckets()));
for (intptr_t i = 0, n = entries.Length(); i < n; i++) {
const intptr_t id =
diff --git a/runtime/vm/compiler/frontend/kernel_fingerprints.cc b/runtime/vm/compiler/frontend/kernel_fingerprints.cc
index 0a40040..6b6a2d55 100644
--- a/runtime/vm/compiler/frontend/kernel_fingerprints.cc
+++ b/runtime/vm/compiler/frontend/kernel_fingerprints.cc
@@ -784,6 +784,7 @@
BuildHash(procedure_helper.kind_);
BuildHash(procedure_helper.flags_);
BuildHash(procedure_helper.annotation_count_);
+ BuildHash(procedure_helper.stub_kind_);
BuildHash(name.Hash());
return hash_;
}
diff --git a/runtime/vm/compiler/frontend/kernel_translation_helper.cc b/runtime/vm/compiler/frontend/kernel_translation_helper.cc
index e706302..a90b40d 100644
--- a/runtime/vm/compiler/frontend/kernel_translation_helper.cc
+++ b/runtime/vm/compiler/frontend/kernel_translation_helper.cc
@@ -1081,6 +1081,10 @@
kind_ = static_cast<Kind>(helper_->ReadByte());
if (++next_read_ == field) return;
FALL_THROUGH;
+ case kStubKind:
+ stub_kind_ = static_cast<StubKind>(helper_->ReadByte());
+ if (++next_read_ == field) return;
+ FALL_THROUGH;
case kFlags:
flags_ = helper_->ReadUInt();
if (++next_read_ == field) return;
@@ -1097,16 +1101,12 @@
if (++next_read_ == field) return;
}
FALL_THROUGH;
- case kForwardingStubSuperTarget:
- forwarding_stub_super_target_ = helper_->ReadCanonicalNameReference();
- if (++next_read_ == field) return;
- FALL_THROUGH;
- case kForwardingStubInterfaceTarget:
- helper_->ReadCanonicalNameReference();
- if (++next_read_ == field) return;
- FALL_THROUGH;
- case kMemberSignatureTarget:
- helper_->ReadCanonicalNameReference();
+ case kStubTarget:
+ if (stub_kind_ == kForwardingSuperStubKind) {
+ forwarding_stub_super_target_ = helper_->ReadCanonicalNameReference();
+ } else {
+ helper_->ReadCanonicalNameReference();
+ }
if (++next_read_ == field) return;
FALL_THROUGH;
case kFunction:
diff --git a/runtime/vm/compiler/frontend/kernel_translation_helper.h b/runtime/vm/compiler/frontend/kernel_translation_helper.h
index d725cf7..0bb8141 100644
--- a/runtime/vm/compiler/frontend/kernel_translation_helper.h
+++ b/runtime/vm/compiler/frontend/kernel_translation_helper.h
@@ -517,12 +517,11 @@
kPosition,
kEndPosition,
kKind,
+ kStubKind,
kFlags,
kName,
kAnnotations,
- kForwardingStubSuperTarget,
- kForwardingStubInterfaceTarget,
- kMemberSignatureTarget,
+ kStubTarget,
kFunction,
kEnd,
};
@@ -535,18 +534,26 @@
kFactory,
};
+ enum StubKind {
+ kRegularStubKind,
+ kForwardingStubKind,
+ kForwardingSuperStubKind,
+ kNoSuchMethodForwarderStubKind,
+ kMemberSignatureStubKind,
+ kMixinStubKind,
+ kMixinSuperStubKind,
+ };
+
enum Flag {
kStatic = 1 << 0,
kAbstract = 1 << 1,
kExternal = 1 << 2,
kConst = 1 << 3, // Only for external const factories.
- kForwardingStub = 1 << 4,
// TODO(29841): Remove this line after the issue is resolved.
- kRedirectingFactoryConstructor = 1 << 6,
- kNoSuchMethodForwarder = 1 << 7,
- kExtensionMember = 1 << 8,
- kMemberSignature = 1 << 9,
+ kRedirectingFactoryConstructor = 1 << 4,
+ kExtensionMember = 1 << 5,
+ kSyntheticProcedure = 1 << 7,
};
explicit ProcedureHelper(KernelReaderHelper* helper)
@@ -565,15 +572,20 @@
bool IsAbstract() const { return (flags_ & kAbstract) != 0; }
bool IsExternal() const { return (flags_ & kExternal) != 0; }
bool IsConst() const { return (flags_ & kConst) != 0; }
- bool IsForwardingStub() const { return (flags_ & kForwardingStub) != 0; }
+ bool IsForwardingStub() const {
+ return stub_kind_ == kForwardingStubKind ||
+ stub_kind_ == kForwardingSuperStubKind;
+ }
bool IsRedirectingFactoryConstructor() const {
return (flags_ & kRedirectingFactoryConstructor) != 0;
}
bool IsNoSuchMethodForwarder() const {
- return (flags_ & kNoSuchMethodForwarder) != 0;
+ return stub_kind_ == kNoSuchMethodForwarderStubKind;
}
bool IsExtensionMember() const { return (flags_ & kExtensionMember) != 0; }
- bool IsMemberSignature() const { return (flags_ & kMemberSignature) != 0; }
+ bool IsMemberSignature() const {
+ return stub_kind_ == kMemberSignatureStubKind;
+ }
NameIndex canonical_name_;
TokenPosition start_position_;
@@ -583,6 +595,7 @@
uint32_t flags_ = 0;
intptr_t source_uri_index_ = 0;
intptr_t annotation_count_ = 0;
+ StubKind stub_kind_;
// Only valid if the 'isForwardingStub' flag is set.
NameIndex forwarding_stub_super_target_;
diff --git a/runtime/vm/compiler/recognized_methods_list.h b/runtime/vm/compiler/recognized_methods_list.h
index 1323840..0892f8d 100644
--- a/runtime/vm/compiler/recognized_methods_list.h
+++ b/runtime/vm/compiler/recognized_methods_list.h
@@ -12,364 +12,364 @@
// When adding a new function, add a 0 as the fingerprint and run the build in
// debug mode to get the correct fingerprint from the mismatch error.
#define OTHER_RECOGNIZED_LIST(V) \
- V(::, identical, ObjectIdentical, 0x8fd6ea77) \
- V(ClassID, getID, ClassIDgetID, 0x0401ffad) \
+ V(::, identical, ObjectIdentical, 0x19eb7f33) \
+ V(ClassID, getID, ClassIDgetID, 0x4d140cb3) \
V(Object, Object., ObjectConstructor, 0x89c467da) \
- V(List, ., ListFactory, 0xbec87d52) \
- V(_List, ., ObjectArrayAllocate, 0x6de199c0) \
- V(_List, []=, ObjectArraySetIndexed, 0xba1597ae) \
- V(_GrowableList, []=, GrowableArraySetIndexed, 0xba1597ae) \
- V(_TypedList, _getInt8, ByteArrayBaseGetInt8, 0xc28aff56) \
- V(_TypedList, _getUint8, ByteArrayBaseGetUint8, 0xc3e7214c) \
- V(_TypedList, _getInt16, ByteArrayBaseGetInt16, 0xdaa7b971) \
- V(_TypedList, _getUint16, ByteArrayBaseGetUint16, 0xdc2919db) \
- V(_TypedList, _getInt32, ByteArrayBaseGetInt32, 0xc57f53ce) \
- V(_TypedList, _getUint32, ByteArrayBaseGetUint32, 0xc5c4953f) \
- V(_TypedList, _getInt64, ByteArrayBaseGetInt64, 0xa2c7e6c3) \
- V(_TypedList, _getUint64, ByteArrayBaseGetUint64, 0xd8c2a01d) \
- V(_TypedList, _getFloat32, ByteArrayBaseGetFloat32, 0xaf15f2a9) \
- V(_TypedList, _getFloat64, ByteArrayBaseGetFloat64, 0xbe4987d6) \
- V(_TypedList, _getFloat32x4, ByteArrayBaseGetFloat32x4, 0x76c82c47) \
- V(_TypedList, _getInt32x4, ByteArrayBaseGetInt32x4, 0x29abed6d) \
- V(_TypedList, _setInt8, ByteArrayBaseSetInt8, 0xfc13ada6) \
- V(_TypedList, _setUint8, ByteArrayBaseSetUint8, 0xc9e4214c) \
- V(_TypedList, _setInt16, ByteArrayBaseSetInt16, 0xd570aa2b) \
- V(_TypedList, _setUint16, ByteArrayBaseSetUint16, 0xe8acb253) \
- V(_TypedList, _setInt32, ByteArrayBaseSetInt32, 0xd8651544) \
- V(_TypedList, _setUint32, ByteArrayBaseSetUint32, 0xd3f10db6) \
- V(_TypedList, _setInt64, ByteArrayBaseSetInt64, 0xe357b97e) \
- V(_TypedList, _setUint64, ByteArrayBaseSetUint64, 0xf4d19c09) \
- V(_TypedList, _setFloat32, ByteArrayBaseSetFloat32, 0xd6272664) \
- V(_TypedList, _setFloat64, ByteArrayBaseSetFloat64, 0xca4af156) \
- V(_TypedList, _setFloat32x4, ByteArrayBaseSetFloat32x4, 0x71767f9e) \
- V(_TypedList, _setInt32x4, ByteArrayBaseSetInt32x4, 0xf048329f) \
- V(ByteData, ., ByteDataFactory, 0x63fefa6a) \
- V(_ByteDataView, get:offsetInBytes, ByteDataViewOffsetInBytes, 0xe51b928a) \
- V(_ByteDataView, get:_typedData, ByteDataViewTypedData, 0x3c781fd8) \
- V(_TypedListView, get:offsetInBytes, TypedDataViewOffsetInBytes, 0xe51b928a) \
- V(_TypedListView, get:_typedData, TypedDataViewTypedData, 0x3c781fd8) \
- V(_ByteDataView, ._, TypedData_ByteDataView_factory, 0xe9e9daf8) \
- V(_Int8ArrayView, ._, TypedData_Int8ArrayView_factory, 0x016014c6) \
- V(_Uint8ArrayView, ._, TypedData_Uint8ArrayView_factory, 0x8c3fc251) \
+ V(List, ., ListFactory, 0x1892c890) \
+ V(_List, ., ObjectArrayAllocate, 0x4c9d39e2) \
+ V(_List, []=, ObjectArraySetIndexed, 0xe98d0a9e) \
+ V(_GrowableList, []=, GrowableArraySetIndexed, 0xe98d0a9e) \
+ V(_TypedList, _getInt8, ByteArrayBaseGetInt8, 0x30688af4) \
+ V(_TypedList, _getUint8, ByteArrayBaseGetUint8, 0x31c4acea) \
+ V(_TypedList, _getInt16, ByteArrayBaseGetInt16, 0x4885450f) \
+ V(_TypedList, _getUint16, ByteArrayBaseGetUint16, 0x4a06a579) \
+ V(_TypedList, _getInt32, ByteArrayBaseGetInt32, 0x335cdbca) \
+ V(_TypedList, _getUint32, ByteArrayBaseGetUint32, 0x33a21d3b) \
+ V(_TypedList, _getInt64, ByteArrayBaseGetInt64, 0x10a56ebf) \
+ V(_TypedList, _getUint64, ByteArrayBaseGetUint64, 0x46a02819) \
+ V(_TypedList, _getFloat32, ByteArrayBaseGetFloat32, 0xe425bcd3) \
+ V(_TypedList, _getFloat64, ByteArrayBaseGetFloat64, 0xf3595200) \
+ V(_TypedList, _getFloat32x4, ByteArrayBaseGetFloat32x4, 0xb3cc1803) \
+ V(_TypedList, _getInt32x4, ByteArrayBaseGetInt32x4, 0xbe4aee59) \
+ V(_TypedList, _setInt8, ByteArrayBaseSetInt8, 0x89b17e2a) \
+ V(_TypedList, _setUint8, ByteArrayBaseSetUint8, 0x5781f1d0) \
+ V(_TypedList, _setInt16, ByteArrayBaseSetInt16, 0x630e7aaf) \
+ V(_TypedList, _setUint16, ByteArrayBaseSetUint16, 0x764a82d7) \
+ V(_TypedList, _setInt32, ByteArrayBaseSetInt32, 0x6602e5c8) \
+ V(_TypedList, _setUint32, ByteArrayBaseSetUint32, 0x618ede3a) \
+ V(_TypedList, _setInt64, ByteArrayBaseSetInt64, 0x70f58a02) \
+ V(_TypedList, _setUint64, ByteArrayBaseSetUint64, 0x826f6c8d) \
+ V(_TypedList, _setFloat32, ByteArrayBaseSetFloat32, 0x2761c274) \
+ V(_TypedList, _setFloat64, ByteArrayBaseSetFloat64, 0x1b858d66) \
+ V(_TypedList, _setFloat32x4, ByteArrayBaseSetFloat32x4, 0x9e2320c0) \
+ V(_TypedList, _setInt32x4, ByteArrayBaseSetInt32x4, 0xfa1f5cf1) \
+ V(ByteData, ., ByteDataFactory, 0x1a2bee78) \
+ V(_ByteDataView, get:offsetInBytes, ByteDataViewOffsetInBytes, 0x3915c92a) \
+ V(_ByteDataView, get:_typedData, ByteDataViewTypedData, 0x487f857c) \
+ V(_TypedListView, get:offsetInBytes, TypedDataViewOffsetInBytes, 0x3915c92a) \
+ V(_TypedListView, get:_typedData, TypedDataViewTypedData, 0x487f857c) \
+ V(_ByteDataView, ._, TypedData_ByteDataView_factory, 0xbdff93f4) \
+ V(_Int8ArrayView, ._, TypedData_Int8ArrayView_factory, 0x955093e6) \
+ V(_Uint8ArrayView, ._, TypedData_Uint8ArrayView_factory, 0x666697bb) \
V(_Uint8ClampedArrayView, ._, TypedData_Uint8ClampedArrayView_factory, \
- 0x36da9725) \
- V(_Int16ArrayView, ._, TypedData_Int16ArrayView_factory, 0x09a36717) \
- V(_Uint16ArrayView, ._, TypedData_Uint16ArrayView_factory, 0x8f74c32e) \
- V(_Int32ArrayView, ._, TypedData_Int32ArrayView_factory, 0x8c100d35) \
- V(_Uint32ArrayView, ._, TypedData_Uint32ArrayView_factory, 0x4f7f075d) \
- V(_Int64ArrayView, ._, TypedData_Int64ArrayView_factory, 0xb85546eb) \
- V(_Uint64ArrayView, ._, TypedData_Uint64ArrayView_factory, 0x019c22b9) \
- V(_Float32ArrayView, ._, TypedData_Float32ArrayView_factory, 0x2290e5c0) \
- V(_Float64ArrayView, ._, TypedData_Float64ArrayView_factory, 0xbe62c753) \
- V(_Float32x4ArrayView, ._, TypedData_Float32x4ArrayView_factory, 0x5bb7773c) \
- V(_Int32x4ArrayView, ._, TypedData_Int32x4ArrayView_factory, 0x30b9f2c1) \
- V(_Float64x2ArrayView, ._, TypedData_Float64x2ArrayView_factory, 0x96490d20) \
- V(Int8List, ., TypedData_Int8Array_factory, 0x80ad8400) \
- V(Uint8List, ., TypedData_Uint8Array_factory, 0x252e6787) \
- V(Uint8ClampedList, ., TypedData_Uint8ClampedArray_factory, 0x1ed9320d) \
- V(Int16List, ., TypedData_Int16Array_factory, 0x7ea8632b) \
- V(Uint16List, ., TypedData_Uint16Array_factory, 0x2764f762) \
- V(Int32List, ., TypedData_Int32Array_factory, 0x54a56498) \
- V(Uint32List, ., TypedData_Uint32Array_factory, 0xac4deac3) \
- V(Int64List, ., TypedData_Int64Array_factory, 0x02d4c767) \
- V(Uint64List, ., TypedData_Uint64Array_factory, 0x08669770) \
- V(Float32List, ., TypedData_Float32Array_factory, 0x8b65b9f6) \
- V(Float64List, ., TypedData_Float64Array_factory, 0x09ede849) \
- V(Float32x4List, ., TypedData_Float32x4Array_factory, 0xb2a9e700) \
- V(Int32x4List, ., TypedData_Int32x4Array_factory, 0xa5292166) \
- V(Float64x2List, ., TypedData_Float64x2Array_factory, 0x20eafb62) \
- V(::, _toClampedUint8, ConvertIntToClampedUint8, 0x143ed694) \
+ 0x0f265d67) \
+ V(_Int16ArrayView, ._, TypedData_Int16ArrayView_factory, 0x95778bb5) \
+ V(_Uint16ArrayView, ._, TypedData_Uint16ArrayView_factory, 0xc9d1b27e) \
+ V(_Int32ArrayView, ._, TypedData_Int32ArrayView_factory, 0x609fa957) \
+ V(_Uint32ArrayView, ._, TypedData_Uint32ArrayView_factory, 0x0b0ff42f) \
+ V(_Int64ArrayView, ._, TypedData_Int64ArrayView_factory, 0xbd01a661) \
+ V(_Uint64ArrayView, ._, TypedData_Uint64ArrayView_factory, 0x9c964453) \
+ V(_Float32ArrayView, ._, TypedData_Float32ArrayView_factory, 0x9a39e22c) \
+ V(_Float64ArrayView, ._, TypedData_Float64ArrayView_factory, 0x78a432f9) \
+ V(_Float32x4ArrayView, ._, TypedData_Float32x4ArrayView_factory, 0x85e58030) \
+ V(_Int32x4ArrayView, ._, TypedData_Int32x4ArrayView_factory, 0x5132754b) \
+ V(_Float64x2ArrayView, ._, TypedData_Float64x2ArrayView_factory, 0x9d86a6cc) \
+ V(Int8List, ., TypedData_Int8Array_factory, 0x934e97a2) \
+ V(Uint8List, ., TypedData_Uint8Array_factory, 0x7eea24fb) \
+ V(Uint8ClampedList, ., TypedData_Uint8ClampedArray_factory, 0xba98ab35) \
+ V(Int16List, ., TypedData_Int16Array_factory, 0x54af9dd7) \
+ V(Uint16List, ., TypedData_Uint16Array_factory, 0xc3859080) \
+ V(Int32List, ., TypedData_Int32Array_factory, 0x3e52ca0a) \
+ V(Uint32List, ., TypedData_Uint32Array_factory, 0xdbbb093f) \
+ V(Int64List, ., TypedData_Int64Array_factory, 0x560fc11b) \
+ V(Uint64List, ., TypedData_Uint64Array_factory, 0x02b7f232) \
+ V(Float32List, ., TypedData_Float32Array_factory, 0xdf9d206c) \
+ V(Float64List, ., TypedData_Float64Array_factory, 0x321abc79) \
+ V(Float32x4List, ., TypedData_Float32x4Array_factory, 0xa0de94a2) \
+ V(Int32x4List, ., TypedData_Int32x4Array_factory, 0xfe46a6fc) \
+ V(Float64x2List, ., TypedData_Float64x2Array_factory, 0xfac00c80) \
+ V(::, _toClampedUint8, ConvertIntToClampedUint8, 0x84e4b390) \
V(::, copyRangeFromUint8ListToOneByteString, \
- CopyRangeFromUint8ListToOneByteString, 0x89d6a629) \
- V(_StringBase, _interpolate, StringBaseInterpolate, 0xd5a58f1b) \
- V(_IntegerImplementation, toDouble, IntegerToDouble, 0x5f8db614) \
- V(_Double, _add, DoubleAdd, 0x43269649) \
- V(_Double, _sub, DoubleSub, 0x81077f50) \
- V(_Double, _mul, DoubleMul, 0x7858fa8e) \
- V(_Double, _div, DoubleDiv, 0x813d6ab3) \
- V(::, min, MathMin, 0xe6a2f523) \
- V(::, max, MathMax, 0x4cfa6f8a) \
- V(::, _doublePow, MathDoublePow, 0x9772a8e0) \
- V(::, _intPow, MathIntPow, 0x65762aa8) \
- V(Float32x4, _Float32x4FromDoubles, Float32x4FromDoubles, 0x4ddbf1ef) \
- V(Float32x4, Float32x4.zero, Float32x4Zero, 0x730d829c) \
- V(Float32x4, _Float32x4Splat, Float32x4Splat, 0x36ae8807) \
- V(Float32x4, Float32x4.fromInt32x4Bits, Int32x4ToFloat32x4, 0x8704459c) \
- V(Float32x4, Float32x4.fromFloat64x2, Float64x2ToFloat32x4, 0x71ab7a67) \
- V(_Float32x4, shuffle, Float32x4Shuffle, 0x6f8cd74d) \
- V(_Float32x4, shuffleMix, Float32x4ShuffleMix, 0xd9fe42ee) \
- V(_Float32x4, get:signMask, Float32x4GetSignMask, 0x00b7b98c) \
- V(_Float32x4, equal, Float32x4Equal, 0x77b31298) \
- V(_Float32x4, greaterThan, Float32x4GreaterThan, 0x85a5a2a1) \
- V(_Float32x4, greaterThanOrEqual, Float32x4GreaterThanOrEqual, 0x81c686d9) \
- V(_Float32x4, lessThan, Float32x4LessThan, 0x7d70963f) \
- V(_Float32x4, lessThanOrEqual, Float32x4LessThanOrEqual, 0x79cf7862) \
- V(_Float32x4, notEqual, Float32x4NotEqual, 0x97a75a65) \
- V(_Float32x4, min, Float32x4Min, 0x0ad969b4) \
- V(_Float32x4, max, Float32x4Max, 0xed08eb85) \
- V(_Float32x4, scale, Float32x4Scale, 0xfdf348e4) \
- V(_Float32x4, sqrt, Float32x4Sqrt, 0x84853e14) \
- V(_Float32x4, reciprocalSqrt, Float32x4ReciprocalSqrt, 0x7d66359a) \
- V(_Float32x4, reciprocal, Float32x4Reciprocal, 0x73e065d4) \
- V(_Float32x4, unary-, Float32x4Negate, 0x86111e0e) \
- V(_Float32x4, abs, Float32x4Abs, 0x8ad4c1aa) \
- V(_Float32x4, clamp, Float32x4Clamp, 0x374a9dbf) \
- V(_Float32x4, _withX, Float32x4WithX, 0xfd53a091) \
- V(_Float32x4, _withY, Float32x4WithY, 0xf5f5b525) \
- V(_Float32x4, _withZ, Float32x4WithZ, 0xf2122f82) \
- V(_Float32x4, _withW, Float32x4WithW, 0xef6f233d) \
- V(Float64x2, _Float64x2FromDoubles, Float64x2FromDoubles, 0x9688f495) \
- V(Float64x2, Float64x2.zero, Float64x2Zero, 0x35f71932) \
- V(Float64x2, _Float64x2Splat, Float64x2Splat, 0xf2e6bd08) \
- V(Float64x2, Float64x2.fromFloat32x4, Float32x4ToFloat64x2, 0xa936b440) \
- V(_Float64x2, get:x, Float64x2GetX, 0xd83e57b0) \
- V(_Float64x2, get:y, Float64x2GetY, 0xc5cfb2d3) \
- V(_Float64x2, unary-, Float64x2Negate, 0x48fab4a4) \
- V(_Float64x2, abs, Float64x2Abs, 0x4dbe5840) \
- V(_Float64x2, sqrt, Float64x2Sqrt, 0x476ed4aa) \
- V(_Float64x2, get:signMask, Float64x2GetSignMask, 0x00b7b98c) \
- V(_Float64x2, scale, Float64x2Scale, 0xc0dcdf7a) \
- V(_Float64x2, _withX, Float64x2WithX, 0xc03d3727) \
- V(_Float64x2, _withY, Float64x2WithY, 0xb8df4bbb) \
- V(_Float64x2, min, Float64x2Min, 0x6b5e1774) \
- V(_Float64x2, max, Float64x2Max, 0x4d8d9945) \
- V(Int32x4, _Int32x4FromInts, Int32x4FromInts, 0xa646ec74) \
- V(Int32x4, _Int32x4FromBools, Int32x4FromBools, 0x5e05bf0c) \
- V(Int32x4, Int32x4.fromFloat32x4Bits, Float32x4ToInt32x4, 0x789399bb) \
- V(_Int32x4, get:flagX, Int32x4GetFlagX, 0x7713cbd8) \
- V(_Int32x4, get:flagY, Int32x4GetFlagY, 0x928402b8) \
- V(_Int32x4, get:flagZ, Int32x4GetFlagZ, 0xa02d9e0b) \
- V(_Int32x4, get:flagW, Int32x4GetFlagW, 0xa94db04c) \
- V(_Int32x4, get:signMask, Int32x4GetSignMask, 0x00b7b98c) \
- V(_Int32x4, shuffle, Int32x4Shuffle, 0x149a8b35) \
- V(_Int32x4, shuffleMix, Int32x4ShuffleMix, 0xd017e8be) \
- V(_Int32x4, select, Int32x4Select, 0x2847cb82) \
- V(_Int32x4, _withFlagX, Int32x4WithFlagX, 0xa365d5c5) \
- V(_Int32x4, _withFlagY, Int32x4WithFlagY, 0x94567108) \
- V(_Int32x4, _withFlagZ, Int32x4WithFlagZ, 0x938c5db6) \
- V(_Int32x4, _withFlagW, Int32x4WithFlagW, 0x9ebaceba) \
- V(_HashVMBase, get:_index, LinkedHashMap_getIndex, 0xe16143ba) \
- V(_HashVMBase, set:_index, LinkedHashMap_setIndex, 0x8c8999b6) \
- V(_HashVMBase, get:_data, LinkedHashMap_getData, 0xb1d03a0b) \
- V(_HashVMBase, set:_data, LinkedHashMap_setData, 0x7c713c87) \
- V(_HashVMBase, get:_usedData, LinkedHashMap_getUsedData, 0xcb55344b) \
- V(_HashVMBase, set:_usedData, LinkedHashMap_setUsedData, 0x4b6bbbc7) \
- V(_HashVMBase, get:_hashMask, LinkedHashMap_getHashMask, 0xd35b67fa) \
- V(_HashVMBase, set:_hashMask, LinkedHashMap_setHashMask, 0x5371ef76) \
- V(_HashVMBase, get:_deletedKeys, LinkedHashMap_getDeletedKeys, 0xd55a64fe) \
- V(_HashVMBase, set:_deletedKeys, LinkedHashMap_setDeletedKeys, 0x5570ec7a) \
- V(::, _classRangeCheck, ClassRangeCheck, 0x5ee76890) \
- V(::, _abi, FfiAbi, 0x00a48df9) \
- V(::, _asFunctionInternal, FfiAsFunctionInternal, 0x4ea3f680) \
- V(::, _nativeCallbackFunction, FfiNativeCallbackFunction, 0xe7a60d02) \
- V(::, _loadInt8, FfiLoadInt8, 0x7b779ef2) \
- V(::, _loadInt16, FfiLoadInt16, 0x58b6f049) \
- V(::, _loadInt32, FfiLoadInt32, 0x5a94fedf) \
- V(::, _loadInt64, FfiLoadInt64, 0x4b627ebf) \
- V(::, _loadUint8, FfiLoadUint8, 0x4dc0dbed) \
- V(::, _loadUint16, FfiLoadUint16, 0x79491c06) \
- V(::, _loadUint32, FfiLoadUint32, 0x62e14f71) \
- V(::, _loadUint64, FfiLoadUint64, 0x7178bce8) \
- V(::, _loadIntPtr, FfiLoadIntPtr, 0x584c735a) \
- V(::, _loadFloat, FfiLoadFloat, 0x7f0471f9) \
- V(::, _loadDouble, FfiLoadDouble, 0x7d37b3b5) \
- V(::, _loadPointer, FfiLoadPointer, 0x3691c06c) \
- V(::, _storeInt8, FfiStoreInt8, 0x118e5be8) \
- V(::, _storeInt16, FfiStoreInt16, 0x0a8ba00e) \
- V(::, _storeInt32, FfiStoreInt32, 0x2e23d939) \
- V(::, _storeInt64, FfiStoreInt64, 0x2411ba56) \
- V(::, _storeUint8, FfiStoreUint8, 0x37ab7fd2) \
- V(::, _storeUint16, FfiStoreUint16, 0x153b57ba) \
- V(::, _storeUint32, FfiStoreUint32, 0x181595a1) \
- V(::, _storeUint64, FfiStoreUint64, 0x1516df15) \
- V(::, _storeIntPtr, FfiStoreIntPtr, 0x3a401384) \
- V(::, _storeFloat, FfiStoreFloat, 0x23292bda) \
- V(::, _storeDouble, FfiStoreDouble, 0x013dc7c0) \
- V(::, _storePointer, FfiStorePointer, 0x43c38f81) \
- V(::, _fromAddress, FfiFromAddress, 0xab4ae572) \
- V(Pointer, get:address, FfiGetAddress, 0x012b2bbe) \
- V(::, reachabilityFence, ReachabilityFence, 0xad39d0c5) \
- V(_Utf8Decoder, _scan, Utf8DecoderScan, 0x288d0097) \
- V(_Future, timeout, FutureTimeout, 0xdea67277) \
- V(Future, wait, FutureWait, 0x6c0c3295) \
+ CopyRangeFromUint8ListToOneByteString, 0xeb5abaa9) \
+ V(_StringBase, _interpolate, StringBaseInterpolate, 0xe8ece5a1) \
+ V(_IntegerImplementation, toDouble, IntegerToDouble, 0x33d887fc) \
+ V(_Double, _add, DoubleAdd, 0x1ba15967) \
+ V(_Double, _sub, DoubleSub, 0x5982426e) \
+ V(_Double, _mul, DoubleMul, 0x50d3bdac) \
+ V(_Double, _div, DoubleDiv, 0x59b82dd1) \
+ V(::, min, MathMin, 0xa24c3a83) \
+ V(::, max, MathMax, 0x8552d67e) \
+ V(::, _doublePow, MathDoublePow, 0x9441cc3a) \
+ V(::, _intPow, MathIntPow, 0x409dd978) \
+ V(Float32x4, _Float32x4FromDoubles, Float32x4FromDoubles, 0x790497df) \
+ V(Float32x4, Float32x4.zero, Float32x4Zero, 0x9657735e) \
+ V(Float32x4, _Float32x4Splat, Float32x4Splat, 0xb0d7702d) \
+ V(Float32x4, Float32x4.fromInt32x4Bits, Int32x4ToFloat32x4, 0xda38dd92) \
+ V(Float32x4, Float32x4.fromFloat64x2, Float64x2ToFloat32x4, 0xe41a2079) \
+ V(_Float32x4, shuffle, Float32x4Shuffle, 0xac90c309) \
+ V(_Float32x4, shuffleMix, Float32x4ShuffleMix, 0x3d6d7e46) \
+ V(_Float32x4, get:signMask, Float32x4GetSignMask, 0x54b1e8e8) \
+ V(_Float32x4, equal, Float32x4Equal, 0xc9591626) \
+ V(_Float32x4, greaterThan, Float32x4GreaterThan, 0xd74ba62f) \
+ V(_Float32x4, greaterThanOrEqual, Float32x4GreaterThanOrEqual, 0xd36c8a67) \
+ V(_Float32x4, lessThan, Float32x4LessThan, 0xcf1699cd) \
+ V(_Float32x4, lessThanOrEqual, Float32x4LessThanOrEqual, 0xcb757bf0) \
+ V(_Float32x4, notEqual, Float32x4NotEqual, 0xe94d5df3) \
+ V(_Float32x4, min, Float32x4Min, 0x04e45812) \
+ V(_Float32x4, max, Float32x4Max, 0xe713d9e3) \
+ V(_Float32x4, scale, Float32x4Scale, 0xde622d94) \
+ V(_Float32x4, sqrt, Float32x4Sqrt, 0xa7982e0e) \
+ V(_Float32x4, reciprocalSqrt, Float32x4ReciprocalSqrt, 0xa0792594) \
+ V(_Float32x4, reciprocal, Float32x4Reciprocal, 0x96f355ce) \
+ V(_Float32x4, unary-, Float32x4Negate, 0xa94cf76e) \
+ V(_Float32x4, abs, Float32x4Abs, 0xade7b1a4) \
+ V(_Float32x4, clamp, Float32x4Clamp, 0x57c0dbb9) \
+ V(_Float32x4, _withX, Float32x4WithX, 0xddc28541) \
+ V(_Float32x4, _withY, Float32x4WithY, 0xd66499d5) \
+ V(_Float32x4, _withZ, Float32x4WithZ, 0xd2811432) \
+ V(_Float32x4, _withW, Float32x4WithW, 0xcfde07ed) \
+ V(Float64x2, _Float64x2FromDoubles, Float64x2FromDoubles, 0x9f0a0865) \
+ V(Float64x2, Float64x2.zero, Float64x2Zero, 0x30a0af88) \
+ V(Float64x2, _Float64x2Splat, Float64x2Splat, 0xe169544e) \
+ V(Float64x2, Float64x2.fromFloat32x4, Float32x4ToFloat64x2, 0x7ad848fa) \
+ V(_Float64x2, get:x, Float64x2GetX, 0xf36ac93a) \
+ V(_Float64x2, get:y, Float64x2GetY, 0xe0fc245d) \
+ V(_Float64x2, unary-, Float64x2Negate, 0x43963398) \
+ V(_Float64x2, abs, Float64x2Abs, 0x4830edce) \
+ V(_Float64x2, sqrt, Float64x2Sqrt, 0x41e16a38) \
+ V(_Float64x2, get:signMask, Float64x2GetSignMask, 0x54b1e8e8) \
+ V(_Float64x2, scale, Float64x2Scale, 0x78ab69be) \
+ V(_Float64x2, _withX, Float64x2WithX, 0x780bc16b) \
+ V(_Float64x2, _withY, Float64x2WithY, 0x70add5ff) \
+ V(_Float64x2, min, Float64x2Min, 0xb4f56252) \
+ V(_Float64x2, max, Float64x2Max, 0x9724e423) \
+ V(Int32x4, _Int32x4FromInts, Int32x4FromInts, 0x533214b0) \
+ V(Int32x4, _Int32x4FromBools, Int32x4FromBools, 0x17964f48) \
+ V(Int32x4, Int32x4.fromFloat32x4Bits, Float32x4ToInt32x4, 0xca709e11) \
+ V(_Int32x4, get:flagX, Int32x4GetFlagX, 0x998cbdb6) \
+ V(_Int32x4, get:flagY, Int32x4GetFlagY, 0xb4fcf496) \
+ V(_Int32x4, get:flagZ, Int32x4GetFlagZ, 0xc2a68fe9) \
+ V(_Int32x4, get:flagW, Int32x4GetFlagW, 0xcbc6a22a) \
+ V(_Int32x4, get:signMask, Int32x4GetSignMask, 0x54b1e8e8) \
+ V(_Int32x4, shuffle, Int32x4Shuffle, 0xa9398c21) \
+ V(_Int32x4, shuffleMix, Int32x4ShuffleMix, 0x0a889276) \
+ V(_Int32x4, select, Int32x4Select, 0x48be097c) \
+ V(_Int32x4, _withFlagX, Int32x4WithFlagX, 0x7f4a63d1) \
+ V(_Int32x4, _withFlagY, Int32x4WithFlagY, 0x703aff14) \
+ V(_Int32x4, _withFlagZ, Int32x4WithFlagZ, 0x6f70ebc2) \
+ V(_Int32x4, _withFlagW, Int32x4WithFlagW, 0x7a9f5cc6) \
+ V(_HashVMBase, get:_index, LinkedHashMap_getIndex, 0xf6b408ce) \
+ V(_HashVMBase, set:_index, LinkedHashMap_setIndex, 0xb0967252) \
+ V(_HashVMBase, get:_data, LinkedHashMap_getData, 0xe81ec483) \
+ V(_HashVMBase, set:_data, LinkedHashMap_setData, 0x719e1187) \
+ V(_HashVMBase, get:_usedData, LinkedHashMap_getUsedData, 0x1f4f6aeb) \
+ V(_HashVMBase, set:_usedData, LinkedHashMap_setUsedData, 0xa209d2ef) \
+ V(_HashVMBase, get:_hashMask, LinkedHashMap_getHashMask, 0x27559e9a) \
+ V(_HashVMBase, set:_hashMask, LinkedHashMap_setHashMask, 0xaa10069e) \
+ V(_HashVMBase, get:_deletedKeys, LinkedHashMap_getDeletedKeys, 0x29549b9e) \
+ V(_HashVMBase, set:_deletedKeys, LinkedHashMap_setDeletedKeys, 0xac0f03a2) \
+ V(::, _classRangeCheck, ClassRangeCheck, 0x071d2ec8) \
+ V(::, _abi, FfiAbi, 0x54918e73) \
+ V(::, _asFunctionInternal, FfiAsFunctionInternal, 0x2d4e5e32) \
+ V(::, _nativeCallbackFunction, FfiNativeCallbackFunction, 0x68db1afc) \
+ V(::, _loadInt8, FfiLoadInt8, 0x3b38d254) \
+ V(::, _loadInt16, FfiLoadInt16, 0x187823ab) \
+ V(::, _loadInt32, FfiLoadInt32, 0x1a563241) \
+ V(::, _loadInt64, FfiLoadInt64, 0x0b23b221) \
+ V(::, _loadUint8, FfiLoadUint8, 0x0d820f4f) \
+ V(::, _loadUint16, FfiLoadUint16, 0x390a4f68) \
+ V(::, _loadUint32, FfiLoadUint32, 0x22a282d3) \
+ V(::, _loadUint64, FfiLoadUint64, 0x3139f04a) \
+ V(::, _loadIntPtr, FfiLoadIntPtr, 0x180da6bc) \
+ V(::, _loadFloat, FfiLoadFloat, 0x05f7e3e7) \
+ V(::, _loadDouble, FfiLoadDouble, 0x042b25a3) \
+ V(::, _loadPointer, FfiLoadPointer, 0x117833fa) \
+ V(::, _storeInt8, FfiStoreInt8, 0xdaa635d2) \
+ V(::, _storeInt16, FfiStoreInt16, 0xd3a379f8) \
+ V(::, _storeInt32, FfiStoreInt32, 0xf73bb323) \
+ V(::, _storeInt64, FfiStoreInt64, 0xed299440) \
+ V(::, _storeUint8, FfiStoreUint8, 0x00c359bc) \
+ V(::, _storeUint16, FfiStoreUint16, 0xde5331a4) \
+ V(::, _storeUint32, FfiStoreUint32, 0xe12d6f8b) \
+ V(::, _storeUint64, FfiStoreUint64, 0xde2eb8ff) \
+ V(::, _storeIntPtr, FfiStoreIntPtr, 0x0357ed6e) \
+ V(::, _storeFloat, FfiStoreFloat, 0xafddd150) \
+ V(::, _storeDouble, FfiStoreDouble, 0x8df26d36) \
+ V(::, _storePointer, FfiStorePointer, 0xf3b14e97) \
+ V(::, _fromAddress, FfiFromAddress, 0x811e2220) \
+ V(Pointer, get:address, FfiGetAddress, 0x55255ebc) \
+ V(::, reachabilityFence, ReachabilityFence, 0xde1dc5bd) \
+ V(_Utf8Decoder, _scan, Utf8DecoderScan, 0xb35ced99) \
+ V(_Future, timeout, FutureTimeout, 0x39966bdf) \
+ V(Future, wait, FutureWait, 0x9f3934e1) \
// List of intrinsics:
// (class-name, function-name, intrinsification method, fingerprint).
#define CORE_LIB_INTRINSIC_LIST(V) \
- V(_Smi, ~, Smi_bitNegate, 0x068652d7) \
- V(_Smi, get:bitLength, Smi_bitLength, 0xff01b0eb) \
- V(_Smi, _bitAndFromSmi, Smi_bitAndFromSmi, 0xa483e0b2) \
- V(_BigIntImpl, _lsh, Bigint_lsh, 0x772fb61c) \
- V(_BigIntImpl, _rsh, Bigint_rsh, 0xb52a24d7) \
- V(_BigIntImpl, _absAdd, Bigint_absAdd, 0x90dc61c7) \
- V(_BigIntImpl, _absSub, Bigint_absSub, 0x7688734f) \
- V(_BigIntImpl, _mulAdd, Bigint_mulAdd, 0xb27412b5) \
- V(_BigIntImpl, _sqrAdd, Bigint_sqrAdd, 0xcee0faeb) \
+ V(_Smi, ~, Smi_bitNegate, 0x5a9bcc19) \
+ V(_Smi, get:bitLength, Smi_bitLength, 0x52fbe3e9) \
+ V(_Smi, _bitAndFromSmi, Smi_bitAndFromSmi, 0x7818c386) \
+ V(_BigIntImpl, _lsh, Bigint_lsh, 0xb7f65896) \
+ V(_BigIntImpl, _rsh, Bigint_rsh, 0x3922f42b) \
+ V(_BigIntImpl, _absAdd, Bigint_absAdd, 0x295e93f3) \
+ V(_BigIntImpl, _absSub, Bigint_absSub, 0x273f7af1) \
+ V(_BigIntImpl, _mulAdd, Bigint_mulAdd, 0xba45f6ad) \
+ V(_BigIntImpl, _sqrAdd, Bigint_sqrAdd, 0x2db11c6b) \
V(_BigIntImpl, _estimateQuotientDigit, Bigint_estimateQuotientDigit, \
- 0x14527ef8) \
- V(_BigIntMontgomeryReduction, _mulMod, Montgomery_mulMod, 0x08df27b4) \
- V(_Double, >, Double_greaterThan, 0xe88b701b) \
- V(_Double, >=, Double_greaterEqualThan, 0x1fb70bcd) \
- V(_Double, <, Double_lessThan, 0xae875044) \
- V(_Double, <=, Double_lessEqualThan, 0xc87a506f) \
- V(_Double, ==, Double_equal, 0x5299f1f1) \
- V(_Double, +, Double_add, 0x783a47f3) \
- V(_Double, -, Double_sub, 0x493f1484) \
- V(_Double, *, Double_mul, 0xae0df301) \
- V(_Double, /, Double_div, 0xed535dfd) \
- V(_Double, get:hashCode, Double_hashCode, 0xfa2d7835) \
- V(_Double, get:_identityHashCode, Double_identityHash, 0xcbf20cf3) \
- V(_Double, get:isNaN, Double_getIsNaN, 0x88fdcf13) \
- V(_Double, get:isInfinite, Double_getIsInfinite, 0x796f93d2) \
- V(_Double, get:isNegative, Double_getIsNegative, 0x88e61891) \
- V(_Double, _mulFromInteger, Double_mulFromInteger, 0xc5afaa47) \
- V(_Double, .fromInteger, DoubleFromInteger, 0x9d1ad815) \
- V(_GrowableList, ._withData, GrowableArray_Allocate, 0x00be5947) \
- V(_RegExp, _ExecuteMatch, RegExp_ExecuteMatch, 0x6817558d) \
- V(_RegExp, _ExecuteMatchSticky, RegExp_ExecuteMatchSticky, 0x60e30853) \
- V(Object, ==, ObjectEquals, 0xbc3cad68) \
- V(Object, get:runtimeType, ObjectRuntimeType, 0x6461c6b0) \
- V(Object, _haveSameRuntimeType, ObjectHaveSameRuntimeType, 0xa66bfc77) \
- V(_StringBase, get:hashCode, String_getHashCode, 0xfa2d7854) \
- V(_StringBase, get:_identityHashCode, String_identityHash, 0xcbf20d12) \
- V(_StringBase, get:isEmpty, StringBaseIsEmpty, 0xbdfe9cb1) \
- V(_StringBase, _substringMatches, StringBaseSubstringMatches, 0xf5c3c892) \
- V(_StringBase, [], StringBaseCharAt, 0xfa3bf7dd) \
- V(_OneByteString, get:hashCode, OneByteString_getHashCode, 0xfa2d7854) \
+ 0x3c62c74c) \
+ V(_BigIntMontgomeryReduction, _mulMod, Montgomery_mulMod, 0x091127d0) \
+ V(_Double, >, Double_greaterThan, 0xc4a96c0f) \
+ V(_Double, >=, Double_greaterEqualThan, 0x335a31b3) \
+ V(_Double, <, Double_lessThan, 0x059b1fd8) \
+ V(_Double, <=, Double_lessEqualThan, 0xeb04cf95) \
+ V(_Double, ==, Double_equal, 0x094145f1) \
+ V(_Double, +, Double_add, 0x74e922bb) \
+ V(_Double, -, Double_sub, 0x67d62f0c) \
+ V(_Double, *, Double_mul, 0xa95d3909) \
+ V(_Double, /, Double_div, 0x9f8bc745) \
+ V(_Double, get:hashCode, Double_hashCode, 0x4e27a791) \
+ V(_Double, get:_identityHashCode, Double_identityHash, 0x1fec3c4f) \
+ V(_Double, get:isNaN, Double_getIsNaN, 0xab76c0f1) \
+ V(_Double, get:isInfinite, Double_getIsInfinite, 0x9be885b0) \
+ V(_Double, get:isNegative, Double_getIsNegative, 0xab5f0a6f) \
+ V(_Double, _mulFromInteger, Double_mulFromInteger, 0x88ace077) \
+ V(_Double, .fromInteger, DoubleFromInteger, 0x0f908a15) \
+ V(_GrowableList, ._withData, GrowableArray_Allocate, 0x1947d8a1) \
+ V(_RegExp, _ExecuteMatch, RegExp_ExecuteMatch, 0xd8114d5f) \
+ V(_RegExp, _ExecuteMatchSticky, RegExp_ExecuteMatchSticky, 0xd0dd0025) \
+ V(Object, ==, ObjectEquals, 0xd3f5f95a) \
+ V(Object, get:runtimeType, ObjectRuntimeType, 0x8177627e) \
+ V(Object, _haveSameRuntimeType, ObjectHaveSameRuntimeType, 0xe61da79f) \
+ V(_StringBase, get:hashCode, String_getHashCode, 0x4e27ab52) \
+ V(_StringBase, get:_identityHashCode, String_identityHash, 0x1fec4010) \
+ V(_StringBase, get:isEmpty, StringBaseIsEmpty, 0xfda61c55) \
+ V(_StringBase, _substringMatches, StringBaseSubstringMatches, 0xf07e5912) \
+ V(_StringBase, [], StringBaseCharAt, 0x6c55f9a1) \
+ V(_OneByteString, get:hashCode, OneByteString_getHashCode, 0x4e27ab52) \
V(_OneByteString, _substringUncheckedNative, \
- OneByteString_substringUnchecked, 0x0d39e4c0) \
- V(_OneByteString, ==, OneByteString_equality, 0x3399def0) \
- V(_TwoByteString, ==, TwoByteString_equality, 0x3399def0) \
- V(_Type, get:hashCode, Type_getHashCode, 0xfa2d7854) \
- V(_Type, ==, Type_equality, 0xbc3cad2a) \
- V(::, _getHash, Object_getHash, 0x87e0c75c) \
- V(::, _setHash, Object_setHash, 0xcb4f51f1) \
+ OneByteString_substringUnchecked, 0xd81afdbe) \
+ V(_OneByteString, ==, OneByteString_equality, 0x483ef8d2) \
+ V(_TwoByteString, ==, TwoByteString_equality, 0x483ef8d2) \
+ V(_Type, get:hashCode, Type_getHashCode, 0x4e27ab52) \
+ V(_Type, ==, Type_equality, 0xd3f5f1d8) \
+ V(::, _getHash, Object_getHash, 0x1d1372ac) \
+ V(::, _setHash, Object_setHash, 0x77e0bb27) \
#define CORE_INTEGER_LIB_INTRINSIC_LIST(V) \
V(_IntegerImplementation, _addFromInteger, Integer_addFromInteger, \
- 0xdb88078d) \
- V(_IntegerImplementation, +, Integer_add, 0x9b2718df) \
+ 0x4965932b) \
+ V(_IntegerImplementation, +, Integer_add, 0xaf966f4f) \
V(_IntegerImplementation, _subFromInteger, Integer_subFromInteger, \
- 0xa1d87581) \
- V(_IntegerImplementation, -, Integer_sub, 0x6c350ed0) \
+ 0x0fb6011f) \
+ V(_IntegerImplementation, -, Integer_sub, 0xa39f7e40) \
V(_IntegerImplementation, _mulFromInteger, Integer_mulFromInteger, \
- 0xa93fad20) \
- V(_IntegerImplementation, *, Integer_mul, 0x4197cead) \
+ 0x171d38be) \
+ V(_IntegerImplementation, *, Integer_mul, 0x870ed2dd) \
V(_IntegerImplementation, _moduloFromInteger, Integer_moduloFromInteger, \
- 0xd04091ad) \
- V(_IntegerImplementation, ~/, Integer_truncDivide, 0x79adb421) \
- V(_IntegerImplementation, unary-, Integer_negate, 0xf07a7728) \
+ 0x3e1e1d4b) \
+ V(_IntegerImplementation, ~/, Integer_truncDivide, 0xaade713f) \
+ V(_IntegerImplementation, unary-, Integer_negate, 0x8c0ec194) \
V(_IntegerImplementation, _bitAndFromInteger, Integer_bitAndFromInteger, \
- 0xcbb1b7b1) \
- V(_IntegerImplementation, &, Integer_bitAnd, 0x2b385f83) \
+ 0x398f434f) \
+ V(_IntegerImplementation, &, Integer_bitAnd, 0xd8a76af3) \
V(_IntegerImplementation, _bitOrFromInteger, Integer_bitOrFromInteger, \
- 0xbd3f9489) \
- V(_IntegerImplementation, |, Integer_bitOr, 0x19dc9b3b) \
+ 0x2b1d2027) \
+ V(_IntegerImplementation, |, Integer_bitOr, 0xdc51e4ab) \
V(_IntegerImplementation, _bitXorFromInteger, Integer_bitXorFromInteger, \
- 0xae7f644d) \
- V(_IntegerImplementation, ^, Integer_bitXor, 0x139d6742) \
+ 0x1c5cefeb) \
+ V(_IntegerImplementation, ^, Integer_bitXor, 0x2542adb2) \
V(_IntegerImplementation, _greaterThanFromInteger, \
- Integer_greaterThanFromInt, 0x47319245) \
- V(_IntegerImplementation, >, Integer_greaterThan, 0xc9d374eb) \
- V(_IntegerImplementation, ==, Integer_equal, 0xca4e70a6) \
+ Integer_greaterThanFromInt, 0x838ddcc3) \
+ V(_IntegerImplementation, >, Integer_greaterThan, 0x0c62013f) \
+ V(_IntegerImplementation, ==, Integer_equal, 0x881c9ddc) \
V(_IntegerImplementation, _equalToInteger, Integer_equalToInteger, \
- 0x4d9e5fe4) \
- V(_IntegerImplementation, <, Integer_lessThan, 0xae875044) \
- V(_IntegerImplementation, <=, Integer_lessEqualThan, 0xc87a506f) \
- V(_IntegerImplementation, >=, Integer_greaterEqualThan, 0x1fb70bcd) \
- V(_IntegerImplementation, <<, Integer_shl, 0xe8da52b5) \
- V(_IntegerImplementation, >>, Integer_sar, 0x4fb2015a) \
- V(_Double, toInt, DoubleToInteger, 0xebc9640a) \
+ 0x89faaa62) \
+ V(_IntegerImplementation, <, Integer_lessThan, 0x059b1fd8) \
+ V(_IntegerImplementation, <=, Integer_lessEqualThan, 0xeb04cf95) \
+ V(_IntegerImplementation, >=, Integer_greaterEqualThan, 0x335a31b3) \
+ V(_IntegerImplementation, <<, Integer_shl, 0xc378efa5) \
+ V(_IntegerImplementation, >>, Integer_sar, 0xe029aa4a) \
+ V(_Double, toInt, DoubleToInteger, 0x3fb5f3e6) \
#define MATH_LIB_INTRINSIC_LIST(V) \
- V(::, sqrt, MathSqrt, 0x98d7cb58) \
- V(_Random, _nextState, Random_nextState, 0x2c1cf101) \
+ V(::, sqrt, MathSqrt, 0x1d97494a) \
+ V(_Random, _nextState, Random_nextState, 0x7e5ba345) \
#define GRAPH_MATH_LIB_INTRINSIC_LIST(V) \
- V(::, sin, MathSin, 0x859e669f) \
- V(::, cos, MathCos, 0xd2dae3ad) \
- V(::, tan, MathTan, 0xa23c1141) \
- V(::, asin, MathAsin, 0x1cdb13be) \
- V(::, acos, MathAcos, 0x830d84d9) \
- V(::, atan, MathAtan, 0x35d5ecf6) \
- V(::, atan2, MathAtan2, 0xb4e03b07) \
+ V(::, sin, MathSin, 0xb89b1cb1) \
+ V(::, cos, MathCos, 0x82a25065) \
+ V(::, tan, MathTan, 0x65b9839b) \
+ V(::, asin, MathAsin, 0x7e24237c) \
+ V(::, acos, MathAcos, 0xc484d233) \
+ V(::, atan, MathAtan, 0xb6c154e6) \
+ V(::, atan2, MathAtan2, 0x8e6e8a7b) \
#define GRAPH_TYPED_DATA_INTRINSICS_LIST(V) \
- V(_Int8List, [], Int8ArrayGetIndexed, 0xd61e79dc) \
- V(_Int8List, []=, Int8ArraySetIndexed, 0x6e0b2e91) \
- V(_Uint8List, [], Uint8ArrayGetIndexed, 0xe1a67e1c) \
- V(_Uint8List, []=, Uint8ArraySetIndexed, 0x89499a4d) \
- V(_ExternalUint8Array, [], ExternalUint8ArrayGetIndexed, 0xe1a67e1c) \
- V(_ExternalUint8Array, []=, ExternalUint8ArraySetIndexed, 0x89499a4d) \
- V(_Uint8ClampedList, [], Uint8ClampedArrayGetIndexed, 0xe1a67e1c) \
- V(_Uint8ClampedList, []=, Uint8ClampedArraySetIndexed, 0x5facb0ad) \
+ V(_Int8List, [], Int8ArrayGetIndexed, 0x0cc3b782) \
+ V(_Int8List, []=, Int8ArraySetIndexed, 0xb44a501b) \
+ V(_Uint8List, [], Uint8ArrayGetIndexed, 0x723c3b42) \
+ V(_Uint8List, []=, Uint8ArraySetIndexed, 0x00d95bdf) \
+ V(_ExternalUint8Array, [], ExternalUint8ArrayGetIndexed, 0x723c3b42) \
+ V(_ExternalUint8Array, []=, ExternalUint8ArraySetIndexed, 0x00d95bdf) \
+ V(_Uint8ClampedList, [], Uint8ClampedArrayGetIndexed, 0x723c3b42) \
+ V(_Uint8ClampedList, []=, Uint8ClampedArraySetIndexed, 0xf6d9117f) \
V(_ExternalUint8ClampedArray, [], ExternalUint8ClampedArrayGetIndexed, \
- 0xe1a67e1c) \
+ 0x723c3b42) \
V(_ExternalUint8ClampedArray, []=, ExternalUint8ClampedArraySetIndexed, \
- 0x5facb0ad) \
- V(_Int16List, [], Int16ArrayGetIndexed, 0x1726ae7c) \
- V(_Int16List, []=, Int16ArraySetIndexed, 0xde0f4da6) \
- V(_Uint16List, [], Uint16ArrayGetIndexed, 0x26c2527c) \
- V(_Uint16List, []=, Uint16ArraySetIndexed, 0x69ae5b4f) \
- V(_Int32List, [], Int32ArrayGetIndexed, 0x407e58fd) \
- V(_Int32List, []=, Int32ArraySetIndexed, 0x61194127) \
- V(_Uint32List, [], Uint32ArrayGetIndexed, 0xf078bf5d) \
- V(_Uint32List, []=, Uint32ArraySetIndexed, 0x70f53ca7) \
- V(_Int64List, [], Int64ArrayGetIndexed, 0x7c21b6bd) \
- V(_Int64List, []=, Int64ArraySetIndexed, 0xcaa7c6e9) \
- V(_Uint64List, [], Uint64ArrayGetIndexed, 0x0a7aa13d) \
- V(_Uint64List, []=, Uint64ArraySetIndexed, 0xd1374eb1) \
- V(_Float64List, [], Float64ArrayGetIndexed, 0x9e4b2422) \
- V(_Float64List, []=, Float64ArraySetIndexed, 0x0a43d557) \
- V(_Float32List, [], Float32ArrayGetIndexed, 0xbdf87f02) \
- V(_Float32List, []=, Float32ArraySetIndexed, 0x2e3e1a69) \
- V(_Float32x4List, [], Float32x4ArrayGetIndexed, 0xa90520db) \
- V(_Float32x4List, []=, Float32x4ArraySetIndexed, 0xb9c7402e) \
- V(_Int32x4List, [], Int32x4ArrayGetIndexed, 0xfbcc0e93) \
- V(_Int32x4List, []=, Int32x4ArraySetIndexed, 0x79152ace) \
- V(_Float64x2List, [], Float64x2ArrayGetIndexed, 0xd90a3205) \
- V(_Float64x2List, []=, Float64x2ArraySetIndexed, 0x4fd1921a) \
- V(_TypedList, get:length, TypedListLength, 0xdc9d90c9) \
- V(_TypedListView, get:length, TypedListViewLength, 0xdc9d90c9) \
- V(_ByteDataView, get:length, ByteDataViewLength, 0xdc9d90c9) \
- V(_Float32x4, get:x, Float32x4ShuffleX, 0xd83e57b0) \
- V(_Float32x4, get:y, Float32x4ShuffleY, 0xc5cfb2d3) \
- V(_Float32x4, get:z, Float32x4ShuffleZ, 0xfb9b1e69) \
- V(_Float32x4, get:w, Float32x4ShuffleW, 0xdddb62eb) \
- V(_Float32x4, *, Float32x4Mul, 0x0be25e43) \
- V(_Float32x4, /, Float32x4Div, 0xe73114c0) \
- V(_Float32x4, -, Float32x4Sub, 0x03c44e06) \
- V(_Float32x4, +, Float32x4Add, 0xde8b8395) \
- V(_Float64x2, *, Float64x2Mul, 0x6c670be4) \
- V(_Float64x2, /, Float64x2Div, 0x47b5c280) \
- V(_Float64x2, -, Float64x2Sub, 0x6448fba7) \
- V(_Float64x2, +, Float64x2Add, 0x3f103136) \
+ 0xf6d9117f) \
+ V(_Int16List, [], Int16ArrayGetIndexed, 0xecc216e2) \
+ V(_Int16List, []=, Int16ArraySetIndexed, 0x44ca13a6) \
+ V(_Uint16List, [], Uint16ArrayGetIndexed, 0xd09af2e2) \
+ V(_Uint16List, []=, Uint16ArraySetIndexed, 0x2d0cbb1d) \
+ V(_Int32List, [], Int32ArrayGetIndexed, 0xee5fbc81) \
+ V(_Int32List, []=, Int32ArraySetIndexed, 0x22fe9045) \
+ V(_Uint32List, [], Uint32ArrayGetIndexed, 0x3db22221) \
+ V(_Uint32List, []=, Uint32ArraySetIndexed, 0x0ea204c5) \
+ V(_Int64List, [], Int64ArrayGetIndexed, 0x272816c1) \
+ V(_Int64List, []=, Int64ArraySetIndexed, 0xeb40c2c3) \
+ V(_Uint64List, [], Uint64ArrayGetIndexed, 0x63ec7c41) \
+ V(_Uint64List, []=, Uint64ArraySetIndexed, 0xb6a233fb) \
+ V(_Float64List, [], Float64ArrayGetIndexed, 0x4a2c55fc) \
+ V(_Float64List, []=, Float64ArraySetIndexed, 0x9f268215) \
+ V(_Float32List, [], Float32ArrayGetIndexed, 0x202a571c) \
+ V(_Float32List, []=, Float32ArraySetIndexed, 0xfa74df43) \
+ V(_Float32x4List, [], Float32x4ArrayGetIndexed, 0x96b1f063) \
+ V(_Float32x4List, []=, Float32x4ArraySetIndexed, 0xe010721e) \
+ V(_Int32x4List, [], Int32x4ArrayGetIndexed, 0x9cc8b9ab) \
+ V(_Int32x4List, []=, Int32x4ArraySetIndexed, 0x0a7fdb7e) \
+ V(_Float64x2List, [], Float64x2ArrayGetIndexed, 0x674f0479) \
+ V(_Float64x2List, []=, Float64x2ArraySetIndexed, 0x0b505db2) \
+ V(_TypedList, get:length, TypedListLength, 0x3097c769) \
+ V(_TypedListView, get:length, TypedListViewLength, 0x3097c769) \
+ V(_ByteDataView, get:length, ByteDataViewLength, 0x3097c769) \
+ V(_Float32x4, get:x, Float32x4ShuffleX, 0xf36ac93a) \
+ V(_Float32x4, get:y, Float32x4ShuffleY, 0xe0fc245d) \
+ V(_Float32x4, get:z, Float32x4ShuffleZ, 0x16c78ff3) \
+ V(_Float32x4, get:w, Float32x4ShuffleW, 0xf907d475) \
+ V(_Float32x4, *, Float32x4Mul, 0x06163607) \
+ V(_Float32x4, /, Float32x4Div, 0xe164e8e2) \
+ V(_Float32x4, -, Float32x4Sub, 0xfdf825ca) \
+ V(_Float32x4, +, Float32x4Add, 0xd8bf5b59) \
+ V(_Float64x2, *, Float64x2Mul, 0xb6273c86) \
+ V(_Float64x2, /, Float64x2Div, 0x9175f322) \
+ V(_Float64x2, -, Float64x2Sub, 0xae092c49) \
+ V(_Float64x2, +, Float64x2Add, 0x88d061d8) \
#define GRAPH_CORE_INTRINSICS_LIST(V) \
- V(_List, get:length, ObjectArrayLength, 0xdc9d90c9) \
- V(_List, [], ObjectArrayGetIndexed, 0xd159deed) \
- V(_List, _setIndexed, ObjectArraySetIndexedUnchecked, 0xf5780f62) \
- V(_ImmutableList, get:length, ImmutableArrayLength, 0xdc9d90c9) \
- V(_ImmutableList, [], ImmutableArrayGetIndexed, 0xd159deed) \
- V(_GrowableList, get:length, GrowableArrayLength, 0xdc9d90c9) \
- V(_GrowableList, get:_capacity, GrowableArrayCapacity, 0x01ec3c50) \
- V(_GrowableList, _setData, GrowableArraySetData, 0x8ecf0a5f) \
- V(_GrowableList, _setLength, GrowableArraySetLength, 0x63da77ba) \
- V(_GrowableList, [], GrowableArrayGetIndexed, 0xd159deed) \
- V(_GrowableList, _setIndexed, GrowableArraySetIndexedUnchecked, 0x012e9e43) \
- V(_StringBase, get:length, StringBaseLength, 0xdc9d90c9) \
- V(_OneByteString, codeUnitAt, OneByteStringCodeUnitAt, 0xc4602c32) \
- V(_TwoByteString, codeUnitAt, TwoByteStringCodeUnitAt, 0xc4602c32) \
+ V(_List, get:length, ObjectArrayLength, 0x3097c769) \
+ V(_List, [], ObjectArrayGetIndexed, 0x78f4f491) \
+ V(_List, _setIndexed, ObjectArraySetIndexedUnchecked, 0x367abfe8) \
+ V(_ImmutableList, get:length, ImmutableArrayLength, 0x3097c769) \
+ V(_ImmutableList, [], ImmutableArrayGetIndexed, 0x78f4f491) \
+ V(_GrowableList, get:length, GrowableArrayLength, 0x3097c769) \
+ V(_GrowableList, get:_capacity, GrowableArrayCapacity, 0x55e672f0) \
+ V(_GrowableList, _setData, GrowableArraySetData, 0x9388253f) \
+ V(_GrowableList, _setLength, GrowableArraySetLength, 0xba5d44fc) \
+ V(_GrowableList, [], GrowableArrayGetIndexed, 0x78f4f491) \
+ V(_GrowableList, _setIndexed, GrowableArraySetIndexedUnchecked, 0xa1960d27) \
+ V(_StringBase, get:length, StringBaseLength, 0x3097c769) \
+ V(_OneByteString, codeUnitAt, OneByteStringCodeUnitAt, 0x323db7d0) \
+ V(_TwoByteString, codeUnitAt, TwoByteStringCodeUnitAt, 0x323db7d0) \
V(_ExternalOneByteString, codeUnitAt, ExternalOneByteStringCodeUnitAt, \
- 0xc4602c32) \
+ 0x323db7d0) \
V(_ExternalTwoByteString, codeUnitAt, ExternalTwoByteStringCodeUnitAt, \
- 0xc4602c32) \
- V(_Double, unary-, DoubleFlipSignBit, 0xdb229467) \
- V(_Double, truncateToDouble, DoubleTruncate, 0x00e6f83a) \
- V(_Double, roundToDouble, DoubleRound, 0xf45c3be1) \
- V(_Double, floorToDouble, DoubleFloor, 0xf2c73d29) \
- V(_Double, ceilToDouble, DoubleCeil, 0xfd2e40ba) \
- V(_Double, _modulo, DoubleMod, 0x5673c750)
+ 0x323db7d0) \
+ V(_Double, unary-, DoubleFlipSignBit, 0xf66a4c35) \
+ V(_Double, truncateToDouble, DoubleTruncate, 0x1c05c6a2) \
+ V(_Double, roundToDouble, DoubleRound, 0x0f7b0a49) \
+ V(_Double, floorToDouble, DoubleFloor, 0x0de60b91) \
+ V(_Double, ceilToDouble, DoubleCeil, 0x184d0f22) \
+ V(_Double, _modulo, DoubleMod, 0x2eee8a6e)
#define GRAPH_INTRINSICS_LIST(V) \
GRAPH_CORE_INTRINSICS_LIST(V) \
@@ -377,16 +377,16 @@
GRAPH_MATH_LIB_INTRINSIC_LIST(V) \
#define DEVELOPER_LIB_INTRINSIC_LIST(V) \
- V(_UserTag, makeCurrent, UserTag_makeCurrent, 0x1eb344d2) \
- V(::, _getDefaultTag, UserTag_defaultTag, 0x2ef2e44b) \
- V(::, _getCurrentTag, Profiler_getCurrentTag, 0x33c3ec34) \
- V(::, _isDartStreamEnabled, Timeline_isDartStreamEnabled, 0x7dfcaa37) \
+ V(_UserTag, makeCurrent, UserTag_makeCurrent, 0xc0abd700) \
+ V(::, _getDefaultTag, UserTag_defaultTag, 0xd0ebe717) \
+ V(::, _getCurrentTag, Profiler_getCurrentTag, 0xd5bcef00) \
+ V(::, _isDartStreamEnabled, Timeline_isDartStreamEnabled, 0xa0686991) \
#define INTERNAL_LIB_INTRINSIC_LIST(V) \
- V(::, allocateOneByteString, AllocateOneByteString, 0xc86bebfa) \
- V(::, allocateTwoByteString, AllocateTwoByteString, 0xd0312797) \
- V(::, writeIntoOneByteString, WriteIntoOneByteString, 0xe0d28307) \
- V(::, writeIntoTwoByteString, WriteIntoTwoByteString, 0xd82789d0) \
+ V(::, allocateOneByteString, AllocateOneByteString, 0x3a5d74f6) \
+ V(::, allocateTwoByteString, AllocateTwoByteString, 0x4222b093) \
+ V(::, writeIntoOneByteString, WriteIntoOneByteString, 0xa2337709) \
+ V(::, writeIntoTwoByteString, WriteIntoTwoByteString, 0x99887dd2) \
#define ALL_INTRINSICS_NO_INTEGER_LIB_LIST(V) \
CORE_LIB_INTRINSIC_LIST(V) \
@@ -405,64 +405,64 @@
// A list of core functions that internally dispatch based on received id.
#define POLYMORPHIC_TARGET_LIST(V) \
- V(_StringBase, [], StringBaseCharAt, 0xfa3bf7dd) \
- V(_TypedList, _getInt8, ByteArrayBaseGetInt8, 0xc28aff56) \
- V(_TypedList, _getUint8, ByteArrayBaseGetUint8, 0xc3e7214c) \
- V(_TypedList, _getInt16, ByteArrayBaseGetInt16, 0xdaa7b971) \
- V(_TypedList, _getUint16, ByteArrayBaseGetUint16, 0xdc2919db) \
- V(_TypedList, _getInt32, ByteArrayBaseGetInt32, 0xc57f53ce) \
- V(_TypedList, _getUint32, ByteArrayBaseGetUint32, 0xc5c4953f) \
- V(_TypedList, _getInt64, ByteArrayBaseGetInt64, 0xa2c7e6c3) \
- V(_TypedList, _getUint64, ByteArrayBaseGetUint64, 0xd8c2a01d) \
- V(_TypedList, _getFloat32, ByteArrayBaseGetFloat32, 0xaf15f2a9) \
- V(_TypedList, _getFloat64, ByteArrayBaseGetFloat64, 0xbe4987d6) \
- V(_TypedList, _getFloat32x4, ByteArrayBaseGetFloat32x4, 0x76c82c47) \
- V(_TypedList, _getInt32x4, ByteArrayBaseGetInt32x4, 0x29abed6d) \
- V(_TypedList, _setInt8, ByteArrayBaseSetInt8, 0xfc13ada6) \
- V(_TypedList, _setUint8, ByteArrayBaseSetInt8, 0xc9e4214c) \
- V(_TypedList, _setInt16, ByteArrayBaseSetInt16, 0xd570aa2b) \
- V(_TypedList, _setUint16, ByteArrayBaseSetInt16, 0xe8acb253) \
- V(_TypedList, _setInt32, ByteArrayBaseSetInt32, 0xd8651544) \
- V(_TypedList, _setUint32, ByteArrayBaseSetUint32, 0xd3f10db6) \
- V(_TypedList, _setInt64, ByteArrayBaseSetInt64, 0xe357b97e) \
- V(_TypedList, _setUint64, ByteArrayBaseSetUint64, 0xf4d19c09) \
- V(_TypedList, _setFloat32, ByteArrayBaseSetFloat32, 0xd6272664) \
- V(_TypedList, _setFloat64, ByteArrayBaseSetFloat64, 0xca4af156) \
- V(_TypedList, _setFloat32x4, ByteArrayBaseSetFloat32x4, 0x71767f9e) \
- V(_TypedList, _setInt32x4, ByteArrayBaseSetInt32x4, 0xf048329f) \
- V(Object, get:runtimeType, ObjectRuntimeType, 0x6461c6b0)
+ V(_StringBase, [], StringBaseCharAt, 0x6c55f9a1) \
+ V(_TypedList, _getInt8, ByteArrayBaseGetInt8, 0x30688af4) \
+ V(_TypedList, _getUint8, ByteArrayBaseGetUint8, 0x31c4acea) \
+ V(_TypedList, _getInt16, ByteArrayBaseGetInt16, 0x4885450f) \
+ V(_TypedList, _getUint16, ByteArrayBaseGetUint16, 0x4a06a579) \
+ V(_TypedList, _getInt32, ByteArrayBaseGetInt32, 0x335cdbca) \
+ V(_TypedList, _getUint32, ByteArrayBaseGetUint32, 0x33a21d3b) \
+ V(_TypedList, _getInt64, ByteArrayBaseGetInt64, 0x10a56ebf) \
+ V(_TypedList, _getUint64, ByteArrayBaseGetUint64, 0x46a02819) \
+ V(_TypedList, _getFloat32, ByteArrayBaseGetFloat32, 0xe425bcd3) \
+ V(_TypedList, _getFloat64, ByteArrayBaseGetFloat64, 0xf3595200) \
+ V(_TypedList, _getFloat32x4, ByteArrayBaseGetFloat32x4, 0xb3cc1803) \
+ V(_TypedList, _getInt32x4, ByteArrayBaseGetInt32x4, 0xbe4aee59) \
+ V(_TypedList, _setInt8, ByteArrayBaseSetInt8, 0x89b17e2a) \
+ V(_TypedList, _setUint8, ByteArrayBaseSetInt8, 0x5781f1d0) \
+ V(_TypedList, _setInt16, ByteArrayBaseSetInt16, 0x630e7aaf) \
+ V(_TypedList, _setUint16, ByteArrayBaseSetInt16, 0x764a82d7) \
+ V(_TypedList, _setInt32, ByteArrayBaseSetInt32, 0x6602e5c8) \
+ V(_TypedList, _setUint32, ByteArrayBaseSetUint32, 0x618ede3a) \
+ V(_TypedList, _setInt64, ByteArrayBaseSetInt64, 0x70f58a02) \
+ V(_TypedList, _setUint64, ByteArrayBaseSetUint64, 0x826f6c8d) \
+ V(_TypedList, _setFloat32, ByteArrayBaseSetFloat32, 0x2761c274) \
+ V(_TypedList, _setFloat64, ByteArrayBaseSetFloat64, 0x1b858d66) \
+ V(_TypedList, _setFloat32x4, ByteArrayBaseSetFloat32x4, 0x9e2320c0) \
+ V(_TypedList, _setInt32x4, ByteArrayBaseSetInt32x4, 0xfa1f5cf1) \
+ V(Object, get:runtimeType, ObjectRuntimeType, 0x8177627e)
// List of recognized list factories:
// (factory-name-symbol, class-name-string, constructor-name-string,
// result-cid, fingerprint).
#define RECOGNIZED_LIST_FACTORY_LIST(V) \
- V(_ListFactory, _List, ., kArrayCid, 0x6de199c0) \
- V(_ListFilledFactory, _List, .filled, kArrayCid, 0x871c7eb6) \
- V(_ListGenerateFactory, _List, .generate, kArrayCid, 0x045b9063) \
+ V(_ListFactory, _List, ., kArrayCid, 0x4c9d39e2) \
+ V(_ListFilledFactory, _List, .filled, kArrayCid, 0xaf758106) \
+ V(_ListGenerateFactory, _List, .generate, kArrayCid, 0xff53e115) \
V(_GrowableListFactory, _GrowableList, ., kGrowableObjectArrayCid, \
- 0xdc1f9e09) \
+ 0xa61fbeb9) \
V(_GrowableListFilledFactory, _GrowableList, .filled, \
- kGrowableObjectArrayCid, 0xbc894d36) \
+ kGrowableObjectArrayCid, 0x27a28286) \
V(_GrowableListGenerateFactory, _GrowableList, .generate, \
- kGrowableObjectArrayCid, 0xf6fbbee3) \
+ kGrowableObjectArrayCid, 0x60b98295) \
V(_GrowableListWithData, _GrowableList, ._withData, kGrowableObjectArrayCid, \
- 0x00be5947) \
- V(_Int8ArrayFactory, Int8List, ., kTypedDataInt8ArrayCid, 0x80ad8400) \
- V(_Uint8ArrayFactory, Uint8List, ., kTypedDataUint8ArrayCid, 0x252e6787) \
+ 0x1947d8a1) \
+ V(_Int8ArrayFactory, Int8List, ., kTypedDataInt8ArrayCid, 0x934e97a2) \
+ V(_Uint8ArrayFactory, Uint8List, ., kTypedDataUint8ArrayCid, 0x7eea24fb) \
V(_Uint8ClampedArrayFactory, Uint8ClampedList, ., \
- kTypedDataUint8ClampedArrayCid, 0x1ed9320d) \
- V(_Int16ArrayFactory, Int16List, ., kTypedDataInt16ArrayCid, 0x7ea8632b) \
- V(_Uint16ArrayFactory, Uint16List, ., kTypedDataUint16ArrayCid, 0x2764f762) \
- V(_Int32ArrayFactory, Int32List, ., kTypedDataInt32ArrayCid, 0x54a56498) \
- V(_Uint32ArrayFactory, Uint32List, ., kTypedDataUint32ArrayCid, 0xac4deac3) \
- V(_Int64ArrayFactory, Int64List, ., kTypedDataInt64ArrayCid, 0x02d4c767) \
- V(_Uint64ArrayFactory, Uint64List, ., kTypedDataUint64ArrayCid, 0x08669770) \
+ kTypedDataUint8ClampedArrayCid, 0xba98ab35) \
+ V(_Int16ArrayFactory, Int16List, ., kTypedDataInt16ArrayCid, 0x54af9dd7) \
+ V(_Uint16ArrayFactory, Uint16List, ., kTypedDataUint16ArrayCid, 0xc3859080) \
+ V(_Int32ArrayFactory, Int32List, ., kTypedDataInt32ArrayCid, 0x3e52ca0a) \
+ V(_Uint32ArrayFactory, Uint32List, ., kTypedDataUint32ArrayCid, 0xdbbb093f) \
+ V(_Int64ArrayFactory, Int64List, ., kTypedDataInt64ArrayCid, 0x560fc11b) \
+ V(_Uint64ArrayFactory, Uint64List, ., kTypedDataUint64ArrayCid, 0x02b7f232) \
V(_Float64ArrayFactory, Float64List, ., kTypedDataFloat64ArrayCid, \
- 0x09ede849) \
+ 0x321abc79) \
V(_Float32ArrayFactory, Float32List, ., kTypedDataFloat32ArrayCid, \
- 0x8b65b9f6) \
+ 0xdf9d206c) \
V(_Float32x4ArrayFactory, Float32x4List, ., kTypedDataFloat32x4ArrayCid, \
- 0xb2a9e700)
+ 0xa0de94a2)
// clang-format on
diff --git a/runtime/vm/isolate.cc b/runtime/vm/isolate.cc
index 3849287..3f9b43f 100644
--- a/runtime/vm/isolate.cc
+++ b/runtime/vm/isolate.cc
@@ -361,6 +361,12 @@
"IsolateGroup::type_arguments_canonicalization_mutex_")),
subtype_test_cache_mutex_(
NOT_IN_PRODUCT("IsolateGroup::subtype_test_cache_mutex_")),
+ megamorphic_table_mutex_(
+ NOT_IN_PRODUCT("IsolateGroup::megamorphic_table_mutex_")),
+ type_feedback_mutex_(
+ NOT_IN_PRODUCT("IsolateGroup::type_feedback_mutex_")),
+ patchable_call_mutex_(
+ NOT_IN_PRODUCT("IsolateGroup::patchable_call_mutex_")),
program_lock_(new SafepointRwLock()),
active_mutators_monitor_(new Monitor()),
max_active_mutators_(Scavenger::MaxMutatorThreadCount()) {
@@ -1648,9 +1654,6 @@
mutex_(NOT_IN_PRODUCT("Isolate::mutex_")),
constant_canonicalization_mutex_(
NOT_IN_PRODUCT("Isolate::constant_canonicalization_mutex_")),
- megamorphic_table_mutex_(
- NOT_IN_PRODUCT("Isolate::megamorphic_table_mutex_")),
- type_feedback_mutex_(NOT_IN_PRODUCT("Isolate::type_feedback_mutex_")),
kernel_data_lib_cache_mutex_(
NOT_IN_PRODUCT("Isolate::kernel_data_lib_cache_mutex_")),
kernel_data_class_cache_mutex_(
diff --git a/runtime/vm/isolate.h b/runtime/vm/isolate.h
index 77991a9..a98d48b 100644
--- a/runtime/vm/isolate.h
+++ b/runtime/vm/isolate.h
@@ -424,6 +424,9 @@
return &type_arguments_canonicalization_mutex_;
}
Mutex* subtype_test_cache_mutex() { return &subtype_test_cache_mutex_; }
+ Mutex* megamorphic_table_mutex() { return &megamorphic_table_mutex_; }
+ Mutex* type_feedback_mutex() { return &type_feedback_mutex_; }
+ Mutex* patchable_call_mutex() { return &patchable_call_mutex_; }
#if defined(DART_PRECOMPILED_RUNTIME)
Mutex* unlinked_call_map_mutex() { return &unlinked_call_map_mutex_; }
@@ -722,6 +725,9 @@
Mutex type_canonicalization_mutex_;
Mutex type_arguments_canonicalization_mutex_;
Mutex subtype_test_cache_mutex_;
+ Mutex megamorphic_table_mutex_;
+ Mutex type_feedback_mutex_;
+ Mutex patchable_call_mutex_;
#if defined(DART_PRECOMPILED_RUNTIME)
Mutex unlinked_call_map_mutex_;
@@ -964,9 +970,6 @@
Mutex* constant_canonicalization_mutex() {
return &constant_canonicalization_mutex_;
}
- Mutex* megamorphic_table_mutex() { return &megamorphic_table_mutex_; }
- Mutex* type_feedback_mutex() { return &type_feedback_mutex_; }
-
Mutex* kernel_data_lib_cache_mutex() { return &kernel_data_lib_cache_mutex_; }
Mutex* kernel_data_class_cache_mutex() {
return &kernel_data_class_cache_mutex_;
@@ -1601,8 +1604,6 @@
Simulator* simulator_ = nullptr;
Mutex mutex_; // Protects compiler stats.
Mutex constant_canonicalization_mutex_; // Protects const canonicalization.
- Mutex megamorphic_table_mutex_;
- Mutex type_feedback_mutex_;
Mutex kernel_data_lib_cache_mutex_;
Mutex kernel_data_class_cache_mutex_;
Mutex kernel_constants_mutex_;
diff --git a/runtime/vm/kernel_binary.h b/runtime/vm/kernel_binary.h
index 7d5e9c5..0805ac0 100644
--- a/runtime/vm/kernel_binary.h
+++ b/runtime/vm/kernel_binary.h
@@ -20,8 +20,8 @@
static const uint32_t kMagicProgramFile = 0x90ABCDEFu;
// Both version numbers are inclusive.
-static const uint32_t kMinSupportedKernelFormatVersion = 50;
-static const uint32_t kMaxSupportedKernelFormatVersion = 50;
+static const uint32_t kMinSupportedKernelFormatVersion = 51;
+static const uint32_t kMaxSupportedKernelFormatVersion = 51;
// Keep in sync with package:kernel/lib/binary/tag.dart
#define KERNEL_TAG_LIST(V) \
diff --git a/runtime/vm/megamorphic_cache_table.cc b/runtime/vm/megamorphic_cache_table.cc
index 7a1b7f6..2e7d1b3 100644
--- a/runtime/vm/megamorphic_cache_table.cc
+++ b/runtime/vm/megamorphic_cache_table.cc
@@ -17,7 +17,7 @@
const String& name,
const Array& descriptor) {
Isolate* isolate = thread->isolate();
- SafepointMutexLocker ml(isolate->megamorphic_table_mutex());
+ SafepointMutexLocker ml(thread->isolate_group()->megamorphic_table_mutex());
ASSERT(name.IsSymbol());
// TODO(rmacnak): ASSERT(descriptor.IsCanonical());
@@ -46,7 +46,7 @@
void MegamorphicCacheTable::PrintSizes(Isolate* isolate) {
auto thread = Thread::Current();
- SafepointMutexLocker ml(thread->isolate()->megamorphic_table_mutex());
+ SafepointMutexLocker ml(thread->isolate_group()->megamorphic_table_mutex());
StackZone zone(thread);
intptr_t size = 0;
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index 3f6ff74..56e839d 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -15239,7 +15239,7 @@
void ICData::EnsureHasCheck(const GrowableArray<intptr_t>& class_ids,
const Function& target,
intptr_t count) const {
- SafepointMutexLocker ml(Isolate::Current()->type_feedback_mutex());
+ SafepointMutexLocker ml(IsolateGroup::Current()->type_feedback_mutex());
if (FindCheck(class_ids) != -1) return;
AddCheckInternal(class_ids, target, count);
@@ -15248,14 +15248,15 @@
void ICData::AddCheck(const GrowableArray<intptr_t>& class_ids,
const Function& target,
intptr_t count) const {
- SafepointMutexLocker ml(Isolate::Current()->type_feedback_mutex());
+ SafepointMutexLocker ml(IsolateGroup::Current()->type_feedback_mutex());
AddCheckInternal(class_ids, target, count);
}
void ICData::AddCheckInternal(const GrowableArray<intptr_t>& class_ids,
const Function& target,
intptr_t count) const {
- ASSERT(Isolate::Current()->type_feedback_mutex()->IsOwnedByCurrentThread());
+ ASSERT(
+ IsolateGroup::Current()->type_feedback_mutex()->IsOwnedByCurrentThread());
ASSERT(!is_tracking_exactness());
ASSERT(!target.IsNull());
@@ -15343,7 +15344,7 @@
const Function& target,
intptr_t count,
StaticTypeExactnessState exactness) const {
- SafepointMutexLocker ml(Isolate::Current()->type_feedback_mutex());
+ SafepointMutexLocker ml(IsolateGroup::Current()->type_feedback_mutex());
GrowableArray<intptr_t> class_ids(1);
class_ids.Add(receiver_class_id);
@@ -15356,7 +15357,7 @@
const Function& target,
intptr_t count,
StaticTypeExactnessState exactness) const {
- SafepointMutexLocker ml(Isolate::Current()->type_feedback_mutex());
+ SafepointMutexLocker ml(IsolateGroup::Current()->type_feedback_mutex());
AddReceiverCheckInternal(receiver_class_id, target, count, exactness);
}
@@ -17174,7 +17175,7 @@
void MegamorphicCache::EnsureContains(const Smi& class_id,
const Object& target) const {
- SafepointMutexLocker ml(Isolate::Current()->type_feedback_mutex());
+ SafepointMutexLocker ml(IsolateGroup::Current()->type_feedback_mutex());
if (LookupLocked(class_id) == Object::null()) {
InsertLocked(class_id, target);
@@ -17195,15 +17196,16 @@
}
ObjectPtr MegamorphicCache::Lookup(const Smi& class_id) const {
- SafepointMutexLocker ml(Isolate::Current()->type_feedback_mutex());
+ SafepointMutexLocker ml(IsolateGroup::Current()->type_feedback_mutex());
return LookupLocked(class_id);
}
ObjectPtr MegamorphicCache::LookupLocked(const Smi& class_id) const {
auto thread = Thread::Current();
+ auto isolate_group = thread->isolate_group();
auto zone = thread->zone();
ASSERT(thread->IsMutatorThread());
- ASSERT(thread->isolate()->type_feedback_mutex()->IsOwnedByCurrentThread());
+ ASSERT(isolate_group->type_feedback_mutex()->IsOwnedByCurrentThread());
const auto& backing_array = Array::Handle(zone, buckets());
intptr_t id_mask = mask();
@@ -17225,7 +17227,7 @@
void MegamorphicCache::InsertLocked(const Smi& class_id,
const Object& target) const {
auto isolate_group = IsolateGroup::Current();
- ASSERT(Isolate::Current()->type_feedback_mutex()->IsOwnedByCurrentThread());
+ ASSERT(isolate_group->type_feedback_mutex()->IsOwnedByCurrentThread());
// As opposed to ICData we are stopping mutator threads from other isolates
// while modifying the megamorphic cache, since updates are not atomic.
@@ -17242,17 +17244,20 @@
}
void MegamorphicCache::EnsureCapacityLocked() const {
- ASSERT(Isolate::Current()->type_feedback_mutex()->IsOwnedByCurrentThread());
+ auto thread = Thread::Current();
+ auto zone = thread->zone();
+ auto isolate_group = thread->isolate_group();
+ ASSERT(isolate_group->type_feedback_mutex()->IsOwnedByCurrentThread());
intptr_t old_capacity = mask() + 1;
double load_limit = kLoadFactor * static_cast<double>(old_capacity);
if (static_cast<double>(filled_entry_count() + 1) > load_limit) {
- const Array& old_buckets = Array::Handle(buckets());
+ const Array& old_buckets = Array::Handle(zone, buckets());
intptr_t new_capacity = old_capacity * 2;
const Array& new_buckets =
- Array::Handle(Array::New(kEntryLength * new_capacity));
+ Array::Handle(zone, Array::New(kEntryLength * new_capacity));
- auto& target = Object::Handle();
+ auto& target = Object::Handle(zone);
for (intptr_t i = 0; i < new_capacity; ++i) {
SetEntry(new_buckets, i, smi_illegal_cid(), target);
}
@@ -17261,7 +17266,7 @@
set_filled_entry_count(0);
// Rehash the valid entries.
- Smi& class_id = Smi::Handle();
+ Smi& class_id = Smi::Handle(zone);
for (intptr_t i = 0; i < old_capacity; ++i) {
class_id ^= GetClassId(old_buckets, i);
if (class_id.Value() != kIllegalCid) {
@@ -17274,7 +17279,9 @@
void MegamorphicCache::InsertEntryLocked(const Smi& class_id,
const Object& target) const {
- ASSERT(Isolate::Current()->type_feedback_mutex()->IsOwnedByCurrentThread());
+ auto thread = Thread::Current();
+ auto isolate_group = thread->isolate_group();
+ ASSERT(isolate_group->type_feedback_mutex()->IsOwnedByCurrentThread());
ASSERT(Thread::Current()->IsMutatorThread());
ASSERT(static_cast<double>(filled_entry_count() + 1) <=
diff --git a/runtime/vm/runtime_entry.cc b/runtime/vm/runtime_entry.cc
index b5f1d00..b05b00d 100644
--- a/runtime/vm/runtime_entry.cc
+++ b/runtime/vm/runtime_entry.cc
@@ -1361,6 +1361,8 @@
return target_function.raw();
}
+ SafepointMutexLocker ml(thread->isolate_group()->patchable_call_mutex());
+
return InlineCacheMissHandlerGivenTargetFunction(args, ic_data, 1,
target_function);
}
@@ -1646,8 +1648,8 @@
code = StubCode::MonomorphicSmiableCheck().raw();
}
}
- CodePatcher::PatchSwitchableCallAtWithMutatorsStopped(
- thread_, caller_frame_->pc(), caller_code_, object, code);
+ CodePatcher::PatchSwitchableCallAt(caller_frame_->pc(), caller_code_, object,
+ code);
// Return the ICData. The miss stub will jump to continue in the IC lookup
// stub.
@@ -1765,8 +1767,8 @@
cache.set_lower_limit(lower);
cache.set_upper_limit(upper);
const Code& stub = StubCode::SingleTargetCall();
- CodePatcher::PatchSwitchableCallAtWithMutatorsStopped(
- thread_, caller_frame_->pc(), caller_code_, cache, stub);
+ CodePatcher::PatchSwitchableCallAt(caller_frame_->pc(), caller_code_, cache,
+ stub);
// Return the ICData. The miss stub will jump to continue in the IC call
// stub.
arguments_.SetArgAt(0, StubCode::ICCallThroughCode());
@@ -1776,8 +1778,8 @@
// Patch to call through stub.
const Code& stub = StubCode::ICCallThroughCode();
- CodePatcher::PatchSwitchableCallAtWithMutatorsStopped(
- thread_, caller_frame_->pc(), caller_code_, ic_data, stub);
+ CodePatcher::PatchSwitchableCallAt(caller_frame_->pc(), caller_code_, ic_data,
+ stub);
// Return the ICData. The miss stub will jump to continue in the IC lookup
// stub.
@@ -1794,25 +1796,21 @@
const Code& stub = ic_data.is_tracking_exactness()
? StubCode::OneArgCheckInlineCacheWithExactnessCheck()
: StubCode::OneArgCheckInlineCache();
- CodePatcher::PatchInstanceCallAtWithMutatorsStopped(
- thread_, caller_frame_->pc(), caller_code_, ic_data, stub);
+ CodePatcher::PatchInstanceCallAt(caller_frame_->pc(), caller_code_, ic_data,
+ stub);
if (FLAG_trace_ic) {
OS::PrintErr("Instance call at %" Px
" switching to polymorphic dispatch, %s\n",
caller_frame_->pc(), ic_data.ToCString());
}
- // ICData can be shared between unoptimized and optimized code, so beware that
- // the new receiver class may have already been added through the optimized
- // code.
- if (!ic_data.HasReceiverClassId(receiver_.GetClassId())) {
- GrowableArray<const Instance*> args(1);
- args.Add(&receiver_);
- // Don't count during insertion because the IC stub we continue through will
- // do an increment.
- InlineCacheMissHandlerGivenTargetFunction(args, ic_data, /*count=*/0,
- target_function);
- }
+ // Don't count during insertion because the IC stub we continue through will
+ // do an increment.
+ GrowableArray<const Instance*> args(1);
+ args.Add(&receiver_);
+ InlineCacheMissHandlerGivenTargetFunction(args, ic_data, /*count=*/0,
+ target_function);
+
arguments_.SetArgAt(0, stub);
arguments_.SetReturn(ic_data);
#endif // defined(DART_PRECOMPILED_RUNTIME)
@@ -1848,8 +1846,8 @@
// Call site is not single target, switch to call using ICData.
const Code& stub = StubCode::ICCallThroughCode();
- CodePatcher::PatchSwitchableCallAtWithMutatorsStopped(
- thread_, caller_frame_->pc(), caller_code_, ic_data, stub);
+ CodePatcher::PatchSwitchableCallAt(caller_frame_->pc(), caller_code_, ic_data,
+ stub);
// Return the ICData. The single target stub will jump to continue in the
// IC call stub.
@@ -1893,25 +1891,21 @@
const Smi& expected_cid =
Smi::Handle(zone_, Smi::New(receiver_.GetClassId()));
ASSERT(target_code.HasMonomorphicEntry());
- CodePatcher::PatchSwitchableCallAtWithMutatorsStopped(
- thread_, caller_frame_->pc(), caller_code_, expected_cid, target_code);
+ CodePatcher::PatchSwitchableCallAt(caller_frame_->pc(), caller_code_,
+ expected_cid, target_code);
arguments_.SetArgAt(0, target_code);
arguments_.SetReturn(expected_cid);
} else {
// IC entry might have been added while we waited to get into runtime.
- GrowableArray<intptr_t> class_ids(1);
- class_ids.Add(receiver_.GetClassId());
- if (ic_data.FindCheck(class_ids) == -1) {
- ic_data.AddReceiverCheck(receiver_.GetClassId(), target_function);
- }
+ ic_data.EnsureHasReceiverCheck(receiver_.GetClassId(), target_function);
if (number_of_checks > FLAG_max_polymorphic_checks) {
// Switch to megamorphic call.
const MegamorphicCache& cache = MegamorphicCache::Handle(
zone_, MegamorphicCacheTable::Lookup(thread_, name, descriptor));
const Code& stub = StubCode::MegamorphicCall();
- CodePatcher::PatchSwitchableCallAtWithMutatorsStopped(
- thread_, caller_frame_->pc(), caller_code_, cache, stub);
+ CodePatcher::PatchSwitchableCallAt(caller_frame_->pc(), caller_code_,
+ cache, stub);
arguments_.SetArgAt(0, stub);
arguments_.SetReturn(cache);
} else {
@@ -2087,40 +2081,42 @@
const Function& caller_function =
Function::Handle(zone, caller_frame->LookupDartFunction());
- Object& old_data = Object::Handle(zone);
- Code& old_code = Code::Handle(zone);
+ SwitchableCallHandler handler(thread, receiver, arguments, caller_frame,
+ caller_code, caller_function);
+ // Find out actual target (which can be time consuminmg) without holding any
+ // locks.
+ Object& old_data = Object::Handle(zone);
#if defined(DART_PRECOMPILED_RUNTIME)
- // Grab old_data and do potentially long-running step of resolving the
- // target function before we stop mutators.
- // This will reduce amount of time spent with all mutators are stopped
- // hopefully leaving only code patching to be done then.
old_data =
CodePatcher::GetSwitchableCallDataAt(caller_frame->pc(), caller_code);
#else
- old_code ^= CodePatcher::GetInstanceCallAt(caller_frame->pc(), caller_code,
- &old_data);
+ CodePatcher::GetInstanceCallAt(caller_frame->pc(), caller_code, &old_data);
#endif
- SwitchableCallHandler handler(thread, receiver, arguments, caller_frame,
- caller_code, caller_function);
const Function& target_function =
Function::Handle(zone, handler.ResolveTargetFunction(old_data));
- thread->isolate_group()->RunWithStoppedMutators(
- [&]() {
+
+ {
+ // We ensure any transition in a patchable calls are done in an atomic
+ // manner, we ensure we always transition forward (e.g. Monomorphic ->
+ // Polymorphic).
+ //
+ // Mutators are only stopped if we actually need to patch a patchable call.
+ // We may not do that if we e.g. just add one more check to an ICData.
+ SafepointMutexLocker ml(thread->isolate_group()->patchable_call_mutex());
+
+ auto& old_code = Code::Handle(zone);
#if defined(DART_PRECOMPILED_RUNTIME)
- old_data = CodePatcher::GetSwitchableCallDataAt(caller_frame->pc(),
- caller_code);
-#if defined(DEBUG)
- old_code ^= CodePatcher::GetSwitchableCallTargetAt(caller_frame->pc(),
- caller_code);
-#endif
+ old_data =
+ CodePatcher::GetSwitchableCallDataAt(caller_frame->pc(), caller_code);
+ DEBUG_ONLY(old_code = CodePatcher::GetSwitchableCallTargetAt(
+ caller_frame->pc(), caller_code));
#else
- old_code ^= CodePatcher::GetInstanceCallAt(caller_frame->pc(),
- caller_code, &old_data);
+ old_code ^= CodePatcher::GetInstanceCallAt(caller_frame->pc(), caller_code,
+ &old_data);
#endif
- handler.HandleMiss(old_data, old_code, target_function);
- },
- /*use_force_growth=*/true);
+ handler.HandleMiss(old_data, old_code, target_function);
+ }
}
// Used to find the correct receiver and function to invoke or to fall back to
diff --git a/sdk/lib/_internal/vm/lib/array_patch.dart b/sdk/lib/_internal/vm/lib/array_patch.dart
index 51fe288..df03cf6 100644
--- a/sdk/lib/_internal/vm/lib/array_patch.dart
+++ b/sdk/lib/_internal/vm/lib/array_patch.dart
@@ -30,43 +30,60 @@
@patch
factory List.from(Iterable elements, {bool growable: true}) {
- if (elements is EfficientLengthIterable<E>) {
- int length = elements.length;
- var list = growable ? new _GrowableList<E>(length) : new _List<E>(length);
- if (length > 0) {
- // Avoid creating iterator unless necessary.
- int i = 0;
- for (var element in elements) {
- list[i++] = element;
- }
- }
- return list;
- }
// If elements is an Iterable<E>, we won't need a type-test for each
- // element. In the "common case" that elements is an Iterable<E>, this
- // replaces a type-test on every element with a single type-test before
- // starting the loop.
+ // element.
if (elements is Iterable<E>) {
- List<E> list = new _GrowableList<E>(0);
- for (E e in elements) {
- list.add(e);
- }
- if (growable) return list;
- return makeListFixedLength(list);
- } else {
- List<E> list = new _GrowableList<E>(0);
- for (E e in elements) {
- list.add(e);
- }
- if (growable) return list;
- return makeListFixedLength(list);
+ return List.of(elements, growable: growable);
}
+
+ List<E> list = new _GrowableList<E>(0);
+ for (E e in elements) {
+ list.add(e);
+ }
+ if (growable) return list;
+ return makeListFixedLength(list);
}
@patch
factory List.of(Iterable<E> elements, {bool growable: true}) {
- // TODO(32937): Specialize to benefit from known element type.
- return List.from(elements, growable: growable);
+ final cid = ClassID.getID(elements);
+ final isVMList = (cid == ClassID.cidArray) ||
+ (cid == ClassID.cidGrowableObjectArray) ||
+ (cid == ClassID.cidImmutableArray);
+
+ if (isVMList) {
+ final ListBase<E> elementsAsList = elements as ListBase<E>;
+ final int length = elementsAsList.length;
+ final list =
+ growable ? new _GrowableList<E>(length) : new _List<E>(length);
+ if (length > 0) {
+ for (int i = 0; i < length; i++) {
+ list[i] = elementsAsList[i];
+ }
+ }
+ return list;
+ }
+
+ if (elements is EfficientLengthIterable) {
+ final int length = elements.length;
+ final list =
+ growable ? new _GrowableList<E>(length) : new _List<E>(length);
+ if (length > 0) {
+ int i = 0;
+ for (var element in elements) {
+ list[i++] = element;
+ }
+ if (i != length) throw ConcurrentModificationError(elements);
+ }
+ return list;
+ }
+
+ final list = <E>[];
+ for (var elements in elements) {
+ list.add(elements);
+ }
+ if (growable) return list;
+ return makeListFixedLength(list);
}
@patch
diff --git a/tools/VERSION b/tools/VERSION
index 1fa2f63..04bf624 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -27,5 +27,5 @@
MAJOR 2
MINOR 12
PATCH 0
-PRERELEASE 106
+PRERELEASE 107
PRERELEASE_PATCH 0
\ No newline at end of file
diff --git a/tools/package_deps/bin/package_deps.dart b/tools/package_deps/bin/package_deps.dart
index e177485..ad73069 100644
--- a/tools/package_deps/bin/package_deps.dart
+++ b/tools/package_deps/bin/package_deps.dart
@@ -4,10 +4,6 @@
import 'package:path/path.dart' as path;
import 'package:yaml/yaml.dart' as yaml;
-// TODO(devoncarew): Validate that publishable packages don't use relative sdk
-// paths in their pubspecs.
-
-// TODO(devoncarew): Find unused entries in the DEPS file.
const validateDEPS = false;
void main(List<String> arguments) {
@@ -20,6 +16,15 @@
exit(1);
}
+ print('To run this script, execute:');
+ print('');
+ print(' dart tools/package_deps/bin/package_deps.dart');
+ print('');
+ print('See pkg/README.md for more information.');
+ print('');
+ print('----');
+ print('');
+
// locate all pkg/ packages
final packages = <Package>[];
for (var entity in Directory('pkg').listSync()) {
@@ -31,6 +36,8 @@
}
}
+ List<String> pkgPackages = packages.map((p) => p.packageName).toList();
+
// Manually added directories (outside of pkg/).
List<String> alsoValidate = [
'tools/package_deps',
@@ -49,7 +56,7 @@
print('validating ${package.dir}'
'${package.publishable ? ' [publishable]' : ''}');
- if (!package.validate(logger)) {
+ if (!package.validate(logger, pkgPackages)) {
validateFailure = true;
}
@@ -59,19 +66,22 @@
// Read and display info about the sdk DEPS file.
if (validateDEPS) {
print('SDK DEPS');
+ print('');
+
var sdkDeps = SdkDeps(File('DEPS'));
sdkDeps.parse();
- print('');
- print('packages:');
- for (var pkg in sdkDeps.pkgs) {
- print(' package:$pkg');
+
+ List<String> deps = [...sdkDeps.pkgs, ...sdkDeps.testedPkgs]..sort();
+ for (var pkg in deps) {
+ final tested = sdkDeps.testedPkgs.contains(pkg);
+ print('package:$pkg${tested ? ' [tested]' : ''}');
}
- print('');
- print('tested packages:');
- for (var pkg in sdkDeps.testedPkgs) {
- print(' package:$pkg');
- }
+ // TODO(devoncarew): Validate that published packages solve against the
+ // versions brought in from the DEPS file.
+
+ // TODO(devoncarew): Find unused entries in the DEPS file.
+
}
if (validateFailure) {
@@ -93,13 +103,16 @@
String get packageName => _packageName;
Set<String> _declaredDependencies;
+ List<PubDep> _declaredPubDeps;
Set<String> _declaredDevDependencies;
+ List<PubDep> _declaredDevPubDeps;
List<String> get regularDependencies => _regularDependencies.toList()..sort();
List<String> get devDependencies => _devDependencies.toList()..sort();
bool _publishToNone;
+
bool get publishable => !_publishToNone;
@override
@@ -111,9 +124,9 @@
@override
int compareTo(Package other) => dir.compareTo(other.dir);
- bool validate(Logger logger) {
+ bool validate(Logger logger, List<String> pkgPackages) {
_parseImports();
- return _validatePubspecDeps(logger);
+ return _validatePubspecDeps(logger, pkgPackages);
}
void _parseImports() {
@@ -155,21 +168,34 @@
_packageName = docContents['name'];
_publishToNone = docContents['publish_to'] == 'none';
+ _declaredPubDeps = [];
if (docContents['dependencies'] != null) {
_declaredDependencies =
Set<String>.from(docContents['dependencies'].keys);
+
+ var deps = docContents['dependencies'];
+ for (var package in deps.keys) {
+ _declaredPubDeps.add(PubDep.parse(package, deps[package]));
+ }
} else {
_declaredDependencies = {};
}
+
+ _declaredDevPubDeps = [];
if (docContents['dev_dependencies'] != null) {
_declaredDevDependencies =
Set<String>.from(docContents['dev_dependencies'].keys);
+
+ var deps = docContents['dev_dependencies'];
+ for (var package in deps.keys) {
+ _declaredDevPubDeps.add(PubDep.parse(package, deps[package]));
+ }
} else {
_declaredDevDependencies = {};
}
}
- bool _validatePubspecDeps(Logger logger) {
+ bool _validatePubspecDeps(Logger logger, List<String> pkgPackages) {
var fail = false;
if (dirName != packageName) {
@@ -240,6 +266,47 @@
fail = true;
}
+ // Validate that we don't have relative deps into third_party.
+ // TODO(devoncarew): This is currently just enforced for publishable
+ // packages.
+ if (publishable) {
+ for (PubDep dep in [..._declaredPubDeps, ..._declaredDevPubDeps]) {
+ if (dep is PathPubDep) {
+ var path = dep.path;
+
+ if (path.contains('third_party/pkg_tested/') ||
+ path.contains('third_party/pkg/')) {
+ out(' Prefer a semver dependency for packages brought in via DEPS:');
+ out(' $dep');
+ fail = true;
+ }
+ }
+ }
+ }
+
+ // Validate that published packages don't use path deps.
+ if (publishable) {
+ for (PubDep dep in _declaredPubDeps) {
+ if (dep is PathPubDep) {
+ out(' Published packages should use semver deps:');
+ out(' $dep');
+ fail = true;
+ }
+ }
+ }
+
+ // Validate that non-published packages use relative a (relative) path dep
+ // for pkg/ packages.
+ if (!publishable) {
+ for (PubDep dep in [..._declaredPubDeps, ..._declaredDevPubDeps]) {
+ if (pkgPackages.contains(dep.name) && dep is! PathPubDep) {
+ out(' Prefer a relative path dep for pkg/ packages:');
+ out(' $dep');
+ fail = true;
+ }
+ }
+ }
+
if (!fail) {
print(' No issues.');
}
@@ -361,3 +428,45 @@
testedPkgs.sort();
}
}
+
+abstract class PubDep {
+ final String name;
+
+ PubDep(this.name);
+
+ String toString() => name;
+
+ static PubDep parse(String name, Object dep) {
+ if (dep is String) {
+ return SemverPubDep(name, dep);
+ } else if (dep is Map) {
+ if (dep.containsKey('path')) {
+ return PathPubDep(name, dep['path']);
+ } else {
+ return UnhandledPubDep(name);
+ }
+ } else {
+ return UnhandledPubDep(name);
+ }
+ }
+}
+
+class SemverPubDep extends PubDep {
+ final String value;
+
+ SemverPubDep(String name, this.value) : super(name);
+
+ String toString() => '$name: $value';
+}
+
+class PathPubDep extends PubDep {
+ final String path;
+
+ PathPubDep(String name, this.path) : super(name);
+
+ String toString() => '$name: $path';
+}
+
+class UnhandledPubDep extends PubDep {
+ UnhandledPubDep(String name) : super(name);
+}