Fixed various typos in a lot of files
Closes https://github.com/dart-lang/sdk/pull/49478 TEST=Manual GitOrigin-RevId: f4c9c6869dfe73639295e86574a021523b3d374d Change-Id: I134a97caed4eec59d70e9cbca16b7e9a472cf2c1 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/251902 Reviewed-by: Michael Thomsen <mit@google.com> Commit-Queue: Alexander Thomas <athom@google.com> Reviewed-by: Aske Simon Christensen <askesc@google.com> Reviewed-by: Kevin Chisholm <kevinjchisholm@google.com> Reviewed-by: Alexander Thomas <athom@google.com>
This commit is contained in:
committed by
Commit Bot
parent
286326f834
commit
40e18905f2
@@ -27,7 +27,7 @@ body:
|
|||||||
id: issue_description
|
id: issue_description
|
||||||
attributes:
|
attributes:
|
||||||
label: Issue Description
|
label: Issue Description
|
||||||
description: Brief description of the issue. What is the issue? What platforms are the problems occuring on?
|
description: Brief description of the issue. What is the issue? What platforms are the problems occurring on?
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
- type: textarea
|
- type: textarea
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# This file contains name to mail address mappings that are usefull
|
# This file contains name to mail address mappings that are useful
|
||||||
# for old svn based commits (to get nice names instead of mail in blame and
|
# for old svn based commits (to get nice names instead of mail in blame and
|
||||||
# other tools)
|
# other tools)
|
||||||
Adam Klein <adamk@google.com>
|
Adam Klein <adamk@google.com>
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import 'package:fixnum/fixnum.dart';
|
|||||||
import 'native_version_dummy.dart'
|
import 'native_version_dummy.dart'
|
||||||
if (dart.library.js) 'native_version_javascript.dart';
|
if (dart.library.js) 'native_version_javascript.dart';
|
||||||
|
|
||||||
// Benckmark BigInt and Int64 formatting and parsing.
|
// Benchmark BigInt and Int64 formatting and parsing.
|
||||||
|
|
||||||
// A global sink that is used in the [check] method ensures that the results are
|
// A global sink that is used in the [check] method ensures that the results are
|
||||||
// not optimized.
|
// not optimized.
|
||||||
@@ -49,7 +49,7 @@ class Benchmark extends BenchmarkBase {
|
|||||||
if (b.bitLength < bits) {
|
if (b.bitLength < bits) {
|
||||||
restartDelta += seed >> 20;
|
restartDelta += seed >> 20;
|
||||||
restartDelta += BigInt.one;
|
restartDelta += BigInt.one;
|
||||||
// Restart from a slighly reduced seed to generate different numbers.
|
// Restart from a slightly reduced seed to generate different numbers.
|
||||||
b = seed - restartDelta;
|
b = seed - restartDelta;
|
||||||
}
|
}
|
||||||
var string = b.toString();
|
var string = b.toString();
|
||||||
@@ -310,7 +310,7 @@ void main() {
|
|||||||
selectFormatNativeBigIntBenchmark('JsBigInt.toString.4096.bits', 4096),
|
selectFormatNativeBigIntBenchmark('JsBigInt.toString.4096.bits', 4096),
|
||||||
];
|
];
|
||||||
|
|
||||||
// Warm up all benchmarks to ensure consistent behavious of shared code.
|
// Warm up all benchmarks to ensure consistent behavior of shared code.
|
||||||
benchmarks.forEach((bm) => bm()
|
benchmarks.forEach((bm) => bm()
|
||||||
..setup()
|
..setup()
|
||||||
..run()
|
..run()
|
||||||
|
|||||||
@@ -414,7 +414,7 @@ class HandlerTask extends Task {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// A simple package of data that is manipulated by the tasks. The exact layout
|
/// A simple package of data that is manipulated by the tasks. The exact layout
|
||||||
/// of the payload data carried by a packet is not importaint, and neither is
|
/// of the payload data carried by a packet is not important, and neither is
|
||||||
/// the nature of the work performed on packets by the tasks. Besides carrying
|
/// the nature of the work performed on packets by the tasks. Besides carrying
|
||||||
/// data, packets form linked lists and are hence used both as data and
|
/// data, packets form linked lists and are hence used both as data and
|
||||||
/// worklists.
|
/// worklists.
|
||||||
|
|||||||
@@ -418,7 +418,7 @@ class HandlerTask extends Task {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// A simple package of data that is manipulated by the tasks. The exact layout
|
/// A simple package of data that is manipulated by the tasks. The exact layout
|
||||||
/// of the payload data carried by a packet is not importaint, and neither is
|
/// of the payload data carried by a packet is not important, and neither is
|
||||||
/// the nature of the work performed on packets by the tasks. Besides carrying
|
/// the nature of the work performed on packets by the tasks. Besides carrying
|
||||||
/// data, packets form linked lists and are hence used both as data and
|
/// data, packets form linked lists and are hence used both as data and
|
||||||
/// worklists.
|
/// worklists.
|
||||||
|
|||||||
@@ -497,7 +497,7 @@ var DATA_SIZE = 4;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* A simple package of data that is manipulated by the tasks. The exact layout
|
* A simple package of data that is manipulated by the tasks. The exact layout
|
||||||
* of the payload data carried by a packet is not importaint, and neither is the
|
* of the payload data carried by a packet is not important, and neither is the
|
||||||
* nature of the work performed on packets by the tasks.
|
* nature of the work performed on packets by the tasks.
|
||||||
*
|
*
|
||||||
* Besides carrying data, packets form linked lists and are hence used both as
|
* Besides carrying data, packets form linked lists and are hence used both as
|
||||||
|
|||||||
@@ -121,7 +121,7 @@ def CheckedRead(file, count):
|
|||||||
|
|
||||||
|
|
||||||
def ReadUInt32(file, endian):
|
def ReadUInt32(file, endian):
|
||||||
"""Reads an unsinged 32-bit integer from the file-like |file| object,
|
"""Reads an unsigned 32-bit integer from the file-like |file| object,
|
||||||
treating it as having endianness specified by |endian| (per the |struct|
|
treating it as having endianness specified by |endian| (per the |struct|
|
||||||
module), and returns it as a number. Raises a MachOError if the proper
|
module), and returns it as a number. Raises a MachOError if the proper
|
||||||
length of data can't be read from |file|."""
|
length of data can't be read from |file|."""
|
||||||
@@ -160,7 +160,7 @@ def ReadFatArch(file):
|
|||||||
|
|
||||||
|
|
||||||
def WriteUInt32(file, uint32, endian):
|
def WriteUInt32(file, uint32, endian):
|
||||||
"""Writes |uint32| as an unsinged 32-bit integer to the file-like |file|
|
"""Writes |uint32| as an unsigned 32-bit integer to the file-like |file|
|
||||||
object, treating it as having endianness specified by |endian| (per the
|
object, treating it as having endianness specified by |endian| (per the
|
||||||
|struct| module)."""
|
|struct| module)."""
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import 'package:_fe_analyzer_shared/src/macros/api.dart';
|
|||||||
|
|
||||||
/// A very simple macro that augments any declaration it is given, usually
|
/// A very simple macro that augments any declaration it is given, usually
|
||||||
/// adding print statements and inlining values from the declaration object
|
/// adding print statements and inlining values from the declaration object
|
||||||
/// for comparision with expected values in tests.
|
/// for comparison with expected values in tests.
|
||||||
///
|
///
|
||||||
/// When applied to [MethodDeclaration]s there is some extra work that happens
|
/// When applied to [MethodDeclaration]s there is some extra work that happens
|
||||||
/// to validate the introspection APIs work as expected.
|
/// to validate the introspection APIs work as expected.
|
||||||
|
|||||||
@@ -306,7 +306,7 @@ typedef TextDocumentSignatureHelpResult = SignatureHelp?;
|
|||||||
|
|
||||||
/// Result for a request to resolve the type definition locations of a symbol at
|
/// Result for a request to resolve the type definition locations of a symbol at
|
||||||
/// a given text document position. The request's parameter is of type
|
/// a given text document position. The request's parameter is of type
|
||||||
/// TextDocumentPositioParams the response is of type Definition or a Thenable
|
/// TextDocumentPositionParams the response is of type Definition or a Thenable
|
||||||
/// that resolves to such.
|
/// that resolves to such.
|
||||||
typedef TextDocumentTypeDefinitionResult
|
typedef TextDocumentTypeDefinitionResult
|
||||||
= Either2<Definition, List<DefinitionLink>>?;
|
= Either2<Definition, List<DefinitionLink>>?;
|
||||||
@@ -21955,7 +21955,7 @@ class PreviousResultId implements ToJsonable {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The URI for which the client knowns a result id.
|
/// The URI for which the client knows a result id.
|
||||||
final DocumentUri uri;
|
final DocumentUri uri;
|
||||||
|
|
||||||
/// The value of the previous result id.
|
/// The value of the previous result id.
|
||||||
|
|||||||
@@ -434,7 +434,7 @@ class AstBinaryWriter extends ThrowingAstVisitor<void> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO(scheglov) Dont write type, AKA separate true `int` and `double`?
|
// TODO(scheglov) Don't write type, AKA separate true `int` and `double`?
|
||||||
_storeExpression(node);
|
_storeExpression(node);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -432,7 +432,7 @@ abstract class PollTrigger {
|
|||||||
///
|
///
|
||||||
/// The idea here is to detect when Bazel finished running and use that to
|
/// The idea here is to detect when Bazel finished running and use that to
|
||||||
/// trigger polling. To detect that we use the `command.log` file that bazel
|
/// trigger polling. To detect that we use the `command.log` file that bazel
|
||||||
/// contiuously updates as the build progresses. We find that file based on [1]:
|
/// continuously updates as the build progresses. We find that file based on [1]:
|
||||||
///
|
///
|
||||||
/// - In the workspace directory there should be a `bazel-out` symlink whose
|
/// - In the workspace directory there should be a `bazel-out` symlink whose
|
||||||
/// target should be of the form:
|
/// target should be of the form:
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ Future<void> asyncTest(f()) {
|
|||||||
return f().then(asyncSuccess);
|
return f().then(asyncSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Verifies that the asyncronous [result] throws a [T].
|
/// Verifies that the asynchronous [result] throws a [T].
|
||||||
///
|
///
|
||||||
/// Fails if [result] completes with a value, or it completes with
|
/// Fails if [result] completes with a value, or it completes with
|
||||||
/// an error which is not a [T].
|
/// an error which is not a [T].
|
||||||
|
|||||||
@@ -2269,7 +2269,7 @@ abstract class DartTypes {
|
|||||||
type is FunctionTypeVariable && canAssignGenericFunctionTo(type.bound);
|
type is FunctionTypeVariable && canAssignGenericFunctionTo(type.bound);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns `true` if [type] occuring in a program with no sound null safety
|
/// Returns `true` if [type] occurring in a program with no sound null safety
|
||||||
/// cannot accept `null` under sound rules.
|
/// cannot accept `null` under sound rules.
|
||||||
bool isNonNullableIfSound(DartType type) {
|
bool isNonNullableIfSound(DartType type) {
|
||||||
if (type is DynamicType ||
|
if (type is DynamicType ||
|
||||||
|
|||||||
@@ -523,7 +523,7 @@ class PowersetBitsDomain {
|
|||||||
// type and is maximal (i.e. instantiated to bounds), the typemask,
|
// type and is maximal (i.e. instantiated to bounds), the typemask,
|
||||||
// which is based on the class element, is still precise. We check
|
// which is based on the class element, is still precise. We check
|
||||||
// against Top for the parameter arguments since we don't have a
|
// against Top for the parameter arguments since we don't have a
|
||||||
// convenient check for instantation to bounds.
|
// convenient check for instantiation to bounds.
|
||||||
//
|
//
|
||||||
// TODO(sra): Check arguments against bounds.
|
// TODO(sra): Check arguments against bounds.
|
||||||
// TODO(sra): Handle other variances.
|
// TODO(sra): Handle other variances.
|
||||||
|
|||||||
@@ -569,7 +569,7 @@ class TypeSystem {
|
|||||||
return _addPhi(node, variable, inputType, isTry);
|
return _addPhi(node, variable, inputType, isTry);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Simplies the phi representing [element] and of the type
|
/// Simplifies the phi representing [element] and of the type
|
||||||
/// [phiType]. For example, if this phi has one incoming input, an
|
/// [phiType]. For example, if this phi has one incoming input, an
|
||||||
/// implementation of this method could just return that incoming
|
/// implementation of this method could just return that incoming
|
||||||
/// input type.
|
/// input type.
|
||||||
|
|||||||
@@ -352,7 +352,7 @@ class CommonMasks implements AbstractValueDomain {
|
|||||||
// type and is maximal (i.e. instantiated to bounds), the typemask,
|
// type and is maximal (i.e. instantiated to bounds), the typemask,
|
||||||
// which is based on the class element, is still precise. We check
|
// which is based on the class element, is still precise. We check
|
||||||
// against Top for the parameter arguments since we don't have a
|
// against Top for the parameter arguments since we don't have a
|
||||||
// convenient check for instantation to bounds.
|
// convenient check for instantiation to bounds.
|
||||||
//
|
//
|
||||||
// TODO(sra): Check arguments against bounds.
|
// TODO(sra): Check arguments against bounds.
|
||||||
// TODO(sra): Handle other variances.
|
// TODO(sra): Handle other variances.
|
||||||
|
|||||||
@@ -841,10 +841,10 @@ enum StepKind {
|
|||||||
|
|
||||||
/// Listener for the [JavaScriptTracer].
|
/// Listener for the [JavaScriptTracer].
|
||||||
abstract class TraceListener {
|
abstract class TraceListener {
|
||||||
/// Called before [root] node is procesed by the [JavaScriptTracer].
|
/// Called before [root] node is processed by the [JavaScriptTracer].
|
||||||
void onStart(js.Node root) {}
|
void onStart(js.Node root) {}
|
||||||
|
|
||||||
/// Called after [root] node has been procesed by the [JavaScriptTracer].
|
/// Called after [root] node has been processed by the [JavaScriptTracer].
|
||||||
void onEnd(js.Node root) {}
|
void onEnd(js.Node root) {}
|
||||||
|
|
||||||
/// Called when a branch of the given [kind] is started. [value] is provided
|
/// Called when a branch of the given [kind] is started. [value] is provided
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ abstract class SourceInformation extends JavaScriptNodeSourceInformation {
|
|||||||
/// Context information about inlined calls.
|
/// Context information about inlined calls.
|
||||||
///
|
///
|
||||||
/// This is associated with SourceInformation objects to be able to emit
|
/// This is associated with SourceInformation objects to be able to emit
|
||||||
/// precise data about inlining that can then be used by defobuscation tools
|
/// precise data about inlining that can then be used by deobfuscation tools
|
||||||
/// when reconstructing a source stack from a production stack trace.
|
/// when reconstructing a source stack from a production stack trace.
|
||||||
class FrameContext {
|
class FrameContext {
|
||||||
static const String tag = 'frame-context';
|
static const String tag = 'frame-context';
|
||||||
|
|||||||
@@ -118,7 +118,7 @@ class ScopeModelBuilder extends ir.Visitor<EvaluationComplexity>
|
|||||||
assert(node is ir.Procedure || node is ir.Constructor);
|
assert(node is ir.Procedure || node is ir.Constructor);
|
||||||
if (!(node is ir.Procedure && node.isRedirectingFactory)) {
|
if (!(node is ir.Procedure && node.isRedirectingFactory)) {
|
||||||
// Skip redirecting factories: they contain invalid expressions only
|
// Skip redirecting factories: they contain invalid expressions only
|
||||||
// used to suppport internal CFE modular compilation.
|
// used to support internal CFE modular compilation.
|
||||||
node.accept(this);
|
node.accept(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ typedef PositionPredicate = bool Function(int position);
|
|||||||
|
|
||||||
/// PlaceholderSafetyAnalysis determines which placeholders in a JavaScript
|
/// PlaceholderSafetyAnalysis determines which placeholders in a JavaScript
|
||||||
/// template may be replaced with an arbitrary expression. Placeholders may be
|
/// template may be replaced with an arbitrary expression. Placeholders may be
|
||||||
/// replaced with an arbitrary expression providied the template ensures the
|
/// replaced with an arbitrary expression provided the template ensures the
|
||||||
/// placeholders are evaluated in the same left-to-right order with no
|
/// placeholders are evaluated in the same left-to-right order with no
|
||||||
/// additional effects interleaved.
|
/// additional effects interleaved.
|
||||||
///
|
///
|
||||||
|
|||||||
@@ -176,7 +176,7 @@ class _Pool {
|
|||||||
/// entities are identified by integers.
|
/// entities are identified by integers.
|
||||||
class _Cohort {
|
class _Cohort {
|
||||||
_Cohort? next; // Next cohort in decreasing frequency.
|
_Cohort? next; // Next cohort in decreasing frequency.
|
||||||
final int count; // This is the cohort of items occuring [count] times.
|
final int count; // This is the cohort of items occurring [count] times.
|
||||||
Set<int> unassigned = Set();
|
Set<int> unassigned = Set();
|
||||||
|
|
||||||
_Cohort(this.count);
|
_Cohort(this.count);
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
/// foo1() => 'A very long string';
|
/// foo1() => 'A very long string';
|
||||||
///
|
///
|
||||||
/// might be compiled to something like the following, where StringReference1 is
|
/// might be compiled to something like the following, where StringReference1 is
|
||||||
/// assocatied with the string `'A very long string'`.
|
/// associated with the string `'A very long string'`.
|
||||||
///
|
///
|
||||||
/// foo1: function() {
|
/// foo1: function() {
|
||||||
/// return StringReference1;
|
/// return StringReference1;
|
||||||
@@ -77,7 +77,7 @@ class StringReferencePolicy {
|
|||||||
// (hot, cold, execute-once, etc).
|
// (hot, cold, execute-once, etc).
|
||||||
static const int shortestSharedLength = 40;
|
static const int shortestSharedLength = 40;
|
||||||
|
|
||||||
// TODO(sra): Add policy for huge non-shared strings, strings occuring in
|
// TODO(sra): Add policy for huge non-shared strings, strings occurring in
|
||||||
// run-once code, etc. Maybe make policy settings assignable for testing or
|
// run-once code, etc. Maybe make policy settings assignable for testing or
|
||||||
// command-line configuration.
|
// command-line configuration.
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -390,7 +390,7 @@ class TypeReferenceFinalizerImpl implements TypeReferenceFinalizer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// TODO(sra): There are other contexts that would be beneficial, e.g. a
|
// TODO(sra): There are other contexts that would be beneficial, e.g. a
|
||||||
// type reference occuring only in a throw expression.
|
// type reference occurring only in a throw expression.
|
||||||
|
|
||||||
String suggestedName = _RecipeToIdentifier().run(referenceSet.recipe);
|
String suggestedName = _RecipeToIdentifier().run(referenceSet.recipe);
|
||||||
if (usedNames.contains(suggestedName)) {
|
if (usedNames.contains(suggestedName)) {
|
||||||
|
|||||||
@@ -559,7 +559,7 @@ class _Substitution extends DartTypeSubstitutionVisitor<Null> {
|
|||||||
int count = _counts[variable] = (_counts[variable] ?? 0) + 1;
|
int count = _counts[variable] = (_counts[variable] ?? 0) + 1;
|
||||||
if (count > 1) {
|
if (count > 1) {
|
||||||
// If the replacement is 'big', duplicating it can grow the term, perhaps
|
// If the replacement is 'big', duplicating it can grow the term, perhaps
|
||||||
// exponentially given a sufficently pathological input.
|
// exponentially given a sufficiently pathological input.
|
||||||
// TODO(sra): Fix exponential terms by encoding a DAG in recipes to avoid
|
// TODO(sra): Fix exponential terms by encoding a DAG in recipes to avoid
|
||||||
// linearization.
|
// linearization.
|
||||||
if (replacement is FunctionType ||
|
if (replacement is FunctionType ||
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ class MetricsVisitor extends RecursiveVisitor {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
void visitClass(Class node) {
|
void visitClass(Class node) {
|
||||||
// Dont want to add duplicate info.
|
// Don't want to add duplicate info.
|
||||||
// When mixed, anonymous mixin class generated so we want to ignore.
|
// When mixed, anonymous mixin class generated so we want to ignore.
|
||||||
if (!node.isAnonymousMixin) {
|
if (!node.isAnonymousMixin) {
|
||||||
currentClass = node.name;
|
currentClass = node.name;
|
||||||
|
|||||||
@@ -114,7 +114,7 @@ class Runtime {
|
|||||||
|
|
||||||
static Runtime _createSingleton() {
|
static Runtime _createSingleton() {
|
||||||
var versionString = Platform.version;
|
var versionString = Platform.version;
|
||||||
// Exepcted format: "version (channel) ..."
|
// Expected format: "version (channel) ..."
|
||||||
var version = versionString;
|
var version = versionString;
|
||||||
String? channel;
|
String? channel;
|
||||||
var versionEnd = versionString.indexOf(' ');
|
var versionEnd = versionString.indexOf(' ');
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ class StrongComponents {
|
|||||||
/// The Component that is being compiled.
|
/// The Component that is being compiled.
|
||||||
///
|
///
|
||||||
/// On incremental compiles, this will only contain the invalidated
|
/// On incremental compiles, this will only contain the invalidated
|
||||||
/// lbraries.
|
/// libraries.
|
||||||
final Component component;
|
final Component component;
|
||||||
|
|
||||||
/// The libraries loaded from a dill file that should not be processed.
|
/// The libraries loaded from a dill file that should not be processed.
|
||||||
|
|||||||
+1
-1
@@ -1370,7 +1370,7 @@ class MyDartClass extends TheirJSClass {
|
|||||||
final int x = 1;
|
final int x = 1;
|
||||||
int y, z;
|
int y, z;
|
||||||
factory MyDartClass(int y, int z) {
|
factory MyDartClass(int y, int z) {
|
||||||
// super constructpr parameters passed here?
|
// super constructor parameters passed here?
|
||||||
var self = createJS<MyDartClass>();
|
var self = createJS<MyDartClass>();
|
||||||
self.y = y;
|
self.y = y;
|
||||||
self.z = z;
|
self.z = z;
|
||||||
|
|||||||
@@ -433,7 +433,7 @@ class WidgetCreatorTracker {
|
|||||||
///
|
///
|
||||||
/// Upon transformation the [changedStructureNotifier] (if provided) is used
|
/// Upon transformation the [changedStructureNotifier] (if provided) is used
|
||||||
/// to notify the listener that that class hierarchy of certain classes has
|
/// to notify the listener that that class hierarchy of certain classes has
|
||||||
/// changed. This is neccesary for instance when doing an incremental
|
/// changed. This is necessary for instance when doing an incremental
|
||||||
/// compilation where the class hierarchy is kept between compiles and thus
|
/// compilation where the class hierarchy is kept between compiles and thus
|
||||||
/// has to be kept up to date.
|
/// has to be kept up to date.
|
||||||
void transform(Component module, List<Library> libraries,
|
void transform(Component module, List<Library> libraries,
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
/// Abstraction for a compilation pipeline.
|
/// Abstraction for a compilation pipeline.
|
||||||
///
|
///
|
||||||
/// A pipeline defines how modular steps are excuted and ensures that a step
|
/// A pipeline defines how modular steps are executed and ensures that a step
|
||||||
/// only has access to the data it declares.
|
/// only has access to the data it declares.
|
||||||
///
|
///
|
||||||
/// The abstract implementation validates how the data is declared, and the
|
/// The abstract implementation validates how the data is declared, and the
|
||||||
@@ -42,7 +42,7 @@ class ModularStep {
|
|||||||
/// Whether this step is only executed on the main module.
|
/// Whether this step is only executed on the main module.
|
||||||
final bool onlyOnMain;
|
final bool onlyOnMain;
|
||||||
|
|
||||||
/// Whether this step is only exceuted on the SDK.
|
/// Whether this step is only executed on the SDK.
|
||||||
final bool onlyOnSdk;
|
final bool onlyOnSdk;
|
||||||
|
|
||||||
/// Whether this step is not executed on the SDK.
|
/// Whether this step is not executed on the SDK.
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ abstract class _ProvisionalApiTestBase extends AbstractContextTest {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Verifies that migraiton of the single file with the given [content]
|
/// Verifies that migration of the single file with the given [content]
|
||||||
/// produces the [expected] output.
|
/// produces the [expected] output.
|
||||||
///
|
///
|
||||||
/// Optional parameter [removeViaComments] indicates whether dead code should
|
/// Optional parameter [removeViaComments] indicates whether dead code should
|
||||||
|
|||||||
@@ -149,7 +149,7 @@ class ProcessQueue {
|
|||||||
|
|
||||||
eventFinishedTestCase(finishedTestCase);
|
eventFinishedTestCase(finishedTestCase);
|
||||||
}, onDone: () {
|
}, onDone: () {
|
||||||
// Wait until the commandQueue/exectutor is done (it may need to stop
|
// Wait until the commandQueue/executor is done (it may need to stop
|
||||||
// batch runners, browser controllers, ....)
|
// batch runners, browser controllers, ....)
|
||||||
commandQueue.done.then((_) {
|
commandQueue.done.then((_) {
|
||||||
cancelDebugTimer();
|
cancelDebugTimer();
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ import 'package:test_runner/src/test_case.dart';
|
|||||||
|
|
||||||
import 'utils.dart';
|
import 'utils.dart';
|
||||||
|
|
||||||
/// This class is reponsible for setting up the files necessary for this test
|
/// This class is responsible for setting up the files necessary for this test
|
||||||
/// as well as touching a file.
|
/// as well as touching a file.
|
||||||
class FileUtils {
|
class FileUtils {
|
||||||
late Directory tempDir;
|
late Directory tempDir;
|
||||||
|
|||||||
@@ -2442,7 +2442,7 @@ class RPCError implements Exception {
|
|||||||
|
|
||||||
String? get details => data == null ? null : data!['details'];
|
String? get details => data == null ? null : data!['details'];
|
||||||
|
|
||||||
/// Return a map representation of this error suitable for converstion to
|
/// Return a map representation of this error suitable for conversion to
|
||||||
/// json.
|
/// json.
|
||||||
Map<String, dynamic> toMap() {
|
Map<String, dynamic> toMap() {
|
||||||
Map<String, dynamic> map = {
|
Map<String, dynamic> map = {
|
||||||
|
|||||||
@@ -292,7 +292,7 @@ class RPCError implements Exception {
|
|||||||
|
|
||||||
String? get details => data == null ? null : data!['details'];
|
String? get details => data == null ? null : data!['details'];
|
||||||
|
|
||||||
/// Return a map representation of this error suitable for converstion to
|
/// Return a map representation of this error suitable for conversion to
|
||||||
/// json.
|
/// json.
|
||||||
Map<String, dynamic> toMap() {
|
Map<String, dynamic> toMap() {
|
||||||
Map<String, dynamic> map = {
|
Map<String, dynamic> map = {
|
||||||
|
|||||||
@@ -1615,7 +1615,7 @@ DART_EXPORT DART_WARN_UNUSED_RESULT Dart_Handle Dart_RunLoop(void);
|
|||||||
* \param error A non-NULL pointer which will hold an error message if the call
|
* \param error A non-NULL pointer which will hold an error message if the call
|
||||||
* fails. The error has to be free()ed by the caller.
|
* fails. The error has to be free()ed by the caller.
|
||||||
*
|
*
|
||||||
* \return If successfull the VM takes owernship of the isolate and takes care
|
* \return If successful the VM takes owernship of the isolate and takes care
|
||||||
* of its message loop. If not successful the caller retains owernship of the
|
* of its message loop. If not successful the caller retains owernship of the
|
||||||
* isolate.
|
* isolate.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -418,7 +418,7 @@ class MergedDominatorDiff {
|
|||||||
for (var i = 0; i < worklist.length; i++) {
|
for (var i = 0; i < worklist.length; i++) {
|
||||||
worklist[i]._computeChildren(worklist);
|
worklist[i]._computeChildren(worklist);
|
||||||
}
|
}
|
||||||
// Compute area botton-up.
|
// Compute area bottom-up.
|
||||||
for (var i = worklist.length - 1; i >= 0; i--) {
|
for (var i = worklist.length - 1; i >= 0; i--) {
|
||||||
worklist[i]._computeArea();
|
worklist[i]._computeArea();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -113,7 +113,7 @@ class ProcessItemDiff {
|
|||||||
for (var i = 0; i < worklist.length; i++) {
|
for (var i = 0; i < worklist.length; i++) {
|
||||||
worklist[i]._computeChildren(worklist);
|
worklist[i]._computeChildren(worklist);
|
||||||
}
|
}
|
||||||
// Compute area botton-up.
|
// Compute area bottom-up.
|
||||||
for (var i = worklist.length - 1; i >= 0; i--) {
|
for (var i = worklist.length - 1; i >= 0; i--) {
|
||||||
worklist[i]._computeArea();
|
worklist[i]._computeArea();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ class Tracer {
|
|||||||
// The start time for the current request.
|
// The start time for the current request.
|
||||||
Stopwatch? _time;
|
Stopwatch? _time;
|
||||||
|
|
||||||
// A list of all tracing events for thre current request.
|
// A list of all tracing events for the current request.
|
||||||
List<TraceEvent> events = <TraceEvent>[];
|
List<TraceEvent> events = <TraceEvent>[];
|
||||||
|
|
||||||
Tracer() {
|
Tracer() {
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ void script() {
|
|||||||
nullInTheMiddle = "There are four\u0000 words.";
|
nullInTheMiddle = "There are four\u0000 words.";
|
||||||
escapedUnicodeEscape = "Should not be A: \\u0041";
|
escapedUnicodeEscape = "Should not be A: \\u0041";
|
||||||
|
|
||||||
// A surrogate pair will cross the preferred truncation boundry.
|
// A surrogate pair will cross the preferred truncation boundary.
|
||||||
longStringEven = "..";
|
longStringEven = "..";
|
||||||
for (int i = 0; i < 512; i++) longStringEven += "𝄞";
|
for (int i = 0; i < 512; i++) longStringEven += "𝄞";
|
||||||
longStringOdd = ".";
|
longStringOdd = ".";
|
||||||
|
|||||||
@@ -457,7 +457,7 @@ class MergedDominatorDiff {
|
|||||||
for (var i = 0; i < worklist.length; i++) {
|
for (var i = 0; i < worklist.length; i++) {
|
||||||
worklist[i]._computeChildren(worklist);
|
worklist[i]._computeChildren(worklist);
|
||||||
}
|
}
|
||||||
// Compute area botton-up.
|
// Compute area bottom-up.
|
||||||
for (var i = worklist.length - 1; i >= 0; i--) {
|
for (var i = worklist.length - 1; i >= 0; i--) {
|
||||||
worklist[i]._computeArea();
|
worklist[i]._computeArea();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ class Tag<T extends CustomElement> {
|
|||||||
/// Tag name.
|
/// Tag name.
|
||||||
final String name;
|
final String name;
|
||||||
|
|
||||||
/// Dependent tags that need to be registred for this tag to work properly.
|
/// Dependent tags that need to be registered for this tag to work properly.
|
||||||
final Iterable<Tag> dependencies;
|
final Iterable<Tag> dependencies;
|
||||||
|
|
||||||
const Tag(this.name, {this.dependencies: const []});
|
const Tag(this.name, {this.dependencies: const []});
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ class Tracer {
|
|||||||
// The start time for the current request.
|
// The start time for the current request.
|
||||||
Stopwatch _time;
|
Stopwatch _time;
|
||||||
|
|
||||||
// A list of all tracing events for thre current request.
|
// A list of all tracing events for the current request.
|
||||||
List<TraceEvent> events = <TraceEvent>[];
|
List<TraceEvent> events = <TraceEvent>[];
|
||||||
|
|
||||||
Tracer() {
|
Tracer() {
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ void script() {
|
|||||||
nullInTheMiddle = "There are four\u0000 words.";
|
nullInTheMiddle = "There are four\u0000 words.";
|
||||||
escapedUnicodeEscape = "Should not be A: \\u0041";
|
escapedUnicodeEscape = "Should not be A: \\u0041";
|
||||||
|
|
||||||
// A surrogate pair will cross the preferred truncation boundry.
|
// A surrogate pair will cross the preferred truncation boundary.
|
||||||
longStringEven = "..";
|
longStringEven = "..";
|
||||||
for (int i = 0; i < 512; i++) longStringEven += "𝄞";
|
for (int i = 0; i < 512; i++) longStringEven += "𝄞";
|
||||||
longStringOdd = ".";
|
longStringOdd = ".";
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ main() async {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Stream<int> foo() async* {
|
Stream<int> foo() async* {
|
||||||
// While the generator (i.e. this funtion) runs, we cancel the consumer and
|
// While the generator (i.e. this function) runs, we cancel the consumer and
|
||||||
// try to yield more.
|
// try to yield more.
|
||||||
sub.cancel();
|
sub.cancel();
|
||||||
yield* Stream.fromIterable([1, 2, 3]);
|
yield* Stream.fromIterable([1, 2, 3]);
|
||||||
|
|||||||
@@ -725,10 +725,10 @@ class SendReceiveTest extends SendReceiveTestBase {
|
|||||||
|
|
||||||
{
|
{
|
||||||
final result = await sendReceive([
|
final result = await sendReceive([
|
||||||
weakRef1, // Does not have its target inluded.
|
weakRef1, // Does not have its target included.
|
||||||
weakRef2, // Has its target included later than itself.
|
weakRef2, // Has its target included later than itself.
|
||||||
object2,
|
object2,
|
||||||
weakRef3, // Does not have its target inluded.
|
weakRef3, // Does not have its target included.
|
||||||
expando3,
|
expando3,
|
||||||
weakRef4, // Has its target included due to expando.
|
weakRef4, // Has its target included due to expando.
|
||||||
expando4,
|
expando4,
|
||||||
@@ -747,11 +747,11 @@ class SendReceiveTest extends SendReceiveTestBase {
|
|||||||
|
|
||||||
{
|
{
|
||||||
final result = await sendReceive([
|
final result = await sendReceive([
|
||||||
weakRef1, // Does not have its target inluded.
|
weakRef1, // Does not have its target included.
|
||||||
weakRef2, // Has its target included later than itself.
|
weakRef2, // Has its target included later than itself.
|
||||||
notAllocatableInTLAB,
|
notAllocatableInTLAB,
|
||||||
object2,
|
object2,
|
||||||
weakRef3, // Does not have its target inluded.
|
weakRef3, // Does not have its target included.
|
||||||
expando3,
|
expando3,
|
||||||
weakRef4, // Has its target included due to expando.
|
weakRef4, // Has its target included due to expando.
|
||||||
expando4,
|
expando4,
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ class B extends A<String> {}
|
|||||||
class C extends B {}
|
class C extends B {}
|
||||||
|
|
||||||
void foo(dynamic a) {
|
void foo(dynamic a) {
|
||||||
// To prevent AssertAssignable strengthening from occuring too early we
|
// To prevent AssertAssignable strengthening from occurring too early we
|
||||||
// need to hide the fact that CheckClass and AssertAssignable are performed
|
// need to hide the fact that CheckClass and AssertAssignable are performed
|
||||||
// against the same SSA value. To achieve that we store a into an array and
|
// against the same SSA value. To achieve that we store a into an array and
|
||||||
// then load it back. Load Forwarding would happen just before LICM and
|
// then load it back. Load Forwarding would happen just before LICM and
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ const int N = 10;
|
|||||||
|
|
||||||
@pragma('vm:never-inline')
|
@pragma('vm:never-inline')
|
||||||
void test(Int32List v) {
|
void test(Int32List v) {
|
||||||
// The shape of the code here is choosen to trigger Int64->Int32
|
// The shape of the code here is chosen to trigger Int64->Int32
|
||||||
// narrowing in the range analysis.
|
// narrowing in the range analysis.
|
||||||
v[0] = (v[0] & 0xFF) << (N - 1);
|
v[0] = (v[0] & 0xFF) << (N - 1);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ main() {
|
|||||||
// `A`, both have type argument vector at a different offset, so it wouldn't
|
// `A`, both have type argument vector at a different offset, so it wouldn't
|
||||||
// know where to load it from)
|
// know where to load it from)
|
||||||
|
|
||||||
// Populate the SubtypeTestCache with successfull `add(I<String>())`.
|
// Populate the SubtypeTestCache with successful `add(I<String>())`.
|
||||||
final x = <dynamic>[<A<String>>[]];
|
final x = <dynamic>[<A<String>>[]];
|
||||||
x.single.add(I<String>());
|
x.single.add(I<String>());
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ main() async {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Stream<int> foo() async* {
|
Stream<int> foo() async* {
|
||||||
// While the generator (i.e. this funtion) runs, we cancel the consumer and
|
// While the generator (i.e. this function) runs, we cancel the consumer and
|
||||||
// try to yield more.
|
// try to yield more.
|
||||||
sub.cancel();
|
sub.cancel();
|
||||||
yield* Stream.fromIterable([1, 2, 3]);
|
yield* Stream.fromIterable([1, 2, 3]);
|
||||||
|
|||||||
@@ -727,10 +727,10 @@ class SendReceiveTest extends SendReceiveTestBase {
|
|||||||
|
|
||||||
{
|
{
|
||||||
final result = await sendReceive([
|
final result = await sendReceive([
|
||||||
weakRef1, // Does not have its target inluded.
|
weakRef1, // Does not have its target included.
|
||||||
weakRef2, // Has its target included later than itself.
|
weakRef2, // Has its target included later than itself.
|
||||||
object2,
|
object2,
|
||||||
weakRef3, // Does not have its target inluded.
|
weakRef3, // Does not have its target included.
|
||||||
expando3,
|
expando3,
|
||||||
weakRef4, // Has its target included due to expando.
|
weakRef4, // Has its target included due to expando.
|
||||||
expando4,
|
expando4,
|
||||||
@@ -749,11 +749,11 @@ class SendReceiveTest extends SendReceiveTestBase {
|
|||||||
|
|
||||||
{
|
{
|
||||||
final result = await sendReceive([
|
final result = await sendReceive([
|
||||||
weakRef1, // Does not have its target inluded.
|
weakRef1, // Does not have its target included.
|
||||||
weakRef2, // Has its target included later than itself.
|
weakRef2, // Has its target included later than itself.
|
||||||
notAllocatableInTLAB,
|
notAllocatableInTLAB,
|
||||||
object2,
|
object2,
|
||||||
weakRef3, // Does not have its target inluded.
|
weakRef3, // Does not have its target included.
|
||||||
expando3,
|
expando3,
|
||||||
weakRef4, // Has its target included due to expando.
|
weakRef4, // Has its target included due to expando.
|
||||||
expando4,
|
expando4,
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ class B extends A<String> {}
|
|||||||
class C extends B {}
|
class C extends B {}
|
||||||
|
|
||||||
void foo(dynamic a) {
|
void foo(dynamic a) {
|
||||||
// To prevent AssertAssignable strengthening from occuring too early we
|
// To prevent AssertAssignable strengthening from occurring too early we
|
||||||
// need to hide the fact that CheckClass and AssertAssignable are performed
|
// need to hide the fact that CheckClass and AssertAssignable are performed
|
||||||
// against the same SSA value. To achieve that we store a into an array and
|
// against the same SSA value. To achieve that we store a into an array and
|
||||||
// then load it back. Load Forwarding would happen just before LICM and
|
// then load it back. Load Forwarding would happen just before LICM and
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ const int N = 10;
|
|||||||
|
|
||||||
@pragma('vm:never-inline')
|
@pragma('vm:never-inline')
|
||||||
void test(Int32List v) {
|
void test(Int32List v) {
|
||||||
// The shape of the code here is choosen to trigger Int64->Int32
|
// The shape of the code here is chosen to trigger Int64->Int32
|
||||||
// narrowing in the range analysis.
|
// narrowing in the range analysis.
|
||||||
v[0] = (v[0] & 0xFF) << (N - 1);
|
v[0] = (v[0] & 0xFF) << (N - 1);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ main() {
|
|||||||
// `A`, both have type argument vector at a different offset, so it wouldn't
|
// `A`, both have type argument vector at a different offset, so it wouldn't
|
||||||
// know where to load it from)
|
// know where to load it from)
|
||||||
|
|
||||||
// Populate the SubtypeTestCache with successfull `add(I<String>())`.
|
// Populate the SubtypeTestCache with successful `add(I<String>())`.
|
||||||
final x = <dynamic>[<A<String>>[]];
|
final x = <dynamic>[<A<String>>[]];
|
||||||
x.single.add(I<String>());
|
x.single.add(I<String>());
|
||||||
|
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ class ConstantPropagator : public FlowGraphVisitor {
|
|||||||
void Analyze();
|
void Analyze();
|
||||||
void Transform();
|
void Transform();
|
||||||
// Tries to replace uses of [defn] with a constant, returns true if
|
// Tries to replace uses of [defn] with a constant, returns true if
|
||||||
// successfull. The [value] is used as a temporary handle.
|
// successful. The [value] is used as a temporary handle.
|
||||||
bool TransformDefinition(Definition* defn);
|
bool TransformDefinition(Definition* defn);
|
||||||
void EliminateRedundantBranches();
|
void EliminateRedundantBranches();
|
||||||
|
|
||||||
|
|||||||
@@ -1014,7 +1014,7 @@ bool GuardFieldTypeInstr::AttributesEqual(const Instruction& other) const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Instruction* AssertSubtypeInstr::Canonicalize(FlowGraph* flow_graph) {
|
Instruction* AssertSubtypeInstr::Canonicalize(FlowGraph* flow_graph) {
|
||||||
// If all inputs needed to check instantation are constant, instantiate the
|
// If all inputs needed to check instantiation are constant, instantiate the
|
||||||
// sub and super type and remove the instruction if the subtype test succeeds.
|
// sub and super type and remove the instruction if the subtype test succeeds.
|
||||||
if (super_type()->BindsToConstant() && sub_type()->BindsToConstant() &&
|
if (super_type()->BindsToConstant() && sub_type()->BindsToConstant() &&
|
||||||
instantiator_type_arguments()->BindsToConstant() &&
|
instantiator_type_arguments()->BindsToConstant() &&
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ class ForwardingBlock {
|
|||||||
// Marks a range of allocation units belonging to an object live by setting
|
// Marks a range of allocation units belonging to an object live by setting
|
||||||
// the corresponding bits in this ForwardingBlock. Does not update the
|
// the corresponding bits in this ForwardingBlock. Does not update the
|
||||||
// new_address_ field; that is done after the total live size of the block is
|
// new_address_ field; that is done after the total live size of the block is
|
||||||
// known and forwarding location is choosen. Does not mark words in subsequent
|
// known and forwarding location is chosen. Does not mark words in subsequent
|
||||||
// ForwardingBlocks live for objects that extend into the next block.
|
// ForwardingBlocks live for objects that extend into the next block.
|
||||||
void RecordLive(uword old_addr, intptr_t size) {
|
void RecordLive(uword old_addr, intptr_t size) {
|
||||||
intptr_t size_in_units = size >> kObjectAlignmentLog2;
|
intptr_t size_in_units = size >> kObjectAlignmentLog2;
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ class MarkingVisitorBase : public ObjectPointerVisitor {
|
|||||||
// by a conservative estimate of the duration of one batch of work.
|
// by a conservative estimate of the duration of one batch of work.
|
||||||
deadline -= 1500;
|
deadline -= 1500;
|
||||||
|
|
||||||
// A 512kB budget is choosen to be large enough that we don't waste too much
|
// A 512kB budget is chosen to be large enough that we don't waste too much
|
||||||
// time on the overhead of exiting ProcessMarkingStack, querying the clock,
|
// time on the overhead of exiting ProcessMarkingStack, querying the clock,
|
||||||
// and re-entering, and small enough that a few batches can fit in the idle
|
// and re-entering, and small enough that a few batches can fit in the idle
|
||||||
// time between animation frames. This amount of marking takes ~1ms on a
|
// time between animation frames. This amount of marking takes ~1ms on a
|
||||||
|
|||||||
+2
-2
@@ -8070,7 +8070,7 @@ class TypeArguments : public Instance {
|
|||||||
kSizeInWords,
|
kSizeInWords,
|
||||||
};
|
};
|
||||||
|
|
||||||
// The array is terminated by the value kNoInstantiator occuring in place of
|
// The array is terminated by the value kNoInstantiator occurring in place of
|
||||||
// the instantiator type args of the 4-tuple that would otherwise follow.
|
// the instantiator type args of the 4-tuple that would otherwise follow.
|
||||||
// Therefore, kNoInstantiator must be distinct from any type arguments vector,
|
// Therefore, kNoInstantiator must be distinct from any type arguments vector,
|
||||||
// even a null one. Since arrays are initialized with 0, the instantiations_
|
// even a null one. Since arrays are initialized with 0, the instantiations_
|
||||||
@@ -8276,7 +8276,7 @@ class AbstractType : public Instance {
|
|||||||
// type arguments, if any.
|
// type arguments, if any.
|
||||||
void PrintName(NameVisibility visibility, BaseTextBuffer* printer) const;
|
void PrintName(NameVisibility visibility, BaseTextBuffer* printer) const;
|
||||||
|
|
||||||
// Add the class name and URI of each occuring type to the uris
|
// Add the class name and URI of each occurring type to the uris
|
||||||
// list and mark ambiguous triplets to be printed.
|
// list and mark ambiguous triplets to be printed.
|
||||||
virtual void EnumerateURIs(URIs* uris) const;
|
virtual void EnumerateURIs(URIs* uris) const;
|
||||||
|
|
||||||
|
|||||||
@@ -198,7 +198,7 @@ class EnumListParameter : public MethodParameter {
|
|||||||
intptr_t element_pos = 0;
|
intptr_t element_pos = 0;
|
||||||
|
|
||||||
// Allocate our element array. +1 for NULL terminator.
|
// Allocate our element array. +1 for NULL terminator.
|
||||||
// The caller is reponsible for deleting this memory.
|
// The caller is responsible for deleting this memory.
|
||||||
char** elements = new char*[element_count + 1];
|
char** elements = new char*[element_count + 1];
|
||||||
elements[element_count] = NULL;
|
elements[element_count] = NULL;
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ class SizingFunction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fixed size reprensents a length as defined by CSS3 Values spec.
|
* Fixed size represents a length as defined by CSS3 Values spec.
|
||||||
* Can also be a percentage of the Grid element's logical width (for columns)
|
* Can also be a percentage of the Grid element's logical width (for columns)
|
||||||
* or logical height (for rows). When the width or height of the Grid element
|
* or logical height (for rows). When the width or height of the Grid element
|
||||||
* is undefined, the percentage is ignored and the Grid Track will be
|
* is undefined, the percentage is ignored and the Grid Track will be
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
// Pass an array of structs to a c funtion.
|
// Pass an array of structs to a c function.
|
||||||
Pointer<NativeFunction<NativeCoordinateOp>> p1 =
|
Pointer<NativeFunction<NativeCoordinateOp>> p1 =
|
||||||
ffiTestFunctions.lookup("CoordinateElemAt1");
|
ffiTestFunctions.lookup("CoordinateElemAt1");
|
||||||
NativeCoordinateOp f1 = p1.asFunction();
|
NativeCoordinateOp f1 = p1.asFunction();
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
// Pass an array of structs to a c funtion.
|
// Pass an array of structs to a c function.
|
||||||
Pointer<NativeFunction<NativeCoordinateOp>> p1 =
|
Pointer<NativeFunction<NativeCoordinateOp>> p1 =
|
||||||
ffiTestFunctions.lookup("CoordinateElemAt1");
|
ffiTestFunctions.lookup("CoordinateElemAt1");
|
||||||
NativeCoordinateOp f1 = p1.asFunction();
|
NativeCoordinateOp f1 = p1.asFunction();
|
||||||
|
|||||||
@@ -647,7 +647,7 @@ class _WebSocketPerMessageDeflate {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// RFC 7692 7.2.3.6. "Generating an Empty Fragment" says that if the
|
// RFC 7692 7.2.3.6. "Generating an Empty Fragment" says that if the
|
||||||
// compression library doesn't generate any data when the bufer is empty,
|
// compression library doesn't generate any data when the buffer is empty,
|
||||||
// then an empty uncompressed deflate block is used for this purpose. The
|
// then an empty uncompressed deflate block is used for this purpose. The
|
||||||
// 0x00 block has the BFINAL header bit set to 0 and the BTYPE header set to
|
// 0x00 block has the BFINAL header bit set to 0 and the BTYPE header set to
|
||||||
// 00 along with 5 bits of padding. This block decodes to zero bytes.
|
// 00 along with 5 bits of padding. This block decodes to zero bytes.
|
||||||
|
|||||||
@@ -140,7 +140,7 @@ class _AsyncRun {
|
|||||||
static final _scheduleImmediateClosure = _initializeScheduleImmediate();
|
static final _scheduleImmediateClosure = _initializeScheduleImmediate();
|
||||||
|
|
||||||
static void Function(void Function()) _initializeScheduleImmediate() {
|
static void Function(void Function()) _initializeScheduleImmediate() {
|
||||||
// d8 support, see preambles/d8.js for the definiton of `scheduleImmediate`.
|
// d8 support, see preambles/d8.js for the definition of `scheduleImmediate`.
|
||||||
//
|
//
|
||||||
// TODO(jmesserly): do we need this? It's only for our d8 stack trace test.
|
// TODO(jmesserly): do we need this? It's only for our d8 stack trace test.
|
||||||
if (JS('', '#.scheduleImmediate', dart.global_) != null) {
|
if (JS('', '#.scheduleImmediate', dart.global_) != null) {
|
||||||
|
|||||||
@@ -273,7 +273,7 @@ packageJSType(String name) {
|
|||||||
/// denote *some* package:js type in our subtyping logic.
|
/// denote *some* package:js type in our subtyping logic.
|
||||||
///
|
///
|
||||||
/// Used only when a concrete PackageJSType is not available i.e. when neither
|
/// Used only when a concrete PackageJSType is not available i.e. when neither
|
||||||
/// the object nor the target type is a PackageJSType. Avoids initializating a
|
/// the object nor the target type is a PackageJSType. Avoids initializing a
|
||||||
/// new PackageJSType every time. Note that we don't add it to the set of JS
|
/// new PackageJSType every time. Note that we don't add it to the set of JS
|
||||||
/// types, since it's not an actual JS class.
|
/// types, since it's not an actual JS class.
|
||||||
final _pkgJSTypeForSubtyping = PackageJSType('');
|
final _pkgJSTypeForSubtyping = PackageJSType('');
|
||||||
|
|||||||
@@ -2224,7 +2224,7 @@ class _Universe {
|
|||||||
/// ToType(Rti): Same Rti
|
/// ToType(Rti): Same Rti
|
||||||
///
|
///
|
||||||
///
|
///
|
||||||
/// Notes on enviroments and indexing.
|
/// Notes on environments and indexing.
|
||||||
///
|
///
|
||||||
/// To avoid creating a binding Rti for a single function type parameter, the
|
/// To avoid creating a binding Rti for a single function type parameter, the
|
||||||
/// type is passed without creating a 1-tuple object. This means that the
|
/// type is passed without creating a 1-tuple object. This means that the
|
||||||
|
|||||||
@@ -481,7 +481,7 @@ class _NativeSocket extends _NativeSocketNativeWrapper with _ServiceObject {
|
|||||||
// Only used for UDP sockets.
|
// Only used for UDP sockets.
|
||||||
bool _availableDatagram = false;
|
bool _availableDatagram = false;
|
||||||
|
|
||||||
// The number of incoming connnections for Listening socket.
|
// The number of incoming connections for Listening socket.
|
||||||
int connections = 0;
|
int connections = 0;
|
||||||
|
|
||||||
// The count of received event from eventhandler.
|
// The count of received event from eventhandler.
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ class RegExp {
|
|||||||
static int _findEscapeChar(String text, int start) {
|
static int _findEscapeChar(String text, int start) {
|
||||||
// Table where each character in the range U+0000 to U+007f is represented
|
// Table where each character in the range U+0000 to U+007f is represented
|
||||||
// by whether it needs to be escaped in a regexp.
|
// by whether it needs to be escaped in a regexp.
|
||||||
// The \x00 characters means escacped, and \x01 means non-escaped.
|
// The \x00 characters means escaped, and \x01 means non-escaped.
|
||||||
const escapes =
|
const escapes =
|
||||||
"\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01"
|
"\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01"
|
||||||
"\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01"
|
"\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01"
|
||||||
|
|||||||
@@ -918,7 +918,7 @@ abstract class _StringBase implements String {
|
|||||||
int startIndex = 0;
|
int startIndex = 0;
|
||||||
int previousIndex = 0;
|
int previousIndex = 0;
|
||||||
// 'pattern' may not be implemented correctly and therefore we cannot
|
// 'pattern' may not be implemented correctly and therefore we cannot
|
||||||
// call _substringUnhchecked unless it is a trustworthy type (e.g. String).
|
// call _substringUnchecked unless it is a trustworthy type (e.g. String).
|
||||||
while (true) {
|
while (true) {
|
||||||
if (startIndex == length || !iterator.moveNext()) {
|
if (startIndex == length || !iterator.moveNext()) {
|
||||||
result.add(this.substring(previousIndex, length));
|
result.add(this.substring(previousIndex, length));
|
||||||
|
|||||||
@@ -849,7 +849,7 @@ abstract class _StringBase implements String {
|
|||||||
int startIndex = 0;
|
int startIndex = 0;
|
||||||
int previousIndex = 0;
|
int previousIndex = 0;
|
||||||
// 'pattern' may not be implemented correctly and therefore we cannot
|
// 'pattern' may not be implemented correctly and therefore we cannot
|
||||||
// call _substringUnhchecked unless it is a trustworthy type (e.g. String).
|
// call _substringUnchecked unless it is a trustworthy type (e.g. String).
|
||||||
while (true) {
|
while (true) {
|
||||||
if (startIndex == length || !iterator.moveNext()) {
|
if (startIndex == length || !iterator.moveNext()) {
|
||||||
result.add(this.substring(previousIndex, length));
|
result.add(this.substring(previousIndex, length));
|
||||||
|
|||||||
@@ -701,8 +701,8 @@ abstract class _StreamController<T> implements _StreamControllerBase<T> {
|
|||||||
// If either of addStream's cancel or `onCancel` returns a future,
|
// If either of addStream's cancel or `onCancel` returns a future,
|
||||||
// we wait for it before continuing.
|
// we wait for it before continuing.
|
||||||
// Any error during this process ends up in the returned future.
|
// Any error during this process ends up in the returned future.
|
||||||
// If more errors happen, we act as if it happens inside nested try/finallys
|
// If more errors happen, we act as if it happens inside nested try/finally
|
||||||
// or whenComplete calls, and only the last error ends up in the
|
// blocks or whenComplete calls, and only the last error ends up in the
|
||||||
// returned future.
|
// returned future.
|
||||||
Future<void>? result;
|
Future<void>? result;
|
||||||
if (_isAddingStream) {
|
if (_isAddingStream) {
|
||||||
|
|||||||
@@ -904,7 +904,7 @@ abstract class ResourceHandle {
|
|||||||
/// [RawSocket.readMessage].
|
/// [RawSocket.readMessage].
|
||||||
///
|
///
|
||||||
/// Control messages could carry different information including
|
/// Control messages could carry different information including
|
||||||
/// [ResourceHandle]. If [ResourceHandle]s are availabe as part of this message,
|
/// [ResourceHandle]. If [ResourceHandle]s are available as part of this message,
|
||||||
/// they can be extracted via [extractHandles].
|
/// they can be extracted via [extractHandles].
|
||||||
abstract class SocketControlMessage {
|
abstract class SocketControlMessage {
|
||||||
/// Creates a control message containing the provided [handles].
|
/// Creates a control message containing the provided [handles].
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ void testShuffle(list) {
|
|||||||
// of a proper shuffling hitting the same list again is less than 10^80
|
// of a proper shuffling hitting the same list again is less than 10^80
|
||||||
// (arbitrary bignum - approx. number of atoms in the universe).
|
// (arbitrary bignum - approx. number of atoms in the universe).
|
||||||
//
|
//
|
||||||
// The probablility of shuffling a list of length n into the same list is
|
// The probability of shuffling a list of length n into the same list is
|
||||||
// 1/n!. If one shuffle didn't change the list, repeat shuffling until
|
// 1/n!. If one shuffle didn't change the list, repeat shuffling until
|
||||||
// probability of randomly hitting the same list every time is less than
|
// probability of randomly hitting the same list every time is less than
|
||||||
// 1/1e80.
|
// 1/1e80.
|
||||||
|
|||||||
@@ -169,7 +169,7 @@ void testValidIpv6Uri() {
|
|||||||
Expect.equals('https://[fe80::8eae:4c4d:fee9:8434%25rename3]/index.html',
|
Expect.equals('https://[fe80::8eae:4c4d:fee9:8434%25rename3]/index.html',
|
||||||
uri.toString());
|
uri.toString());
|
||||||
|
|
||||||
// Test construtors with host name
|
// Test constructors with host name
|
||||||
uri = Uri(scheme: 'https', host: '[ff02::5678%pvc1.3]');
|
uri = Uri(scheme: 'https', host: '[ff02::5678%pvc1.3]');
|
||||||
uri = Uri(scheme: 'https', host: '[fe80::a%1]');
|
uri = Uri(scheme: 'https', host: '[fe80::a%1]');
|
||||||
uri = Uri(scheme: 'https', host: '[fe80::a%25eE1]');
|
uri = Uri(scheme: 'https', host: '[fe80::a%25eE1]');
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ void testShuffle(list) {
|
|||||||
// of a proper shuffling hitting the same list again is less than 10^80
|
// of a proper shuffling hitting the same list again is less than 10^80
|
||||||
// (arbitrary bignum - approx. number of atoms in the universe).
|
// (arbitrary bignum - approx. number of atoms in the universe).
|
||||||
//
|
//
|
||||||
// The probablility of shuffling a list of length n into the same list is
|
// The probability of shuffling a list of length n into the same list is
|
||||||
// 1/n!. If one shuffle didn't change the list, repeat shuffling until
|
// 1/n!. If one shuffle didn't change the list, repeat shuffling until
|
||||||
// probability of randomly hitting the same list every time is less than
|
// probability of randomly hitting the same list every time is less than
|
||||||
// 1/1e80.
|
// 1/1e80.
|
||||||
|
|||||||
@@ -171,7 +171,7 @@ void testValidIpv6Uri() {
|
|||||||
Expect.equals('https://[fe80::8eae:4c4d:fee9:8434%25rename3]/index.html',
|
Expect.equals('https://[fe80::8eae:4c4d:fee9:8434%25rename3]/index.html',
|
||||||
uri.toString());
|
uri.toString());
|
||||||
|
|
||||||
// Test construtors with host name
|
// Test constructors with host name
|
||||||
uri = Uri(scheme: 'https', host: '[ff02::5678%pvc1.3]');
|
uri = Uri(scheme: 'https', host: '[ff02::5678%pvc1.3]');
|
||||||
uri = Uri(scheme: 'https', host: '[fe80::a%1]');
|
uri = Uri(scheme: 'https', host: '[fe80::a%1]');
|
||||||
uri = Uri(scheme: 'https', host: '[fe80::a%25eE1]');
|
uri = Uri(scheme: 'https', host: '[fe80::a%25eE1]');
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ void testFunctionWithStruct({bool isLeaf: false}) {
|
|||||||
calloc.free(c2);
|
calloc.free(c2);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// pass an array of structs to a c funtion
|
/// pass an array of structs to a c function
|
||||||
void testFunctionWithStructArray({bool isLeaf: false}) {
|
void testFunctionWithStructArray({bool isLeaf: false}) {
|
||||||
Pointer<NativeFunction<NativeCoordinateOp>> p1 =
|
Pointer<NativeFunction<NativeCoordinateOp>> p1 =
|
||||||
ffiTestFunctions.lookup("CoordinateElemAt1");
|
ffiTestFunctions.lookup("CoordinateElemAt1");
|
||||||
|
|||||||
@@ -719,7 +719,7 @@ final struct16bytesMixed2 =
|
|||||||
|
|
||||||
final struct17bytesInt = StructType([int64, int64, int8]);
|
final struct17bytesInt = StructType([int64, int64, int8]);
|
||||||
|
|
||||||
/// This struct has only 1 byte field-alignmnent requirements.
|
/// This struct has only 1 byte field-alignment requirements.
|
||||||
final struct19bytesInt = StructType(List.filled(19, uint8));
|
final struct19bytesInt = StructType(List.filled(19, uint8));
|
||||||
|
|
||||||
/// The first homogenous integer struct that does not go into registers
|
/// The first homogenous integer struct that does not go into registers
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ extension on List<Member> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
extension on CType {
|
extension on CType {
|
||||||
/// A list of statements adding all members recurisvely to `result`.
|
/// A list of statements adding all members recursively to `result`.
|
||||||
///
|
///
|
||||||
/// Both valid in Dart and C.
|
/// Both valid in Dart and C.
|
||||||
String addToResultStatements(String variableName) {
|
String addToResultStatements(String variableName) {
|
||||||
@@ -130,7 +130,7 @@ extension on CType {
|
|||||||
}
|
}
|
||||||
|
|
||||||
extension on List<Member> {
|
extension on List<Member> {
|
||||||
/// A list of statements adding all members recurisvely to `result`.
|
/// A list of statements adding all members recursively to `result`.
|
||||||
///
|
///
|
||||||
/// Both valid in Dart and C.
|
/// Both valid in Dart and C.
|
||||||
String addToResultStatements([String namePrefix = ""]) {
|
String addToResultStatements([String namePrefix = ""]) {
|
||||||
|
|||||||
@@ -29,14 +29,14 @@ final regress40537 = ffiTestFunctions
|
|||||||
|
|
||||||
variant1Negative() {
|
variant1Negative() {
|
||||||
// 0xF9 = -7 in 2s complement.
|
// 0xF9 = -7 in 2s complement.
|
||||||
// 0xF9 = 249 in unsinged.
|
// 0xF9 = 249 in unsigned.
|
||||||
final result = regress40537(-7);
|
final result = regress40537(-7);
|
||||||
print(result);
|
print(result);
|
||||||
Expect.equals(1, result);
|
Expect.equals(1, result);
|
||||||
}
|
}
|
||||||
|
|
||||||
variant1Positive() {
|
variant1Positive() {
|
||||||
// 0xF9 = 249 in unsinged.
|
// 0xF9 = 249 in unsigned.
|
||||||
final result = regress40537(0xFFFFFFF9);
|
final result = regress40537(0xFFFFFFF9);
|
||||||
print(result);
|
print(result);
|
||||||
Expect.equals(1, result);
|
Expect.equals(1, result);
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ void testFunctionWithStruct({bool isLeaf: false}) {
|
|||||||
calloc.free(c2);
|
calloc.free(c2);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// pass an array of structs to a c funtion
|
/// pass an array of structs to a c function
|
||||||
void testFunctionWithStructArray({bool isLeaf: false}) {
|
void testFunctionWithStructArray({bool isLeaf: false}) {
|
||||||
Pointer<NativeFunction<NativeCoordinateOp>> p1 =
|
Pointer<NativeFunction<NativeCoordinateOp>> p1 =
|
||||||
ffiTestFunctions.lookup("CoordinateElemAt1");
|
ffiTestFunctions.lookup("CoordinateElemAt1");
|
||||||
|
|||||||
@@ -31,14 +31,14 @@ final regress40537 = ffiTestFunctions
|
|||||||
|
|
||||||
variant1Negative() {
|
variant1Negative() {
|
||||||
// 0xF9 = -7 in 2s complement.
|
// 0xF9 = -7 in 2s complement.
|
||||||
// 0xF9 = 249 in unsinged.
|
// 0xF9 = 249 in unsigned.
|
||||||
final result = regress40537(-7);
|
final result = regress40537(-7);
|
||||||
print(result);
|
print(result);
|
||||||
Expect.equals(1, result);
|
Expect.equals(1, result);
|
||||||
}
|
}
|
||||||
|
|
||||||
variant1Positive() {
|
variant1Positive() {
|
||||||
// 0xF9 = 249 in unsinged.
|
// 0xF9 = 249 in unsigned.
|
||||||
final result = regress40537(0xFFFFFFF9);
|
final result = regress40537(0xFFFFFFF9);
|
||||||
print(result);
|
print(result);
|
||||||
Expect.equals(1, result);
|
Expect.equals(1, result);
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ Stream<int> consume(List<String> log,
|
|||||||
if (event == yieldAt) {
|
if (event == yieldAt) {
|
||||||
log.add("y$event[");
|
log.add("y$event[");
|
||||||
// Yield may cause subscription to pause or cancel.
|
// Yield may cause subscription to pause or cancel.
|
||||||
// This loop should stay at the yield until the event has been delieverd.
|
// This loop should stay at the yield until the event has been delivered.
|
||||||
// If the receiver pauses or cancels, we delay or break the loop here.
|
// If the receiver pauses or cancels, we delay or break the loop here.
|
||||||
yield event;
|
yield event;
|
||||||
log.add("]");
|
log.add("]");
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ main() {
|
|||||||
Expect.isTrue(identical("abcd", 'ab' 'cd'));
|
Expect.isTrue(identical("abcd", 'ab' 'cd'));
|
||||||
Expect.isTrue(identical("abcd", 'ab' "cd"));
|
Expect.isTrue(identical("abcd", 'ab' "cd"));
|
||||||
|
|
||||||
// Or when there are more than 2 contatenations.
|
// Or when there are more than 2 concatenations.
|
||||||
Expect.isTrue(identical("abcd", "a" "b" "cd"));
|
Expect.isTrue(identical("abcd", "a" "b" "cd"));
|
||||||
Expect.isTrue(identical("abcd", "a" "b" "c" "d"));
|
Expect.isTrue(identical("abcd", "a" "b" "c" "d"));
|
||||||
Expect.isTrue(identical('abcd', 'a' 'b' 'c' 'd'));
|
Expect.isTrue(identical('abcd', 'a' 'b' 'c' 'd'));
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
// BSD-style license that can be found in the LICENSE file.
|
// BSD-style license that can be found in the LICENSE file.
|
||||||
|
|
||||||
// Tests that a dynamic type does not affect whether an expression is
|
// Tests that a dynamic type does not affect whether an expression is
|
||||||
// potentially constant, the actual type of the value of an experssion
|
// potentially constant, the actual type of the value of an expression
|
||||||
// only matters if the expression is evaluated as a constant.
|
// only matters if the expression is evaluated as a constant.
|
||||||
|
|
||||||
main() {
|
main() {
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ class C {
|
|||||||
const C(this.v);
|
const C(this.v);
|
||||||
|
|
||||||
// Redirecting generative constructor invocation parameters,
|
// Redirecting generative constructor invocation parameters,
|
||||||
// must be potenentially constant.
|
// must be potentially constant.
|
||||||
const C.r1() : this(const C(null));
|
const C.r1() : this(const C(null));
|
||||||
|
|
||||||
// Only evaluates the true branch when passed `true` as argument.
|
// Only evaluates the true branch when passed `true` as argument.
|
||||||
|
|||||||
@@ -194,7 +194,7 @@ void main() {
|
|||||||
// Using a type variable, not a constant type expression.
|
// Using a type variable, not a constant type expression.
|
||||||
// Canonicalization is unspecified, but equality holds.
|
// Canonicalization is unspecified, but equality holds.
|
||||||
(<T>() {
|
(<T>() {
|
||||||
// Tear off with explicit instantation to the same non-constant type.
|
// Tear off with explicit instantiation to the same non-constant type.
|
||||||
Expect.equals(GGen<T>.new, GGen<T>.new);
|
Expect.equals(GGen<T>.new, GGen<T>.new);
|
||||||
Expect.equals(GGen<T>.named, GGen<T>.named);
|
Expect.equals(GGen<T>.named, GGen<T>.named);
|
||||||
Expect.equals(GGenRedir<T>.new, GGenRedir<T>.new);
|
Expect.equals(GGenRedir<T>.new, GGenRedir<T>.new);
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ void test2() {
|
|||||||
// original library.
|
// original library.
|
||||||
Expect.equals(privateLibrarySentinel, callPrivateSuperMixinMethod(p));
|
Expect.equals(privateLibrarySentinel, callPrivateSuperMixinMethod(p));
|
||||||
Expect.equals(privateLibrarySentinel, callPrivateInstanceMethod(p));
|
Expect.equals(privateLibrarySentinel, callPrivateInstanceMethod(p));
|
||||||
// The new private mixin and instance methods are acessible in this library.
|
// The new private mixin and instance methods are accessible in this library.
|
||||||
Expect.equals(publicLibrarySentinel, p._privateMixinMethod());
|
Expect.equals(publicLibrarySentinel, p._privateMixinMethod());
|
||||||
Expect.equals(publicLibrarySentinel, p._privateInstanceMethod());
|
Expect.equals(publicLibrarySentinel, p._privateInstanceMethod());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ Stream<int> consume(List<String> log,
|
|||||||
if (event == yieldAt) {
|
if (event == yieldAt) {
|
||||||
log.add("y$event[");
|
log.add("y$event[");
|
||||||
// Yield may cause subscription to pause or cancel.
|
// Yield may cause subscription to pause or cancel.
|
||||||
// This loop should stay at the yield until the event has been delieverd.
|
// This loop should stay at the yield until the event has been delivered.
|
||||||
// If the receiver pauses or cancels, we delay or break the loop here.
|
// If the receiver pauses or cancels, we delay or break the loop here.
|
||||||
yield event;
|
yield event;
|
||||||
log.add("]");
|
log.add("]");
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ main() {
|
|||||||
Expect.isTrue(identical("abcd", 'ab' 'cd'));
|
Expect.isTrue(identical("abcd", 'ab' 'cd'));
|
||||||
Expect.isTrue(identical("abcd", 'ab' "cd"));
|
Expect.isTrue(identical("abcd", 'ab' "cd"));
|
||||||
|
|
||||||
// Or when there are more than 2 contatenations.
|
// Or when there are more than 2 concatenations.
|
||||||
Expect.isTrue(identical("abcd", "a" "b" "cd"));
|
Expect.isTrue(identical("abcd", "a" "b" "cd"));
|
||||||
Expect.isTrue(identical("abcd", "a" "b" "c" "d"));
|
Expect.isTrue(identical("abcd", "a" "b" "c" "d"));
|
||||||
Expect.isTrue(identical('abcd', 'a' 'b' 'c' 'd'));
|
Expect.isTrue(identical('abcd', 'a' 'b' 'c' 'd'));
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
// @dart = 2.9
|
// @dart = 2.9
|
||||||
|
|
||||||
// Tests that a dynamic type does not affect whether an expression is
|
// Tests that a dynamic type does not affect whether an expression is
|
||||||
// potentially constant, the actual type of the value of an experssion
|
// potentially constant, the actual type of the value of an expression
|
||||||
// only matters if the expression is evaluated as a constant.
|
// only matters if the expression is evaluated as a constant.
|
||||||
|
|
||||||
main() {
|
main() {
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ class C {
|
|||||||
const C(this.v);
|
const C(this.v);
|
||||||
|
|
||||||
// Redirecting generative constructor invocation parameters,
|
// Redirecting generative constructor invocation parameters,
|
||||||
// must be potenentially constant.
|
// must be potentially constant.
|
||||||
const C.r1() : this(const C(null));
|
const C.r1() : this(const C(null));
|
||||||
|
|
||||||
// Only evaluates the true branch when passed `true` as argument.
|
// Only evaluates the true branch when passed `true` as argument.
|
||||||
|
|||||||
@@ -138,7 +138,7 @@ main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Class of objects that consider themselves equal to their originals.
|
// Class of objects that consider themselves equal to their originals.
|
||||||
// Sees through mimickry.
|
// Sees through mimicry.
|
||||||
class Mimic {
|
class Mimic {
|
||||||
final Object original;
|
final Object original;
|
||||||
Mimic(this.original);
|
Mimic(this.original);
|
||||||
|
|||||||
@@ -59,10 +59,10 @@ Future<void> runHelper(SendPort port) async {
|
|||||||
expando4[key4] = object4;
|
expando4[key4] = object4;
|
||||||
|
|
||||||
final message = <dynamic>[
|
final message = <dynamic>[
|
||||||
weakRef1, // Does not have its target inluded.
|
weakRef1, // Does not have its target included.
|
||||||
weakRef2, // Has its target included later than itself.
|
weakRef2, // Has its target included later than itself.
|
||||||
object2,
|
object2,
|
||||||
weakRef3, // Does not have its target inluded.
|
weakRef3, // Does not have its target included.
|
||||||
expando3,
|
expando3,
|
||||||
weakRef4, // Has its target included due to expando.
|
weakRef4, // Has its target included due to expando.
|
||||||
expando4,
|
expando4,
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ testArrayConstructor() {
|
|||||||
var list = <int>[1, 2, 3];
|
var list = <int>[1, 2, 3];
|
||||||
testArray = list;
|
testArray = list;
|
||||||
|
|
||||||
// Call the consturctor with `new`.
|
// Call the constructor with `new`.
|
||||||
var array = js.callConstructor(js.getProperty(testArray, 'constructor'), []);
|
var array = js.callConstructor(js.getProperty(testArray, 'constructor'), []);
|
||||||
var list2 = array as List;
|
var list2 = array as List;
|
||||||
Expect.listEquals(list2, []);
|
Expect.listEquals(list2, []);
|
||||||
|
|||||||
@@ -315,7 +315,7 @@ main() {
|
|||||||
expect(index, equals(1));
|
expect(index, equals(1));
|
||||||
expect(js_util.getProperty(f.list, index), equals(4));
|
expect(js_util.getProperty(f.list, index), equals(4));
|
||||||
|
|
||||||
// Accessing nested object properites.
|
// Accessing nested object properties.
|
||||||
var objectProperty = js_util.getProperty(f, 'objectProperty');
|
var objectProperty = js_util.getProperty(f, 'objectProperty');
|
||||||
expect(js_util.getProperty(objectProperty, 'c'), equals(1));
|
expect(js_util.getProperty(objectProperty, 'c'), equals(1));
|
||||||
expect(js_util.getProperty(objectProperty, 'list') is List, isTrue);
|
expect(js_util.getProperty(objectProperty, 'list') is List, isTrue);
|
||||||
|
|||||||
@@ -140,7 +140,7 @@ main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Class of objects that consider themselves equal to their originals.
|
// Class of objects that consider themselves equal to their originals.
|
||||||
// Sees through mimickry.
|
// Sees through mimicry.
|
||||||
class Mimic {
|
class Mimic {
|
||||||
final Object original;
|
final Object original;
|
||||||
Mimic(this.original);
|
Mimic(this.original);
|
||||||
|
|||||||
@@ -61,10 +61,10 @@ Future<void> runHelper(SendPort port) async {
|
|||||||
expando4[key4] = object4;
|
expando4[key4] = object4;
|
||||||
|
|
||||||
final message = <dynamic>[
|
final message = <dynamic>[
|
||||||
weakRef1, // Does not have its target inluded.
|
weakRef1, // Does not have its target included.
|
||||||
weakRef2, // Has its target included later than itself.
|
weakRef2, // Has its target included later than itself.
|
||||||
object2,
|
object2,
|
||||||
weakRef3, // Does not have its target inluded.
|
weakRef3, // Does not have its target included.
|
||||||
expando3,
|
expando3,
|
||||||
weakRef4, // Has its target included due to expando.
|
weakRef4, // Has its target included due to expando.
|
||||||
expando4,
|
expando4,
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ testArrayConstructor() {
|
|||||||
var list = <int>[1, 2, 3];
|
var list = <int>[1, 2, 3];
|
||||||
testArray = list;
|
testArray = list;
|
||||||
|
|
||||||
// Call the consturctor with `new`.
|
// Call the constructor with `new`.
|
||||||
var array = js.callConstructor(js.getProperty(testArray, 'constructor'), []);
|
var array = js.callConstructor(js.getProperty(testArray, 'constructor'), []);
|
||||||
var list2 = array as List;
|
var list2 = array as List;
|
||||||
Expect.listEquals(list2, []);
|
Expect.listEquals(list2, []);
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user