Fix typos

Fixes #49241

TEST=ci

Change-Id: I6117bf816fc8c4613cce66927f952fef75632725
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/248120
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
This commit is contained in:
Ahmed Ashour 2022-06-15 11:08:28 +00:00 committed by Commit Bot
parent de23c67fb0
commit 85700570f6
137 changed files with 236 additions and 236 deletions

View file

@ -2067,11 +2067,11 @@ This is a patch release that fixes the following issues:
### Dart2JS
- Adds support for deferred loading of types seperately from classes. This
- Adds support for deferred loading of types separately from classes. This
enables dart2js to make better optimization choices when deferred loading.
This work is necessary to address unsoundness in the deferred loading
algorithm. Currently, fixing this unsoundness would result in code bloat, but
loading types seperately from classes will allow us to fix the unsoundness
loading types separately from classes will allow us to fix the unsoundness
with only a minimal regression. To explicitly disable deferred loading of
types, pass `--no-defer-class-types`. See the original post on the
[unsoundness in the deferred loading algorithm][].

View file

@ -7081,7 +7081,7 @@ class Parser {
Token afterIdentifier = next.next!;
//
// found <typeref> `?` <identifier>
// with no annotations or modifiers preceeding it
// with no annotations or modifiers preceding it
//
if (optional('=', afterIdentifier)) {
//

View file

@ -782,7 +782,7 @@ abstract class Token implements SyntacticEntity {
/**
* Initialize a newly created token to have the given [type] and [offset].
*/
factory Token(TokenType type, int offset, [CommentToken? preceedingComment]) =
factory Token(TokenType type, int offset, [CommentToken? precedingComment]) =
SimpleToken;
/**

View file

@ -175,7 +175,7 @@ class LspAnalysisServerBenchmarkTest extends AbstractBenchmarkTest
_test.projectFolderPath = roots.single;
_test.projectFolderUri = Uri.file(_test.projectFolderPath);
// Use some reasonable default client capabilities that will activate
// features that will excercise more code that benchmarks should measure
// features that will exercise more code that benchmarks should measure
// (such as applyEdit to allow suggestion sets results to be merged in).
await _test.initialize(
textDocumentCapabilities: withCompletionItemSnippetSupport(

View file

@ -202,7 +202,7 @@ class Request {
/// 'id': String,
/// 'method': methodName,
/// 'params': {
/// paramter_name: value
/// parameter_name: value
/// }
/// }
///
@ -238,7 +238,7 @@ class Request {
/// 'id': String,
/// 'method': methodName,
/// 'params': {
/// paramter_name: value
/// parameter_name: value
/// }
/// }
///
@ -268,7 +268,7 @@ class RequestFailure implements Exception {
/// The response to be returned as a result of the failure.
final Response response;
/// Initialize a newly created exception to return the given reponse.
/// Initialize a newly created exception to return the given response.
RequestFailure(this.response);
}

View file

@ -145,7 +145,7 @@ class DartUnitFoldingComputer {
}
isFirstToken = false;
// Only exit the loop when hitting EOF *after* processing the token as
// the EOF token may have preceeding comments.
// the EOF token may have preceding comments.
if (token.type == TokenType.EOF) {
break;
}

View file

@ -86,7 +86,7 @@ class DartUnitHighlightsComputer {
}
if (token.type == TokenType.EOF) {
// Only exit the loop *after* processing the EOF token as it may
// have preceeding comments.
// have preceding comments.
break;
}
token = token.next;
@ -517,7 +517,7 @@ class DartUnitHighlightsComputer {
_regions.add(HighlightRegion(type, offset, length));
}
if (_computeSemanticTokens) {
// Use default mappings if an overriden type/modifiers were not supplied.
// Use default mappings if an overridden type/modifiers were not supplied.
semanticTokenType ??= highlightRegionTokenTypes[type];
semanticTokenModifiers ??= highlightRegionTokenModifiers[type];
if (semanticTokenType != null) {

View file

@ -16,7 +16,7 @@ import 'package:analysis_server/lsp_protocol/protocol.dart';
/// myLongFunctionName();
/// print(myLong^)
///
/// The `.` is not included because it falsely triggers whenver typing a
/// The `.` is not included because it falsely triggers whenever typing a
/// cascade (`..`), inserting the very first completion instead of just a second
/// period.
const dartCompletionCommitCharacters = ['('];

View file

@ -6,9 +6,9 @@ import 'package:analysis_server/lsp_protocol/protocol.dart';
import 'package:analysis_server/src/lsp/handlers/handler_states.dart';
import 'package:analysis_server/src/lsp/handlers/handlers.dart';
class IntializedMessageHandler extends MessageHandler<InitializedParams, void> {
class InitializedMessageHandler extends MessageHandler<InitializedParams, void> {
final List<String> openWorkspacePaths;
IntializedMessageHandler(
InitializedMessageHandler(
super.server,
this.openWorkspacePaths,
);

View file

@ -37,7 +37,7 @@ class ReferencesHandler
final unit = await path.mapResult(requireResolvedUnit);
final offset = await unit.mapResult((unit) => toOffset(unit.lineInfo, pos));
return offset.mapResult(
(offset) => _getRefererences(path.result, offset, params, unit.result));
(offset) => _getReferences(path.result, offset, params, unit.result));
}
List<Location> _getDeclarations(CompilationUnit unit, int offset) {
@ -53,7 +53,7 @@ class ReferencesHandler
}).whereNotNull().toList();
}
Future<ErrorOr<List<Location>?>> _getRefererences(String path, int offset,
Future<ErrorOr<List<Location>?>> _getReferences(String path, int offset,
ReferenceParams params, ResolvedUnitResult unit) async {
var element = await server.getElementAtOffset(path, offset);
if (element is ImportElement) {

View file

@ -5,7 +5,7 @@
import 'package:analysis_server/lsp_protocol/protocol.dart';
import 'package:analysis_server/src/lsp/handlers/handlers.dart';
/// A [MessageHandler] that rejects specific tpyes of messages with a given
/// A [MessageHandler] that rejects specific types of messages with a given
/// error code/message.
class RejectMessageHandler extends MessageHandler<Object?, void> {
@override

View file

@ -114,7 +114,7 @@ class RenameHandler extends MessageHandler<RenameParams, WorkspaceEdit?> {
final path = pathOfDoc(params.textDocument);
// If the client provided us a version doc identifier, we'll use it to ensure
// we're not computing a rename for an old document. If not, we'll just assume
// the version the server had at the time of recieving the request is valid
// the version the server had at the time of receiving the request is valid
// and then use it to verify the document hadn't changed again before we
// send the edits.
final docIdentifier = await path.mapResult((path) => success(

View file

@ -42,7 +42,7 @@ import 'package:analysis_server/src/lsp/handlers/handler_workspace_symbols.dart'
import 'package:analysis_server/src/lsp/handlers/handlers.dart';
import 'package:analysis_server/src/lsp/lsp_analysis_server.dart';
/// The server moves to this state when a critical unrecoverrable error (for
/// The server moves to this state when a critical unrecoverable error (for
/// example, inconsistent document state between server/client) occurs and will
/// reject all messages.
class FailureStateMessageHandler extends ServerStateMessageHandler {
@ -118,7 +118,7 @@ class InitializingStateMessageHandler extends ServerStateMessageHandler {
'Server already initialized');
registerHandler(ShutdownMessageHandler(server));
registerHandler(ExitMessageHandler(server));
registerHandler(IntializedMessageHandler(
registerHandler(InitializedMessageHandler(
server,
openWorkspacePaths,
));

View file

@ -106,7 +106,7 @@ class SemanticTokenEncoder {
}
}
/// Splits overlapping/nested tokens into descrete ranges for the "top-most"
/// Splits overlapping/nested tokens into discrete ranges for the "top-most"
/// token.
///
/// Tokens must be pre-sorted by offset, with tokens having the same offset

View file

@ -23,7 +23,7 @@ class SemanticTokenLegendLookup {
late List<SemanticTokenModifiers> _usedTokenModifiers;
/// All [SemanticTokenTypes] the server may generate. The order of these
/// items is important as the indexes will be used in communication betewen
/// items is important as the indexes will be used in communication between
/// server and client.
late List<SemanticTokenTypes> _usedTokenTypes;

View file

@ -8,7 +8,7 @@ import 'package:analysis_server/src/lsp/constants.dart';
import 'package:analysis_server/src/lsp/lsp_analysis_server.dart';
import 'package:analysis_server/src/lsp/semantic_tokens/legend.dart';
/// Helper for reading client dynamic registrations which may be ommitted by the
/// Helper for reading client dynamic registrations which may be omitted by the
/// client.
class ClientDynamicRegistrations {
/// All dynamic registrations supported by the Dart LSP server.
@ -42,7 +42,7 @@ class ClientDynamicRegistrations {
// workspace.fileOperations covers all file operation methods but we only
// support this one.
Method.workspace_willRenameFiles,
// Sematic tokens are all registered under a single "method" as the
// Semantic tokens are all registered under a single "method" as the
// actual methods are controlled by the server capabilities.
CustomMethods.semanticTokenDynamicRegistration,
];
@ -168,7 +168,7 @@ class ServerCapabilitiesComputer {
// When adding new capabilities to the server that may apply to specific file
// types, it's important to update
// [IntializedMessageHandler._performDynamicRegistration()] to notify
// [InitializedMessageHandler._performDynamicRegistration()] to notify
// supporting clients of this. This avoids clients needing to hard-code the
// list of what files types we support (and allows them to avoid sending
// requests where we have only partial support for some types).
@ -332,7 +332,7 @@ class ServerCapabilitiesComputer {
// Completion is supported for some synchronised files that we don't _fully_
// support (eg. YAML). If these gain support for things like hover, we may
// wish to move them to fullySupprtedTypes but add an exclusion for formatting.
// wish to move them to fullySupportedTypes but add an exclusion for formatting.
final completionSupportedTypesExcludingDart = {
// Dart is excluded here at it's registered separately with trigger/commit
// characters.

View file

@ -182,7 +182,7 @@ class SnippetBuilder {
);
}
// Otherwise, we will use a choice. In a choice it'snot valid to be the
// Otherwise, we will use a choice. In a choice it's not valid to be the
// final (0th) tabstop.
assert(placeholderNumber == null || placeholderNumber > 0);
@ -193,7 +193,7 @@ class SnippetBuilder {
placeholderNumber = null;
}
placeholderNumber = _usePlaceholerNumber(placeholderNumber);
placeholderNumber = _usePlaceholderNumber(placeholderNumber);
final escapedChoices = uniqueChoices.map(escapeSnippetChoiceText).join(',');
_buffer.write('\${$placeholderNumber|$escapedChoices|}');
@ -212,7 +212,7 @@ class SnippetBuilder {
return appendTabStop(placeholderNumber: placeholderNumber);
}
placeholderNumber = _usePlaceholerNumber(placeholderNumber);
placeholderNumber = _usePlaceholderNumber(placeholderNumber);
final escapedText = escapeSnippetVariableText(text);
_buffer.write(r'${');
@ -228,7 +228,7 @@ class SnippetBuilder {
///
/// Returns the placeholder number used.
int appendTabStop({int? placeholderNumber}) {
placeholderNumber = _usePlaceholerNumber(placeholderNumber);
placeholderNumber = _usePlaceholderNumber(placeholderNumber);
_buffer.write(r'$');
_buffer.write(placeholderNumber);
@ -242,7 +242,7 @@ class SnippetBuilder {
}
/// Generates the current and next placeholder numbers.
int _usePlaceholerNumber(int? placeholderNumber) {
int _usePlaceholderNumber(int? placeholderNumber) {
// If a number was not supplied, use the next available one.
placeholderNumber ??= _nextPlaceholder;
// If the number we used was the highest seen, set the next one after it.
@ -332,13 +332,13 @@ extension SnippetBuilderExtensions on SnippetBuilder {
appendText(text.substring(offset, placeholder.offset));
final linkedGroupId = placeholder.linkedGroupId;
int? thisPaceholderNumber;
int? thisPlaceholderNumber;
// Override the placeholder number if it's the final one (0) or needs to
// re-use an existing one for a linked group.
if (placeholder.isFinal) {
thisPaceholderNumber = 0;
thisPlaceholderNumber = 0;
} else if (linkedGroupId != null) {
thisPaceholderNumber = placeholderIdForLinkedGroupId[linkedGroupId];
thisPlaceholderNumber = placeholderIdForLinkedGroupId[linkedGroupId];
}
// Append the placeholder/choices.
@ -350,18 +350,18 @@ extension SnippetBuilderExtensions on SnippetBuilder {
// placeholder but it's faster if we can avoid putting a single item into
// a set and then detecting it.
if (placeholder.suggestions == null) {
thisPaceholderNumber = appendPlaceholder(
thisPlaceholderNumber = appendPlaceholder(
placeholderText,
placeholderNumber: thisPaceholderNumber,
placeholderNumber: thisPlaceholderNumber,
);
} else {
final choices = <String>{
if (placeholderText.isNotEmpty) placeholderText,
...?placeholder.suggestions,
};
thisPaceholderNumber = appendChoice(
thisPlaceholderNumber = appendChoice(
choices,
placeholderNumber: thisPaceholderNumber,
placeholderNumber: thisPlaceholderNumber,
);
}
@ -371,7 +371,7 @@ extension SnippetBuilderExtensions on SnippetBuilder {
// Store the placeholder number used for linked groups so it can be reused
// by subsequent references to it.
if (linkedGroupId != null) {
placeholderIdForLinkedGroupId[linkedGroupId] = thisPaceholderNumber;
placeholderIdForLinkedGroupId[linkedGroupId] = thisPlaceholderNumber;
}
}

View file

@ -270,7 +270,7 @@ ErrorOr<List<TextEdit>> _generateMinimalEdits(
final formattedToken = formattedTokens.current;
if (unformattedToken.lexeme != formattedToken.lexeme) {
// If the token lexems do not match, there is a difference in the parsed
// If the token lexemes do not match, there is a difference in the parsed
// token streams (this should not ordinarily happen) so fall back to a
// full edit.
return success(_generateFullEdit(lineInfo, unformatted, formatted));

View file

@ -154,7 +154,7 @@ class ArgListContributor extends DartCompletionContributor {
return true;
}
// Caret is in the between two values that are not seperated by a comma.
// Caret is in the between two values that are not separated by a comma.
// f(one: 1, tw^'foo');
// must be at least two and the target not last.
var args = argumentList.arguments;

View file

@ -89,9 +89,9 @@ class ImportOrganizer {
var offset = directive.offset;
var end = directive.end;
final isPsuedoLibraryDirective = directive == unit.directives.first;
final isPseudoLibraryDirective = directive == unit.directives.first;
Annotation? lastLibraryAnnotation;
if (isPsuedoLibraryDirective) {
if (isPseudoLibraryDirective) {
// Find the last library-level annotation that does not come
// after any non-library annotation. If there are already
// non-library annotations before library annotations, we will not
@ -196,7 +196,7 @@ class ImportOrganizer {
postAnnotationCommentText,
uriContent,
trailingCommentText,
isPsuedoLibraryDirective
isPseudoLibraryDirective
? (libraryDocsAndAnnotationsEndOffset ?? offset)
: offset,
end,

View file

@ -405,7 +405,7 @@ class VirtualContainerProperty {
/// of the `Container` semantic, such as `Padding`. Such wrapper should be
/// replaced with full `Container` when `Container` is materialized.
///
/// Might be `null`, if no existing replacable wrapped.
/// Might be `null`, if no existing replaceable wrapped.
InstanceCreationExpression? _parentCreation;
/// The argument from the [_parentCreation] that should be moved into

View file

@ -19,9 +19,10 @@ class PackageDetailsCache {
static const maxCacheAge = Duration(hours: 18);
static const maxPackageDetailsRequestsInFlight = 5;
/// Requests to write the cache from fetching packge details will be debounced
/// by this duration to prevent many writes while the user may be cursoring
/// though completion requests that will trigger fetching descriptions/versions.
/// Requests to write the cache from fetching package details will be
/// debounced by this duration to prevent many writes while the user may be
/// cursoring though completion requests that will trigger fetching
/// descriptions/versions.
static const _writeCacheDebounceDuration = Duration(seconds: 3);
final Map<String, PubPackage> packages;
@ -273,7 +274,7 @@ class PubPackageService {
/// Clears package caches for [pubspecPath].
///
/// Does not remove other caches that are not pubspec-specific (for example
/// the latest version pulled directly from the Pub API independant of
/// the latest version pulled directly from the Pub API independent of
/// pubspec).
Future<void> flushPackageCaches(String pubspecPath) async {
_pubspecPackageVersions.remove(pubspecPath);

View file

@ -1366,7 +1366,7 @@ import 'new_folder/file.dart';
Future<Response> _cancelMoveRequest() {
// 0 is the id from _sendMoveRequest
// 1 is another aribtrary id for the cancel request
// 1 is another arbitrary id for the cancel request
var request = ServerCancelRequestParams('0').toRequest('1');
return serverChannel.sendRequest(request);
}

View file

@ -38,21 +38,6 @@ class ServerTest extends AbstractLspAnalysisServerIntegrationTest {
expect(responseBody, contains('<title>Analysis Server</title>'));
}
Future<void> test_exit_inintializedWithShutdown() async {
await initialize();
await sendShutdown();
sendExit();
await channel.closed.timeout(const Duration(seconds: 10),
onTimeout: () =>
fail('Server channel did not close within 10 seconds'));
final exitCode = await client!.exitCode.timeout(const Duration(seconds: 10),
onTimeout: () => fail('Server process did not exit within 10 seconds'));
expect(exitCode, equals(0));
}
Future<void> test_exit_initializedWithoutShutdown() async {
// Send a request that we can wait for, to ensure the server is fully ready
// before we send exit. Otherwise the exit notification won't be handled for
@ -70,7 +55,8 @@ class ServerTest extends AbstractLspAnalysisServerIntegrationTest {
expect(exitCode, equals(1));
}
Future<void> test_exit_uninintializedWithShutdown() async {
Future<void> test_exit_initializedWithShutdown() async {
await initialize();
await sendShutdown();
sendExit();
@ -96,4 +82,18 @@ class ServerTest extends AbstractLspAnalysisServerIntegrationTest {
expect(exitCode, equals(1));
}
Future<void> test_exit_uninitializedWithShutdown() async {
await sendShutdown();
sendExit();
await channel.closed.timeout(const Duration(seconds: 10),
onTimeout: () =>
fail('Server channel did not close within 10 seconds'));
final exitCode = await client!.exitCode.timeout(const Duration(seconds: 10),
onTimeout: () => fail('Server process did not exit within 10 seconds'));
expect(exitCode, equals(0));
}
}

View file

@ -771,7 +771,7 @@ class _ListOf extends Matcher {
}
/// Matcher that matches a map of objects, where each key/value pair in the
/// map satisies the given key and value matchers.
/// map satisfies the given key and value matchers.
class _MapOf extends _RecursiveMatcher {
/// Matcher which every key in the map must satisfy.
final Matcher keyMatcher;

View file

@ -177,7 +177,7 @@ int minified(int x, int y) => min(x, y);
(codeAction) => codeAction.command!,
);
// Ensure the request returned an error (error repsonses are thrown by
// Ensure the request returned an error (error responses are thrown by
// the test helper to make consuming success results simpler).
await expectLater(executeCommand(command),
throwsA(isResponseError(ServerErrorCodes.FileHasErrors)));
@ -356,7 +356,7 @@ class SortMembersSourceCodeActionsTest extends AbstractCodeActionsTest {
applied: false, failureReason: 'Document changed'),
);
// Ensure the request returned an error (error repsonses are thrown by
// Ensure the request returned an error (error responses are thrown by
// the test helper to make consuming success results simpler).
await expectLater(commandResponse,
throwsA(isResponseError(ServerErrorCodes.ClientFailedToApplyEdit)));
@ -400,7 +400,7 @@ class SortMembersSourceCodeActionsTest extends AbstractCodeActionsTest {
(codeAction) => codeAction.command!,
);
// Ensure the request returned an error (error repsonses are thrown by
// Ensure the request returned an error (error responses are thrown by
// the test helper to make consuming success results simpler).
await expectLater(executeCommand(command),
throwsA(isResponseError(ServerErrorCodes.FileHasErrors)));

View file

@ -107,7 +107,7 @@ class InitializationTest extends AbstractLspAnalysisServerTest {
Future<void> test_completionRegistrations_withDartPlugin() async {
// This tests for a bug that occurred with an analysis server plugin
// that works on Dart files. When computing completion registrations we
// usually have seperate registrations for Dart + non-Dart to account for
// usually have separate registrations for Dart + non-Dart to account for
// different trigger characters. However, the plugin types were all being
// included in the non-Dart registration even if they included Dart.
//
@ -384,7 +384,7 @@ class InitializationTest extends AbstractLspAnalysisServerTest {
InitializeResult.fromJson(initResponse.result as Map<String, Object?>);
expect(initResult.capabilities, isNotNull);
// Ensure no static registrations. This list should include all server equivilents
// Ensure no static registrations. This list should include all server equivalents
// of the dynamic registrations listed in `ClientDynamicRegistrations.supported`.
expect(initResult.capabilities.textDocumentSync, isNull);
expect(initResult.capabilities.completionProvider, isNull);

View file

@ -74,7 +74,7 @@ class Foo<T> {
final lineInfo = LineInfo.fromContent(contentWithoutMarker);
// The returned List corresponds to the input list of positions, and not
// the set of ranges - each range within that list has a (recusrive) parent
// the set of ranges - each range within that list has a (recursive) parent
// to walk up all ranges for that position.
final regions =
await getSelectionRanges(mainFileUri, [positionFromMarker(content)]);

View file

@ -716,7 +716,7 @@ mixin LspAnalysisServerTestMixin implements ClientCapabilitiesHelperMixin {
Map<String, String> oldFileContent, CreateFile create) {
final path = Uri.parse(create.uri).toFilePath();
if (oldFileContent.containsKey(path)) {
throw 'Recieved create instruction for $path which already existed.';
throw 'Received create instruction for $path which already existed.';
}
oldFileContent[path] = '';
}
@ -726,7 +726,7 @@ mixin LspAnalysisServerTestMixin implements ClientCapabilitiesHelperMixin {
final oldPath = Uri.parse(rename.oldUri).toFilePath();
final newPath = Uri.parse(rename.newUri).toFilePath();
if (!oldFileContent.containsKey(oldPath)) {
throw 'Recieved rename instruction for $oldPath which did not exist.';
throw 'Received rename instruction for $oldPath which did not exist.';
}
oldFileContent[newPath] = oldFileContent[oldPath]!;
oldFileContent.remove(oldPath);
@ -741,7 +741,7 @@ mixin LspAnalysisServerTestMixin implements ClientCapabilitiesHelperMixin {
for (var edit in edits) {
final path = Uri.parse(edit.textDocument.uri).toFilePath();
if (!oldFileContent.containsKey(path)) {
throw 'Recieved edits for $path which was not provided as a file to be edited. '
throw 'Received edits for $path which was not provided as a file to be edited. '
'Perhaps a CreateFile change was missing from the edits?';
}
oldFileContent[path] = applyTextDocumentEdit(oldFileContent[path]!, edit);
@ -1346,7 +1346,7 @@ mixin LspAnalysisServerTestMixin implements ClientCapabilitiesHelperMixin {
///
/// This is used for testing things like code actions, where the client initiates
/// a request but the server does not respond to it until it's sent its own
/// request to the client and it recieved a response.
/// request to the client and it received a response.
///
/// Client Server
/// 1. |- Req: textDocument/codeAction ->
@ -1819,7 +1819,7 @@ mixin LspAnalysisServerTestMixin implements ClientCapabilitiesHelperMixin {
if (message.method == CustomMethods.analyzerStatus) {
if (_clientCapabilities!.window?.workDoneProgress == true) {
throw Exception(
'Recieved ${CustomMethods.analyzerStatus} notification '
'Received ${CustomMethods.analyzerStatus} notification '
'but client supports workDoneProgress');
}
@ -1829,7 +1829,7 @@ mixin LspAnalysisServerTestMixin implements ClientCapabilitiesHelperMixin {
} else if (message.method == Method.progress) {
if (_clientCapabilities!.window?.workDoneProgress != true) {
throw Exception(
'Recieved ${CustomMethods.analyzerStatus} notification '
'Received ${CustomMethods.analyzerStatus} notification '
'but client supports workDoneProgress');
}

View file

@ -85,7 +85,7 @@ class TextStyle {
/// {@end-tool}
final double height;
/// The thickness of the decoration stroke as a muliplier of the thickness
/// The thickness of the decoration stroke as a multiplier of the thickness
/// defined by the font.
///
/// The font provides a base stroke width for [decoration]s which scales off

View file

@ -19,7 +19,7 @@
library meta;
/// Used to annotate a function `f`. Indicates that `f` always throws an
/// exception. Any functions that override `f`, in class inheritence, are also
/// exception. Any functions that override `f`, in class inheritance, are also
/// expected to conform to this contract.
///
/// Tools, such as the analyzer, can use this to understand whether a block of

View file

@ -1059,7 +1059,7 @@ class B extends A {
assertNotSuggested('r');
assertNotSuggested('x');
// imported elements are portially filtered
// imported elements are partially filtered
//assertSuggestClass('A');
assertNotSuggested('_B');
// hidden element not suggested

View file

@ -1258,7 +1258,7 @@ class Z { }''');
assertNotSuggested('r');
assertNotSuggested('x');
// imported elements are portially filtered
// imported elements are partially filtered
//assertNotSuggested('A');
assertNotSuggested('_B');
//assertNotSuggested('C');

View file

@ -941,7 +941,7 @@ void f() {new A().f^}''');
assertNotSuggested('r');
assertNotSuggested('x');
// imported elements are portially filtered
// imported elements are partially filtered
//assertNotSuggested('A');
assertNotSuggested('_B');
//assertNotSuggested('C');
@ -2582,7 +2582,7 @@ void f() {
assertSuggestGetter('length', 'int');
}
Future<void> test_local_propogatedType() async {
Future<void> test_local_propagatedType() async {
addTestSource('foo() {var x = "bar"; x.^}');
await computeSuggestions();
assertSuggestGetter('length', 'int');

View file

@ -25,7 +25,7 @@ class ColorComputerTest extends AbstractContextTest {
/// Values are the color that should be discovered (in 0xAARRGGBB format).
///
/// Color values may not match the actual Flutter framework but are
/// values that are more identifyable for ease of testing. They are
/// values that are more identifiable for ease of testing. They are
/// defined in:
/// - test/mock_packages/flutter/lib/src/material/colors.dart.
/// - test/mock_packages/flutter/lib/src/cupertino/colors.dart.

View file

@ -79,7 +79,7 @@ class NotificationManagerTest extends ProtocolTestUtilities {
_verifyHighlightRegions(fileA, [region1, region2]);
}
void test_handlePluginNotification_naviation() {
void test_handlePluginNotification_navigation() {
manager.setSubscriptions({
server.AnalysisService.NAVIGATION: {fileA, fileB}
});

View file

@ -153,7 +153,7 @@ void f() => print(_E("hello").m2());
''');
}
Future<void> test_staticMethod_mixim_notUsed_noReference() async {
Future<void> test_staticMethod_mixin_notUsed_noReference() async {
await resolveTestCode(r'''
mixin _M {
static int m1() => 3;

View file

@ -639,7 +639,7 @@ int bar = 1; // 5
});
}
Future<void> test_topLevel_multiple_mixedComents() async {
Future<void> test_topLevel_multiple_mixedComments() async {
await resolveTestCode('''
import '';

View file

@ -77,7 +77,7 @@ void main() {
// Length is two because we'll fabricate the type of textDoc.
expect(output, hasLength(2));
// Check there was a full fabricarted interface for this type.
// Check there was a full fabricated interface for this type.
expect(output[0], const TypeMatcher<Interface>());
var interface = output[0] as Interface;
expect(interface.name, equals('CapabilitiesTextDoc'));

View file

@ -24,7 +24,7 @@ When there are no open workspace folders (or if the initialization option `onlyA
## Initialization Options
- `onlyAnalyzeProjectsWithOpenFiles` (`bool?`): When set to `true`, workspace folders will be ignored and analysis will be performed based on the open files, as if no workspace was open at all. This allows opening large folders without causing them to be completely analyzed. Defaults to `false`.
- `suggestFromUnimportedLibraries` (`bool?`): When set to `false`, completion will not include synbols that are not already imported into the current file. Defaults to `true`, though the client must additionally support `workspace/applyEdit` for these completions to be included.
- `suggestFromUnimportedLibraries` (`bool?`): When set to `false`, completion will not include symbols that are not already imported into the current file. Defaults to `true`, though the client must additionally support `workspace/applyEdit` for these completions to be included.
- `closingLabels` (`bool?`): When set to `true`, `dart/textDocument/publishClosingLabels` notifications will be sent with information to render editor closing labels.
- `outline` (`bool?`): When set to `true`, `dart/textDocument/publishOutline` notifications will be sent with outline information for open files.
- `flutterOutline` (`bool?`): When set to `true`, `dart/textDocument/publishFlutterOutline` notifications will be sent with Flutter outline information for open files.
@ -163,7 +163,7 @@ Direction: Client -> Server
Params: None
Returns: `{ port: number }`
Starts the analzyer diagnostics server (if not already running) and returns the port number it's listening on.
Starts the analyzer diagnostics server (if not already running) and returns the port number it's listening on.
### dart/reanalyze Method
@ -224,4 +224,4 @@ Element: as defined for the `dart/textDocument/publishOutline` notification.
Notifies the client when Flutter outline information is available (or updated) for a file.
Nodes contains multiple ranges as desribed for the `dart/textDocument/publishOutline` notification.
Nodes contains multiple ranges as described for the `dart/textDocument/publishOutline` notification.

View file

@ -275,7 +275,7 @@ class LspMetaModelCleaner {
// Merged into InitializeParams.
'_InitializeParams',
'WorkspaceFoldersInitializeParams',
// We don't use these clases and they weren't in the TS version of the
// We don't use these classes and they weren't in the TS version of the
// spec so continue to not generate them until required.
'DidChangeConfigurationRegistrationOptions',
// LSPAny/LSPObject are used by the LSP spec for unions of basic types.

View file

@ -215,7 +215,7 @@ class LspMetaModelReader {
/// Generates a valid name for a member.
String _generateMemberName(String name, {bool camelCase = false}) {
// Replace any seperators like `/` with `_`.
// Replace any separators like `/` with `_`.
name = name.replaceAll(_memberNameSeparatorPattern, '_');
// Replace out any characters we don't want in member names.

View file

@ -53,7 +53,7 @@ mixin ServerListener {
log('Unexpected notification format from server', '$message');
}
/// Called when the [Server] recieved an unexpected response
/// Called when the [Server] received an unexpected response
/// where the [id] does not match the [id] of an outstanding request.
void unexpectedResponse(Map<String, Object?> message, Object id) {
log('Unexpected response from server', 'id=$id');

View file

@ -198,7 +198,7 @@ class Request {
/// 'id': String,
/// 'method': methodName,
/// 'params': {
/// paramter_name: value
/// parameter_name: value
/// }
/// }
///
@ -234,7 +234,7 @@ class Request {
/// 'id': String,
/// 'method': methodName,
/// 'params': {
/// paramter_name: value
/// parameter_name: value
/// }
/// }
///
@ -264,7 +264,7 @@ class RequestFailure implements Exception {
/// The response to be returned as a result of the failure.
final Response response;
/// Initialize a newly created exception to return the given reponse.
/// Initialize a newly created exception to return the given response.
RequestFailure(this.response);
}

View file

@ -238,7 +238,7 @@ class ElementDisplayStringBuilder {
// version and know the length of the function name/return type.
var multiline = allowMultiline && this.multiline && parameters.length >= 3;
// The prefix for open groups is included in seperator for single-line but
// The prefix for open groups is included in separator for single-line but
// not for multline so must be added explicitly.
var openGroupPrefix = multiline ? ' ' : '';
var separator = multiline ? ',' : ', ';

View file

@ -13,7 +13,7 @@ class CancelableToken extends CancellationToken {
/// A token used to signal cancellation of an operation. This allows computation
/// to be skipped when a caller is no longer interested in the result, for example
/// when a $/cancel request is recieved for an in-progress request.
/// when a $/cancel request is received for an in-progress request.
abstract class CancellationToken {
bool get isCancellationRequested;
}

View file

@ -237,7 +237,7 @@ class StrongModeLocalInferenceTest extends PubPackageResolutionTest
test_constrainedByBounds1() async {
// Test that upwards inference with two type variables correctly
// propogates from the constrained variable to the unconstrained
// propagates from the constrained variable to the unconstrained
// variable if they are ordered left to right.
String code = r'''
T f<S, T extends S>(S x) => null;
@ -257,7 +257,7 @@ class StrongModeLocalInferenceTest extends PubPackageResolutionTest
test_constrainedByBounds2() async {
// Test that upwards inference with two type variables does
// propogate from the constrained variable to the unconstrained
// propagate from the constrained variable to the unconstrained
// variable if they are ordered right to left.
String code = r'''
T f<T extends S, S>(S x) => null;
@ -294,7 +294,7 @@ class StrongModeLocalInferenceTest extends PubPackageResolutionTest
test_constrainedByBounds4() async {
// Test that upwards inference with two type variables correctly
// propogates from the constrained variable to the unconstrained
// propagates from the constrained variable to the unconstrained
// variable if they are ordered left to right, when the variable
// appears co and contra variantly
String code = r'''
@ -873,7 +873,7 @@ class StrongModeLocalInferenceTest extends PubPackageResolutionTest
}
test_futureOr_downwards3() async {
// Test that downwards inference correctly propogates into
// Test that downwards inference correctly propagates into
// arguments.
MethodInvocation invoke = await _testFutureOr(r'''
Future<T> mk<T>(FutureOr<T> x) => null;

View file

@ -146,13 +146,13 @@ main() {
main() {
// TODO: Implement something
// that is too long for one line
// TODO: This is a seperate todo that is accidentally indented
// TODO: This is a separate todo that is accidentally indented
}
''', [
error(TodoCode.TODO, 14, 61,
text: 'TODO: Implement something that is too long for one line'),
error(TodoCode.TODO, 82, 59,
text: 'TODO: This is a seperate todo that is accidentally indented'),
text: 'TODO: This is a separate todo that is accidentally indented'),
]);
}

View file

@ -102,7 +102,7 @@ class Request {
/// 'id': String,
/// 'method': methodName,
/// 'params': {
/// paramter_name: value
/// parameter_name: value
/// }
/// }
///

View file

@ -670,7 +670,7 @@ class _ListOf extends Matcher {
}
/// Matcher that matches a map of objects, where each key/value pair in the
/// map satisies the given key and value matchers.
/// map satisfies the given key and value matchers.
class _MapOf extends _RecursiveMatcher {
/// Matcher which every key in the map must satisfy.
final Matcher keyMatcher;

View file

@ -946,7 +946,7 @@ void main() {new A().f^}''');
assertNotSuggested('r');
assertNotSuggested('x');
// imported elements are portially filtered
// imported elements are partially filtered
//assertNotSuggested('A');
assertNotSuggested('_B');
//assertNotSuggested('C');
@ -2511,7 +2511,7 @@ g(F.^
assertSuggestGetter('length', 'int');
}
Future<void> test_local_propogatedType() async {
Future<void> test_local_propagatedType() async {
addTestSource('foo() {var x = "bar"; x.^}');
await computeSuggestions();
assertSuggestGetter('length', 'int');

View file

@ -60,7 +60,7 @@ void main() {
}
// The main library imports lib1 and lib2 deferred and use lib1.foo1 and
// lib2.foo2. This should trigger seperate outputunits for main, lib1 and lib2.
// lib2.foo2. This should trigger separate outputunits for main, lib1 and lib2.
//
// Both lib1 and lib2 import lib3 directly and
// both use lib3.foo3. Therefore a shared output unit for lib1 and lib2 should

View file

@ -31,7 +31,7 @@ void main() {
}
// The main library imports lib1 and lib2 deferred and use lib1.foo1 and
// lib2.foo2. This should trigger seperate outputunits for main, lib1 and lib2.
// lib2.foo2. This should trigger separate outputunits for main, lib1 and lib2.
//
// Both lib1 and lib2 import lib3 directly and
// both use lib3.foo3. Therefore a shared output unit for lib1 and lib2 should

View file

@ -86,7 +86,7 @@ void main() {
}
// The main library imports lib1 and lib2 deferred and use lib1.foo1 and
// lib2.foo2. This should trigger seperate output units for main, lib1 and
// lib2.foo2. This should trigger separate output units for main, lib1 and
// lib2.
//
// Both lib1 and lib2 import lib3 directly and

View file

@ -57,7 +57,7 @@ class E implements A {
}
}
// Test class with unoverriden superclass method
// Test class with unoverridden superclass method
class G extends A {
G();
}

View file

@ -69,7 +69,7 @@ Future<void> sendUsageEvent(
commandFlags.sort();
specifiedExperiments.sort();
// Insert a seperator before and after the flags list to make it easier to filter
// Insert a separator before and after the flags list to make it easier to filter
// for a specific flag:
final enabledExperimentsString = ' ${specifiedExperiments.join(' ')} ';
final commandFlagsString = ' ${commandFlags.join(' ')} ';

View file

@ -1623,7 +1623,7 @@ abstract class DartDebugAdapter<TL extends LaunchRequestArguments,
/// Creates one or more OutputEvents for the provided [message].
///
/// Messages that contain stack traces may be split up into seperate events
/// Messages that contain stack traces may be split up into separate events
/// for each frame to allow location metadata to be attached.
Future<List<OutputEventBody>> _buildOutputEvents(
String category,

View file

@ -104,7 +104,7 @@ class IsolateManager {
/// when asking for data so it's all stored together here.
final _storedData = <int, _StoredData>{};
/// A pattern that matches an opening brace `{` that was not preceeded by a
/// A pattern that matches an opening brace `{` that was not preceded by a
/// dollar.
///
/// Any leading character matched in place of the dollar is in the first capture.
@ -883,7 +883,7 @@ class ThreadInfo {
}
} catch (e) {
// We can't leave dangling completers here because others may already
// be waiting on them, so propogate the error to them.
// be waiting on them, so propagate the error to them.
completers.forEach((uri, completer) => completer.completeError(e));
rethrow;
}

View file

@ -20,7 +20,7 @@ main() {
/// A helper that verifies a full set of expected test results for the
/// [simpleTestProgram] script.
void expectStandardSimpleTestResults(TestEvents events) {
// Check we recieved all expected test events passed through from
// Check we received all expected test events passed through from
// package:test.
final eventNames =
events.testNotifications.map((e) => e['type']).toList();

View file

@ -275,7 +275,7 @@ main() {
test('can shutdown during startup', () async {
final testFile = dap.createTestFile(simpleArgPrintingProgram);
// Terminate the app immediately upon recieving the first Thread event.
// Terminate the app immediately upon receiving the first Thread event.
// The DAP is also responding to this event to configure the isolate (eg.
// set breakpoints and exception pause behaviour) and will cause it to
// receive "Service has disappeared" responses if these are in-flight as

View file

@ -176,7 +176,7 @@ class DapTestClient {
'Event "$event"',
_eventController.stream.firstWhere((e) => e.event == event,
orElse: () =>
throw 'Did not recieve $event event before stream closed'));
throw 'Did not receive $event event before stream closed'));
/// Returns a stream for [event] events.
Stream<Event> events(String event) {
@ -673,7 +673,7 @@ extension DapTestClientExtension on DapTestClient {
/// Collects all output events until the program terminates.
///
/// These results include all events in the order they are recieved, including
/// These results include all events in the order they are received, including
/// console, stdout and stderr.
///
/// Only one of [start] or [launch] may be provided. Use [start] to customise
@ -701,7 +701,7 @@ extension DapTestClientExtension on DapTestClient {
/// Collects all output and test events until the program terminates.
///
/// These results include all events in the order they are recieved, including
/// These results include all events in the order they are received, including
/// console, stdout, stderr and test notifications from the test JSON reporter.
///
/// Only one of [start] or [launch] may be provided. Use [start] to customise

View file

@ -11,7 +11,7 @@ import 'shared_compiler.dart' show YieldFinder;
///
/// For example, postfix increment can be desugared as:
///
/// // psuedocode mix of Scheme and JS:
/// // pseudocode mix of Scheme and JS:
/// (let* (x1=expr1, x2=expr2, t=x1[x2]) { x1[x2] = t + 1; t })
///
/// [MetaLet] will simplify itself automatically when [toExpression],

View file

@ -2266,7 +2266,6 @@ preceded
precedence
precedes
preceding
preceeding
precise
precisely
precision

View file

@ -8752,7 +8752,7 @@ f() {
await _checkSingleFileChanges(content, expected);
}
Future<void> test_typedef_assign_null_type_formal_with_paramter() async {
Future<void> test_typedef_assign_null_type_formal_with_parameter() async {
var content = '''
typedef F<R> = Function<T>(T);

View file

@ -898,8 +898,8 @@ Future _processLoadRequest(request) async {
// http://dartbug.com/45137
// enableColors calls `stdout.supportsAnsiEscapes` which - on Windows -
// does something with line endings. To avoid this when no error
// messages are do be printed anyway, we are carefull not to call it unless
// neccessary.
// messages are do be printed anyway, we are careful not to call it unless
// necessary.
if (compiler.errorsColorized.isNotEmpty) {
final List<String> errors =
(enableColors) ? compiler.errorsColorized : compiler.errorsPlain;

View file

@ -65,7 +65,7 @@ ArgResults parseArgs(List<String> args) {
..addFlag('remove-source',
help: 'Removes source code from the emitted dill', defaultsTo: false)
..addFlag('verbose',
help: 'Write to stdout about what classes and fields where remeoved')
help: 'Write to stdout about what classes and fields where removed')
..addFlag('help', help: 'Prints this help', negatable: false);
ArgResults? argResults;

View file

@ -492,7 +492,7 @@ class ShadowRewriter extends Transformer {
ShadowRewriter(this.enclosingFunction) {
for (final parameter in enclosingFunction.positionalParameters
.followedBy(enclosingFunction.namedParameters)) {
// Put in placeholers so we can allocate new variables lazily- i.e. only
// Put in placeholders so we can allocate new variables lazily- i.e. only
// if they're later referenced.
_shadowedParameters[parameter] = null;
}

View file

@ -108,7 +108,7 @@ List<LoadingUnit> computeLoadingUnits(Component component) {
// 4. Sort loading units so parents are before children. Normally this order
// would already exist as a side effect of loading sources in import order,
// but this isn't guarenteed when combining separately produced kernel files.
// but this isn't guaranteed when combining separately produced kernel files.
for (var unit in loadingUnits) {
var parent = unit.parent;
if (parent != null) {

View file

@ -747,7 +747,7 @@ class _FfiDefinitionTransformer extends FfiTransformer {
return result;
}
/// Must only be called if all the depencies are already in the cache.
/// Must only be called if all the dependencies are already in the cache.
CompoundNativeTypeCfe _compoundAnnotatedNativeTypeCfe(Class compoundClass) {
final layoutConstant = _compoundAnnotatedFields(compoundClass)!;
final fieldTypes = layoutConstant

View file

@ -134,7 +134,7 @@ mixin _FfiUseSiteTransformer on FfiTransformer {
return super.visitStaticInvocation(node);
}
// We've just created this node. We're likely not going to need to transform
// this node itself. Visit its sub exprssions.
// this node itself. Visit its sub expressions.
return super.defaultExpression(modifiedExpression);
}
@ -270,7 +270,7 @@ mixin _FfiUseSiteTransformer on FfiTransformer {
isLeaf = false;
}
// Inline function body to make all type arguments instatiated.
// Inline function body to make all type arguments instantiated.
final replacement = StaticInvocation(
asFunctionInternal,
Arguments([node.arguments.positional[0], BoolLiteral(isLeaf)],
@ -386,7 +386,7 @@ mixin _FfiUseSiteTransformer on FfiTransformer {
_ensureNativeTypeValid(nativeType, node, allowCompounds: true);
// Inline the body to get rid of a generic invocation of sizeOf.
// TODO(http://dartbug.com/39964): Add `allignmentOf<T>()` call.
// TODO(http://dartbug.com/39964): Add `alignmentOf<T>()` call.
Expression? sizeInBytes = _inlineSizeOf(nativeType as InterfaceType);
if (sizeInBytes != null) {
if (node.arguments.positional.length == 2) {
@ -761,7 +761,7 @@ mixin _FfiUseSiteTransformer on FfiTransformer {
return super.visitInstanceInvocation(node);
}
// We've just created this node. We're likely not going to need to transform
// this node itself. Visit its sub exprssions.
// this node itself. Visit its sub expressions.
return super.defaultExpression(modifiedExpression);
}

View file

@ -13,7 +13,7 @@ const kVmNonNullableResultType = "vm:non-nullable-result-type";
const kResultTypeUsesPassedTypeArguments =
"result-type-uses-passed-type-arguments";
const kVmRecognizedPragmaName = "vm:recognized";
const kVmDisableUnboxedParametetersPragmaName = "vm:disable-unboxed-parameters";
const kVmDisableUnboxedParametersPragmaName = "vm:disable-unboxed-parameters";
// Pragmas recognized by dart2wasm
const kWasmEntryPointPragmaName = "wasm:entry-point";
@ -153,7 +153,7 @@ class ConstantPragmaAnnotationParser extends PragmaAnnotationParser {
"pragma: $options";
}
return new ParsedRecognized(type);
case kVmDisableUnboxedParametetersPragmaName:
case kVmDisableUnboxedParametersPragmaName:
return new ParsedDisableUnboxedParameters();
case kWasmEntryPointPragmaName:
return ParsedEntryPointPragma(PragmaEntryPointType.Default);

View file

@ -2460,7 +2460,7 @@ class ConstantAllocationCollector extends ConstantVisitor<Type> {
ConstantAllocationCollector(this.summaryCollector);
// Ensures the transtive graph of [constant] got scanned for potential
// Ensures the transitive graph of [constant] got scanned for potential
// allocations and field types. Returns the [Type] of this constant.
Type typeFor(Constant constant) {
return constants.putIfAbsent(constant, () => constant.accept(this));

View file

@ -425,7 +425,7 @@ class AnnotateKernel extends RecursiveVisitor {
node is! StaticTearOff) {
// The compiler uses another heuristic in addition to the call-site
// annotation: if the call-site is non-dynamic and the interface target does
// not exist in the parent chain of _Smi (int is used as an approxmiation
// not exist in the parent chain of _Smi (int is used as an approximation
// here), then the receiver cannot be _Smi. This heuristic covers most
// cases, so we skip these to avoid showering the AST with annotations.
if (interfaceTarget == null ||

View file

@ -168,7 +168,7 @@ class SimpleUnreachableCodeElimination extends RemovingTransformer {
@override
TreeNode visitTryCatch(TryCatch node, TreeNode? removalSentinel) {
node.transformOrRemoveChildren(this);
// Can replace try/catch with its body if all catches are just rethow.
// Can replace try/catch with its body if all catches are just rethrow.
for (Catch catchClause in node.catches) {
if (!_isRethrow(catchClause.body)) {
return node;

View file

@ -639,7 +639,7 @@ main() {
return coverageLines;
}
test('compile seperatly, check coverage', () async {
test('compile separately, check coverage', () async {
Directory dir = mytest.createTempSync();
// First compile lib, run and verify coverage (un-named constructor
@ -676,7 +676,7 @@ main() {
compiler.accept();
// Then compile lib, run and verify coverage (un-named constructor
// covered, and the named constructor coveraged too).
// covered, and the named constructor covered too).
File mainDill = File(p.join(dir.path, p.basename(main.path + ".dill")));
compilerResult = await compiler.compile(entryPoints: [main.uri]);
component = compilerResult.component;
@ -714,7 +714,7 @@ main() {
//
// Shift lines down by five
// lines so the original
// lines can't be coverred
// lines can't be covered
//
class Foo {
final int x;

View file

@ -57,7 +57,7 @@ enum E with M {
}
String toString() {
print('overriden toString'); // LINE_H
print('overridden toString'); // LINE_H
return '';
}
}

View file

@ -60,7 +60,7 @@ bool DartDevIsolate::ShouldParseCommand(const char* script_uri) {
Utils::CStringUniquePtr DartDevIsolate::TryResolveArtifactPath(
const char* filename) {
// |dir_prefix| includes the last path seperator.
// |dir_prefix| includes the last path separator.
auto dir_prefix = EXEUtils::GetDirectoryPrefixFromExeName();
// First assume we're in dart-sdk/bin.

View file

@ -99,7 +99,7 @@ void DFE::InitKernelServiceAndPlatformDills() {
return;
}
// |dir_prefix| includes the last path seperator.
// |dir_prefix| includes the last path separator.
auto dir_prefix = EXEUtils::GetDirectoryPrefixFromExeName();
// Look for the frontend snapshot next to the executable.

View file

@ -608,7 +608,7 @@ int SSLFilter::Handshake(Dart_Port reply_port) {
//
// If either of those functions fail, and this.callback_error has not
// already been set, then they will set this.callback_error to an error
// handle i.e. only the first error will be captured and propogated.
// handle i.e. only the first error will be captured and propagated.
Dart_PropagateError(callback_error);
}
if (SSL_want_write(ssl_) || SSL_want_read(ssl_)) {

View file

@ -205,7 +205,7 @@ The next time this function is called - it will use optimized code. Some functio
test.dart
```
It is important to highlight that the code generated by optimizing compiler is specialized under speculative assumptions based on the execution profile of the application. For example, a dynamic call site that only observed instances of a single class `C` as a receiver will be converted into a direct call preceeded by a check verifying that receiver has an expected class `C`. However these assumptions might be violated later during execution of the program:
It is important to highlight that the code generated by optimizing compiler is specialized under speculative assumptions based on the execution profile of the application. For example, a dynamic call site that only observed instances of a single class `C` as a receiver will be converted into a direct call preceded by a check verifying that receiver has an expected class `C`. However these assumptions might be violated later during execution of the program:
```dart
void printAnimal(obj) {

View file

@ -1552,7 +1552,7 @@ DART_EXPORT DART_WARN_UNUSED_RESULT Dart_Handle Dart_HandleMessage(void);
/**
* Drains the microtask queue, then blocks the calling thread until the current
* isolate recieves a message, then handles all messages.
* isolate receives a message, then handles all messages.
*
* \param timeout_millis When non-zero, the call returns after the indicated
number of milliseconds even if no message was received.
@ -3293,9 +3293,9 @@ Dart_SetLibraryTagHandler(Dart_LibraryTagHandler handler);
* call Dart_DeferredLoadComplete or Dart_DeferredLoadCompleteError before the
* handler returns.
*
* If an error is returned, it will be propogated through
* If an error is returned, it will be propagated through
* `prefix.loadLibrary()`. This is useful for synchronous
* implementations, which must propogate any unwind errors from
* implementations, which must propagate any unwind errors from
* Dart_DeferredLoadComplete or Dart_DeferredLoadComplete. Otherwise the handler
* should return a non-error such as `Dart_Null()`.
*/

View file

@ -169,7 +169,7 @@ DART_EXPORT void Dart_SetEmbedderInformationCallback(
* \param response_json_length The length of the returned json response.
* \param error An optional error, must be free()ed by caller.
*
* \return Whether the call was sucessfully performed.
* \return Whether the call was successfully performed.
*
* NOTE: This method does not need a current isolate and must not have the
* vm-isolate being the current isolate. It must be called after
@ -350,7 +350,7 @@ DART_EXPORT bool Dart_IsReloading();
* Enable tracking of specified timeline category. This is operational
* only when systrace timeline functionality is turned on.
*
* \param categories A comma seperated list of categories that need to
* \param categories A comma separated list of categories that need to
* be enabled, the categories are
* "all" : All categories
* "API" - Execution of Dart C API functions
@ -365,7 +365,7 @@ DART_EXPORT bool Dart_IsReloading();
* "" - None
*
* When "all" is specified all the categories are enabled.
* When a comma seperated list of categories is specified, the categories
* When a comma separated list of categories is specified, the categories
* that are specified will be enabled and the rest will be disabled.
* When "" is specified all the categories are disabled.
* The category names are case sensitive.

View file

@ -769,7 +769,7 @@ class SpawnIsolateTask : public ThreadPool::Task {
bool EnsureIsRunnable(Isolate* child) {
// We called out to the embedder to create/initialize a new isolate. The
// embedder callback sucessfully did so. It is now our responsibility to
// embedder callback successfully did so. It is now our responsibility to
// run the isolate.
// If the isolate was not marked as runnable, we'll do so here and run it.
if (!child->is_runnable()) {

View file

@ -950,7 +950,7 @@
"../../../tests/language/deferred/shadow_load_library_test.dart",
"../../../tests/language/deferred/shared_and_unshared_classes_test.dart",
"../../../tests/language/deferred/split_constants_canonicalization_test.dart",
"../../../tests/language/deferred/static_seperate_test.dart",
"../../../tests/language/deferred/static_separate_test.dart",
"../../../tests/language/deferred/super_dependency_runtime_test.dart",
"../../../tests/language/deferred/unreachable_loading_unit_test.dart",
"../../../tests/language/double/comparison_test.dart",
@ -4359,7 +4359,7 @@
"../../../tests/language_2/deferred/shadow_load_library_test.dart",
"../../../tests/language_2/deferred/shared_and_unshared_classes_test.dart",
"../../../tests/language_2/deferred/split_constants_canonicalization_test.dart",
"../../../tests/language_2/deferred/static_seperate_test.dart",
"../../../tests/language_2/deferred/static_separate_test.dart",
"../../../tests/language_2/deferred/super_dependency_runtime_test.dart",
"../../../tests/language_2/deferred/unreachable_loading_unit_test.dart",
"../../../tests/language_2/double/comparison_test.dart",

View file

@ -37,7 +37,7 @@ void testGetter() {
a.val = 99.0;
}
// Ensure value (aka valueAlias) was not overriden with 99.0
// Ensure value (aka valueAlias) was not overridden with 99.0
Expect.equals(4.2, valueAlias);
}
@ -55,7 +55,7 @@ void testSetter() {
a.val = 99.0;
}
// Ensure value (aka valueAlias) was not overriden with 99.0
// Ensure value (aka valueAlias) was not overridden with 99.0
Expect.equals(4.2, valueAlias);
}

View file

@ -39,7 +39,7 @@ void testGetter() {
a.val = 99.0;
}
// Ensure value (aka valueAlias) was not overriden with 99.0
// Ensure value (aka valueAlias) was not overridden with 99.0
Expect.equals(4.2, valueAlias);
}
@ -57,7 +57,7 @@ void testSetter() {
a.val = 99.0;
}
// Ensure value (aka valueAlias) was not overriden with 99.0
// Ensure value (aka valueAlias) was not overridden with 99.0
Expect.equals(4.2, valueAlias);
}

View file

@ -843,7 +843,7 @@ class DartFuzz {
while (parentClass >= 0) {
vcm[parentClass] = <int>[];
for (var j = 0, n = classMethods[parentClass].length; j < n; j++) {
// Call methods are presently always already overriden, so we
// Call methods are presently always already overridden, so we
// shouldn't override them here.
if (rollDice(8) && !(classMethods[parentClass][j] is CallMethod)) {
currentClassIndex = parentClass;

View file

@ -133,7 +133,7 @@ bool shouldFilterType(String typName, {bool fp = true, bool flatTp = false}) {
return false;
}
// Returns true if any of the paramters in the list fails the
// Returns true if any of the parameters in the list fails the
// filter criteria.
bool shouldFilterParameterList(List<String> parameters,
{bool fp = true, bool flatTp = false}) {
@ -146,7 +146,7 @@ bool shouldFilterParameterList(List<String> parameters,
}
// Filter a set of a list of parameters according to their type.
// A paramter list is only retained if all of the contained paramters
// A parameter list is only retained if all of the contained parameters
// pass the filter criteria.
Set<List<String>> filterParameterList(Set<List<String>> parameterList,
{bool fp = true, bool flatTp = false}) {

View file

@ -1458,7 +1458,7 @@ class Assembler : public AssemblerBase {
// offset is not yet known and needs therefore relocation to the right place
// before the code can be used.
//
// The neccessary information for the "linker" (i.e. the relocation
// The necessary information for the "linker" (i.e. the relocation
// information) is stored in [UntaggedCode::static_calls_target_table_]: an
// entry of the form
//

View file

@ -2206,7 +2206,7 @@ class Assembler : public AssemblerBase {
// is not yet known and needs therefore relocation to the right place before
// the code can be used.
//
// The neccessary information for the "linker" (i.e. the relocation
// The necessary information for the "linker" (i.e. the relocation
// information) is stored in [UntaggedCode::static_calls_target_table_]: an
// entry of the form
//

View file

@ -1320,7 +1320,7 @@ class Assembler : public MicroAssembler {
// is not yet known and needs therefore relocation to the right place before
// the code can be used.
//
// The neccessary information for the "linker" (i.e. the relocation
// The necessary information for the "linker" (i.e. the relocation
// information) is stored in [UntaggedCode::static_calls_target_table_]: an
// entry of the form
//

View file

@ -5124,7 +5124,7 @@ Definition* InstanceCallInstr::Canonicalize(FlowGraph* flow_graph) {
// better optimized by the compiler.
//
// TODO(dartbug.com/37291): Allow this optimization, but accumulate affected
// InstanceCallInstrs and the corresponding reciever cids during compilation.
// InstanceCallInstrs and the corresponding receiver cids during compilation.
// After compilation, add receiver checks to the ICData for those call sites.
if (Targets().is_empty()) return this;

View file

@ -24,7 +24,7 @@ class SpeculativeInliningPolicy;
//
// * Replace a call to a binary arithmetic operator with corresponding IL
// instructions and necessary checks;
// * Replace a dynamic call with a static call, if reciever is known
// * Replace a dynamic call with a static call, if receiver is known
// to have a certain class id;
// * Replace type check with a range check
//

View file

@ -85,7 +85,7 @@ class BaseMarshaller : public ZoneAllocated {
return Location(arg_index).payload_type().AsRepresentationOverApprox(zone_);
}
// Representation on how the value is passed to or recieved from the FfiCall
// Representation on how the value is passed to or received from the FfiCall
// instruction or StaticCall, NativeParameter, and NativeReturn instructions.
virtual Representation RepInFfiCall(intptr_t def_index_global) const;
void RepsInFfiCall(intptr_t arg_index,

View file

@ -125,7 +125,7 @@ class TestFragment {
// kSharedWithVariable:
//
// A temporary variable is allocated and initialized to 0 on normal entry
// and 2 on unchecked entry. Code which should be ommitted on the unchecked
// and 2 on unchecked entry. Code which should be omitted on the unchecked
// entrypoint is made conditional on this variable being equal to 0.
//
enum class UncheckedEntryPointStyle {

View file

@ -133,7 +133,7 @@ class GcWithoutDeoptTask : public StateMachineTask {
// This test ensures that while a "deopt safepoint operation" is about to start
// but is still waiting for some threads to hit a "deopt safepoint" another
// safepoint operation can sucessfully start and finish.
// safepoint operation can successfully start and finish.
ISOLATE_UNIT_TEST_CASE(
SafepointOperation_SafepointOpWhileDeoptSafepointOpBlocked) {
auto isolate_group = thread->isolate_group();
@ -166,7 +166,7 @@ ISOLATE_UNIT_TEST_CASE(
gc->MarkAndNotify(GcWithoutDeoptTask::kStartSafepointOperation);
gc->WaitUntil(GcWithoutDeoptTask::kEndSafepointOperation);
// We were sucessfully doing a safepoint operation, now let's ensure the
// We were successfully doing a safepoint operation, now let's ensure the
// first thread is still stuck in the starting of deopt operation.
deopt->AssertIsIn(DeoptTask::kStartDeoptOperation);

View file

@ -31,11 +31,11 @@ class ServiceIsolate : public AllStatic {
static Dart_Port Port();
static void WaitForServiceIsolateStartup();
// Returns `true` if the request was sucessfully sent. If it was, the
// Returns `true` if the request was successfully sent. If it was, the
// [reply_port] will receive a Dart_TypedData_kUint8 response json.
//
// If sending the rpc failed and [error] is not `nullptr` then [error] might
// be set to a string containting the reason for the failure. If so, the
// be set to a string containing the reason for the failure. If so, the
// caller is responsible for free()ing the error.
static bool SendServiceRpc(uint8_t* request_json,
intptr_t request_json_length,

View file

@ -729,7 +729,7 @@ class RestoreWriteBarrierInvariantVisitor : public ObjectPointerVisitor {
//
// Therefore, to support this assumption, we scan the stack after a scavenge
// or when concurrent marking begins and add all live temporaries in
// Dart frames preceeding an exit frame to the store buffer or deferred
// Dart frames preceding an exit frame to the store buffer or deferred
// marking stack.
void Thread::RestoreWriteBarrierInvariant(RestoreWriteBarrierInvariantOp op) {
ASSERT(IsAtSafepoint());

View file

@ -204,7 +204,7 @@ class _Parser {
if (c == DOT && !dot) {
dot = true;
} else {
// Not a digit or decimal seperator
// Not a digit or decimal separator
break;
}
}

View file

@ -195,8 +195,8 @@ main() {
}
{
// With IntPtr pointers, one could manually setup aribtrary data
// structres in C memory.
// With IntPtr pointers, one could manually setup arbitrary data
// structures in C memory.
//
// However, it is advised to use Pointer<Pointer<...>> for that.

Some files were not shown because too many files have changed in this diff Show more