From 029b1cb9484cacb0be63a348a479fff4f1cc589b Mon Sep 17 00:00:00 2001 From: Erik Corry Date: Sat, 24 Jun 2017 13:41:35 +0200 Subject: [PATCH] Spelling fixes e to i. R=kevmoo@google.com BUG= Review-Url: https://codereview.chromium.org/2957593002 . --- build/config/compiler/BUILD.gn | 2 +- .../benchmark/integration/input_converter.dart | 2 +- .../dart/imported_reference_contributor_test.dart | 2 +- .../dart/local_constructor_contributor_test.dart | 2 +- .../dart/local_reference_contributor_test.dart | 2 +- .../dart/type_member_contributor_test.dart | 2 +- pkg/analyzer/lib/dart/ast/ast.dart | 2 +- pkg/analyzer/lib/plugin/options.dart | 2 +- pkg/analyzer/lib/src/dart/element/type.dart | 2 +- .../lib/src/dart/resolver/inheritance_manager.dart | 4 ++-- pkg/analyzer/lib/src/error/codes.dart | 2 +- pkg/analyzer/lib/src/generated/element_resolver.dart | 2 +- pkg/analyzer/lib/src/generated/resolver.dart | 2 +- .../lib/src/summary/fasta/summary_builder.dart | 4 ++-- pkg/analyzer/lib/src/task/driver.dart | 2 +- pkg/analyzer/test/generated/parser_test.dart | 2 +- pkg/analyzer/test/src/task/strong/checker_test.dart | 2 +- pkg/compiler/README.md | 6 +++--- pkg/compiler/lib/src/closure.dart | 2 +- pkg/compiler/lib/src/elements/elements.dart | 6 +++--- pkg/compiler/lib/src/elements/resolution_types.dart | 2 +- pkg/compiler/lib/src/elements/types.dart | 2 +- pkg/compiler/lib/src/helpers/helpers.dart | 2 +- pkg/compiler/lib/src/inferrer/type_graph_nodes.dart | 4 ++-- .../lib/src/js_backend/custom_elements_analysis.dart | 2 +- pkg/compiler/lib/src/js_backend/namer.dart | 2 +- pkg/compiler/lib/src/js_backend/runtime_types.dart | 4 ++-- .../lib/src/js_emitter/class_stub_generator.dart | 2 +- .../lib/src/js_emitter/native_generator.dart | 2 +- .../lib/src/js_emitter/runtime_type_generator.dart | 2 +- .../lib/src/js_emitter/type_test_registry.dart | 2 +- pkg/compiler/lib/src/native/behavior.dart | 2 +- .../serialization/resolved_ast_serialization.dart | 2 +- pkg/compiler/lib/src/serialization/values.dart | 4 ++-- pkg/compiler/lib/src/ssa/builder.dart | 4 ++-- pkg/compiler/lib/src/ssa/builder_kernel.dart | 2 +- pkg/compiler/lib/src/ssa/types_propagation.dart | 2 +- pkg/compiler/lib/src/tree/nodes.dart | 2 +- pkg/dev_compiler/lib/src/js_ast/builder.dart | 2 +- pkg/dev_compiler/test/codegen/BenchmarkBase.dart | 2 +- .../input_sdk/lib/html/dart2js/html_dart2js.dart | 2 +- .../tool/input_sdk/patch/convert_patch.dart | 4 ++-- .../tool/input_sdk/private/ddc_runtime/classes.dart | 2 +- .../tool/input_sdk/private/native_typed_data.dart | 2 +- .../tool/input_sdk/private/string_helper.dart | 2 +- pkg/expect/lib/expect.dart | 2 +- pkg/front_end/lib/compiler_options.dart | 2 +- pkg/front_end/lib/src/base/library_info.dart | 2 +- pkg/front_end/lib/src/fasta/scanner/recover.dart | 2 +- .../fasta/type_inference/type_inference_engine.dart | 2 +- .../fasta/parser/token_stream_rewriter_test.dart | 2 +- pkg/js_ast/lib/src/builder.dart | 2 +- pkg/js_ast/lib/src/nodes.dart | 6 +++--- pkg/js_ast/lib/src/template.dart | 6 +++--- pkg/kernel/lib/ast.dart | 2 +- pkg/kernel/lib/transformations/async.dart | 2 +- pkg/kernel/lib/transformations/treeshaker.dart | 2 +- pkg/testing/lib/src/test_dart/path.dart | 2 +- pkg/typed_mock/lib/typed_mock.dart | 2 +- runtime/bin/directory_win.cc | 2 +- runtime/bin/platform_macos.cc | 4 ++-- runtime/bin/platform_win.cc | 2 +- runtime/bin/process_android.cc | 4 ++-- runtime/bin/socket_patch.dart | 2 +- runtime/bin/vmservice/loader.dart | 2 +- runtime/include/dart_api.h | 2 +- runtime/lib/object_patch.dart | 2 +- runtime/lib/timer_impl.dart | 2 +- .../observatory/lib/src/elements/script_inset.dart | 8 ++++---- .../observatory/lib/src/models/objects/error.dart | 2 +- runtime/observatory/lib/src/service/object.dart | 2 +- .../service/tcp_socket_closing_service_test.dart | 2 +- runtime/observatory/tests/service/test_helper.dart | 6 +++--- runtime/platform/utils.h | 2 +- runtime/vm/assembler_dbc_test.cc | 6 +++--- runtime/vm/ast_transformer.cc | 6 +++--- runtime/vm/constants_arm.h | 2 +- runtime/vm/constants_dbc.h | 6 +++--- runtime/vm/dart_api_impl.cc | 10 +++++----- runtime/vm/disassembler.h | 2 +- runtime/vm/intermediate_language.h | 2 +- runtime/vm/jit_optimizer.cc | 2 +- runtime/vm/native_arguments.h | 2 +- runtime/vm/object.h | 4 ++-- runtime/vm/object_test.cc | 2 +- runtime/vm/parser.cc | 12 ++++++------ runtime/vm/redundancy_elimination.cc | 2 +- runtime/vm/redundancy_elimination.h | 2 +- runtime/vm/runtime_entry.cc | 2 +- runtime/vm/scavenger.cc | 2 +- runtime/vm/scavenger.h | 2 +- runtime/vm/simulator_dbc.cc | 2 +- runtime/vm/snapshot_test.dart | 2 +- runtime/vm/stub_code_arm.cc | 2 +- runtime/vm/stub_code_ia32.cc | 4 ++-- runtime/vm/stub_code_x64.cc | 4 ++-- runtime/vm/thread_test.cc | 2 +- samples-dev/swarm/swarm_ui_lib/touch/Scrollbar.dart | 4 ++-- samples-dev/swarm/swarm_ui_lib/view/view.dart | 8 ++++---- sdk/lib/_internal/js_runtime/lib/convert_patch.dart | 4 ++-- sdk/lib/_internal/js_runtime/lib/js_helper.dart | 2 +- .../_internal/js_runtime/lib/native_typed_data.dart | 2 +- sdk/lib/_internal/js_runtime/lib/string_helper.dart | 2 +- sdk/lib/async/stream_impl.dart | 2 +- sdk/lib/core/num.dart | 4 ++-- sdk/lib/html/dart2js/html_dart2js.dart | 2 +- sdk/lib/html/dartium/html_dartium.dart | 4 ++-- sdk/lib/io/http_parser.dart | 2 +- sdk/lib/io/socket.dart | 2 +- sdk/lib/io/stdio.dart | 2 +- sdk/lib/js/dartium/js_dartium.dart | 4 ++-- tests/benchmark_smoke/benchmark_base.dart | 2 +- tests/compiler/dart2js/kernel/constructors_test.dart | 2 +- .../dart2js/simple_inferrer_final_field2_test.dart | 2 +- .../dart2js_extra/js_array_index_error_test.dart | 2 +- tests/compiler/dart2js_extra/switch_test.dart | 2 +- tests/corelib/list_test.dart | 2 +- tests/corelib/regexp/UC16_test.dart | 3 ++- .../corelib/regexp/invalid-range-in-class_test.dart | 2 +- tests/corelib/regexp/unicode-handling_test.dart | 2 +- tests/corelib/set_test.dart | 2 +- tests/corelib_strong/list_test.dart | 2 +- tests/corelib_strong/regexp/UC16_test.dart | 3 ++- .../regexp/invalid-range-in-class_test.dart | 2 +- .../corelib_strong/regexp/unicode-handling_test.dart | 2 +- tests/corelib_strong/set_test.dart | 2 +- tests/html/element_test.dart | 2 +- tests/language/abstract_runtime_error_test.dart | 2 +- tests/language/class_codegen_test.dart | 2 +- .../constructor_duplicate_initializers_test.dart | 2 +- tests/language/if_null_behavior_test.dart | 2 +- tests/language/if_null_evaluation_order_test.dart | 2 +- .../inst_field_initializer1_negative_test.dart | 2 +- tests/language/instance_inline_test.dart | 2 +- tests/language/named_parameters4_test.dart | 2 +- tests/language/named_parameters_aggregated_test.dart | 2 +- tests/language/static_inline_test.dart | 2 +- tests/language/type_variable_initializer_test.dart | 2 +- tests/language/vm/regress_29137_vm_test.dart | 2 +- .../language_strong/abstract_runtime_error_test.dart | 2 +- .../built_in_identifier_prefix_test.dart | 2 +- tests/language_strong/class_codegen_test.dart | 2 +- .../constructor_duplicate_initializers_test.dart | 2 +- tests/language_strong/if_null_behavior_test.dart | 2 +- .../if_null_evaluation_order_test.dart | 2 +- .../inst_field_initializer1_negative_test.dart | 2 +- tests/language_strong/instance_inline_test.dart | 2 +- tests/language_strong/named_parameters4_test.dart | 2 +- .../named_parameters_aggregated_test.dart | 2 +- tests/language_strong/static_inline_test.dart | 2 +- .../type_variable_initializer_test.dart | 2 +- tests/lib/async/stream_state_helper.dart | 2 +- tests/lib/async/zone_bind_callback_unary_test.dart | 2 +- tests/lib/math/math_parse_double_test.dart | 4 ++-- tests/lib_strong/async/stream_state_helper.dart | 2 +- .../async/zone_bind_callback_unary_test.dart | 2 +- tests/lib_strong/html/debugger_test.dart | 2 +- tests/lib_strong/html/element_test.dart | 2 +- .../io/skipping_dart2js_compilations_test.dart | 4 ++-- tools/dom/src/KeyboardEventStream.dart | 2 +- tools/dom/src/native_DOMImplementation.dart | 2 +- tools/testing/dart/path.dart | 2 +- tools/testing/dart/test_suite.dart | 3 ++- utils/peg/pegparser.dart | 2 +- 164 files changed, 217 insertions(+), 214 deletions(-) diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn index 6370dcdf0d9..d651e4ff719 100644 --- a/build/config/compiler/BUILD.gn +++ b/build/config/compiler/BUILD.gn @@ -164,7 +164,7 @@ config("compiler") { ldflags += common_mac_flags } else if (is_posix) { # CPU architecture. We may or may not be doing a cross compile now, so for - # simplicity we always explicitly set the architecture. + # simplicitly we always explicitly set the architecture. if (current_cpu == "x64") { cflags += [ "-m64", diff --git a/pkg/analysis_server/benchmark/integration/input_converter.dart b/pkg/analysis_server/benchmark/integration/input_converter.dart index da22f107646..8db70ad6c12 100644 --- a/pkg/analysis_server/benchmark/integration/input_converter.dart +++ b/pkg/analysis_server/benchmark/integration/input_converter.dart @@ -269,7 +269,7 @@ abstract class CommonInputConverter extends Converter { /** * [InputConverter] converts an input stream * into a series of operations to be sent to the analysis server. - * The input stream can be either an instrumenation or log file. + * The input stream can be either an instrumentation or log file. */ class InputConverter extends Converter { final Logger logger = new Logger('InputConverter'); diff --git a/pkg/analysis_server/test/services/completion/dart/imported_reference_contributor_test.dart b/pkg/analysis_server/test/services/completion/dart/imported_reference_contributor_test.dart index 7eff2180683..24a2c60398f 100644 --- a/pkg/analysis_server/test/services/completion/dart/imported_reference_contributor_test.dart +++ b/pkg/analysis_server/test/services/completion/dart/imported_reference_contributor_test.dart @@ -2054,7 +2054,7 @@ int myFunc() {} } test_FieldFormalParameter_in_non_constructor() async { - // SimpleIdentifer FieldFormalParameter FormalParameterList + // SimpleIdentifier FieldFormalParameter FormalParameterList addTestSource('class A {B(this.^foo) {}}'); await computeSuggestions(); expect(replacementOffset, completionOffset); diff --git a/pkg/analysis_server/test/services/completion/dart/local_constructor_contributor_test.dart b/pkg/analysis_server/test/services/completion/dart/local_constructor_contributor_test.dart index db4c1dd781f..dfef73b9bd8 100644 --- a/pkg/analysis_server/test/services/completion/dart/local_constructor_contributor_test.dart +++ b/pkg/analysis_server/test/services/completion/dart/local_constructor_contributor_test.dart @@ -1882,7 +1882,7 @@ class C {foo(){^} void bar() {}}'''); } test_FieldFormalParameter_in_non_constructor() async { - // SimpleIdentifer FieldFormalParameter FormalParameterList + // SimpleIdentifier FieldFormalParameter FormalParameterList addTestSource('class A {B(this.^foo) {}}'); await computeSuggestions(); diff --git a/pkg/analysis_server/test/services/completion/dart/local_reference_contributor_test.dart b/pkg/analysis_server/test/services/completion/dart/local_reference_contributor_test.dart index ba07b89ac79..f2b6e7cee41 100644 --- a/pkg/analysis_server/test/services/completion/dart/local_reference_contributor_test.dart +++ b/pkg/analysis_server/test/services/completion/dart/local_reference_contributor_test.dart @@ -2370,7 +2370,7 @@ class C {foo(){^} void bar() {}}'''); } test_FieldFormalParameter_in_non_constructor() async { - // SimpleIdentifer FieldFormalParameter FormalParameterList + // SimpleIdentifier FieldFormalParameter FormalParameterList addTestSource('class A {B(this.^foo) {}}'); await computeSuggestions(); diff --git a/pkg/analysis_server/test/services/completion/dart/type_member_contributor_test.dart b/pkg/analysis_server/test/services/completion/dart/type_member_contributor_test.dart index 1613079f480..1622f89d493 100644 --- a/pkg/analysis_server/test/services/completion/dart/type_member_contributor_test.dart +++ b/pkg/analysis_server/test/services/completion/dart/type_member_contributor_test.dart @@ -1891,7 +1891,7 @@ void main() {new A().f^}'''); } test_FieldFormalParameter_in_non_constructor() async { - // SimpleIdentifer FieldFormalParameter FormalParameterList + // SimpleIdentifier FieldFormalParameter FormalParameterList addTestSource('class A {B(this.^foo) {}}'); await computeSuggestions(); expect(replacementOffset, completionOffset); diff --git a/pkg/analyzer/lib/dart/ast/ast.dart b/pkg/analyzer/lib/dart/ast/ast.dart index 2af93577cae..3d6cd2878dc 100644 --- a/pkg/analyzer/lib/dart/ast/ast.dart +++ b/pkg/analyzer/lib/dart/ast/ast.dart @@ -4964,7 +4964,7 @@ abstract class MethodInvocation extends InvocationExpression { } /** - * An expression that implicity makes reference to a method. + * An expression that implicitly makes reference to a method. * * Clients may not extend, implement or mix-in this class. */ diff --git a/pkg/analyzer/lib/plugin/options.dart b/pkg/analyzer/lib/plugin/options.dart index f884df59577..e0ce5f421c2 100644 --- a/pkg/analyzer/lib/plugin/options.dart +++ b/pkg/analyzer/lib/plugin/options.dart @@ -12,7 +12,7 @@ import 'package:yaml/yaml.dart'; /// Validates options as defined in an analysis options file. /// /// The options file format is intentionally very open-ended, giving clients -/// utmost flexibility in defining their own options. The only hardfast +/// utmost flexibility in defining their own options. The only hard and fast /// expectation is that options files will contain a mapping from Strings /// (identifying 'scopes') to associated options. For example, the given /// content diff --git a/pkg/analyzer/lib/src/dart/element/type.dart b/pkg/analyzer/lib/src/dart/element/type.dart index 5462ac60100..8857a95b809 100644 --- a/pkg/analyzer/lib/src/dart/element/type.dart +++ b/pkg/analyzer/lib/src/dart/element/type.dart @@ -2151,7 +2151,7 @@ class InterfaceTypeImpl extends TypeImpl implements InterfaceType { _computeSuperinterfaceSet(type, new HashSet()); /** - * Return the type from the [types] list that has the longest inheritence path + * Return the type from the [types] list that has the longest inheritance path * to Object of unique length. */ static InterfaceType computeTypeAtMaxUniqueDepth(List types) { diff --git a/pkg/analyzer/lib/src/dart/resolver/inheritance_manager.dart b/pkg/analyzer/lib/src/dart/resolver/inheritance_manager.dart index 7e3c978f1d1..04c8f94d569 100644 --- a/pkg/analyzer/lib/src/dart/resolver/inheritance_manager.dart +++ b/pkg/analyzer/lib/src/dart/resolver/inheritance_manager.dart @@ -800,12 +800,12 @@ class InheritanceManager { // we create a warning, and have this class inherit nothing. // if (!classHasMember) { - String firstTwoFuntionTypesStr = + String firstTwoFunctionTypesStr = "${executableElementTypes[0]}, ${executableElementTypes[1]}"; _reportError( classElt, StaticTypeWarningCode.INCONSISTENT_METHOD_INHERITANCE, - [key, firstTwoFuntionTypesStr]); + [key, firstTwoFunctionTypesStr]); } } else { // diff --git a/pkg/analyzer/lib/src/error/codes.dart b/pkg/analyzer/lib/src/error/codes.dart index 9a04fd2e9e8..b2fd9ea9934 100644 --- a/pkg/analyzer/lib/src/error/codes.dart +++ b/pkg/analyzer/lib/src/error/codes.dart @@ -2948,7 +2948,7 @@ class StaticTypeWarningCode extends ErrorCode { "The function '{0}' isn't defined.", "Try importing the library that defines '{0}', " "correcting the name to the name of an existing function, or " - "defining a funtion named '{0}'."); + "defining a function named '{0}'."); /** * 12.17 Getter Invocation: Let T be the static type of e. It is diff --git a/pkg/analyzer/lib/src/generated/element_resolver.dart b/pkg/analyzer/lib/src/generated/element_resolver.dart index b0002b1107a..916e97480a6 100644 --- a/pkg/analyzer/lib/src/generated/element_resolver.dart +++ b/pkg/analyzer/lib/src/generated/element_resolver.dart @@ -2223,7 +2223,7 @@ class ElementResolver extends SimpleAstVisitor { * invoked with the arguments. The [target] is the target of the invocation * ('e'). The [targetType] is the type of the target. The [methodName] is th * name of the method being invoked ('m'). [isConditional] indicates - * whether the invocatoin uses a '?.' operator. + * whether the invocation uses a '?.' operator. */ Element _resolveInvokedElementWithTarget(Expression target, DartType targetType, SimpleIdentifier methodName, bool isConditional) { diff --git a/pkg/analyzer/lib/src/generated/resolver.dart b/pkg/analyzer/lib/src/generated/resolver.dart index 9defce47bea..b850835427c 100644 --- a/pkg/analyzer/lib/src/generated/resolver.dart +++ b/pkg/analyzer/lib/src/generated/resolver.dart @@ -1857,7 +1857,7 @@ class ConstantVerifier extends RecursiveAstVisitor { Expression initializer = variableDeclaration.initializer; if (initializer != null) { // Ignore any errors produced during validation--if the constant - // can't be eavluated we'll just report a single error. + // can't be evaluated we'll just report a single error. AnalysisErrorListener errorListener = AnalysisErrorListener.NULL_LISTENER; ErrorReporter subErrorReporter = diff --git a/pkg/analyzer/lib/src/summary/fasta/summary_builder.dart b/pkg/analyzer/lib/src/summary/fasta/summary_builder.dart index 4ab016cbff0..5233cd5f01b 100644 --- a/pkg/analyzer/lib/src/summary/fasta/summary_builder.dart +++ b/pkg/analyzer/lib/src/summary/fasta/summary_builder.dart @@ -182,7 +182,7 @@ class ConstExpressionBuilder extends ExpressionListener { // bit-masks to encode async modifiers as bits on an int. -/// Parser listener to build simplified AST expresions. +/// Parser listener to build simplified AST expressions. /// /// The parser produces different trees depending on whether it is used for /// constants or initializers, so subclasses specialize the logic accordingly. @@ -197,7 +197,7 @@ abstract class ExpressionListener extends StackListener { /// Whether this listener is used to build const expressions. bool get forConst => false; - /// Whether to ignore the next reduction. Used to ignore nested expresions + /// Whether to ignore the next reduction. Used to ignore nested expressions /// that are either invalid (in constants) or unnecessary (for initializers). bool get ignore => _withinFunction > 0 || _withinCascades > 0; diff --git a/pkg/analyzer/lib/src/task/driver.dart b/pkg/analyzer/lib/src/task/driver.dart index a9a8beaf480..c92370d7eac 100644 --- a/pkg/analyzer/lib/src/task/driver.dart +++ b/pkg/analyzer/lib/src/task/driver.dart @@ -229,7 +229,7 @@ class AnalysisDriver { */ bool performAnalysisTask() { // - // TODO(brianwilkerson) This implementaiton does not allow us to prioritize + // TODO(brianwilkerson) This implementation does not allow us to prioritize // work across contexts. What we need is a way for an external client to ask // to have all priority files analyzed for each context, then ask for normal // files to be analyzed. There are a couple of ways to do this. diff --git a/pkg/analyzer/test/generated/parser_test.dart b/pkg/analyzer/test/generated/parser_test.dart index cb2e50cef9e..57be2145924 100644 --- a/pkg/analyzer/test/generated/parser_test.dart +++ b/pkg/analyzer/test/generated/parser_test.dart @@ -4155,7 +4155,7 @@ main() { parseExpression("f()++", [ParserErrorCode.UNEXPECTED_TOKEN]); } - void test_unexpectedToken_returnInExpressionFuntionBody() { + void test_unexpectedToken_returnInExpressionFunctionBody() { parseCompilationUnit( "f() => return null;", [ParserErrorCode.UNEXPECTED_TOKEN]); } diff --git a/pkg/analyzer/test/src/task/strong/checker_test.dart b/pkg/analyzer/test/src/task/strong/checker_test.dart index 4cfbe63c41e..bbe48de7aa6 100644 --- a/pkg/analyzer/test/src/task/strong/checker_test.dart +++ b/pkg/analyzer/test/src/task/strong/checker_test.dart @@ -349,7 +349,7 @@ test() { '''); } - test_constantGenericTypeArg_explict() async { + test_constantGenericTypeArg_explicit() async { // Regression test for https://github.com/dart-lang/sdk/issues/26141 await checkFile(''' abstract class Equality {} diff --git a/pkg/compiler/README.md b/pkg/compiler/README.md index f6ed02d62ea..8841b154b49 100644 --- a/pkg/compiler/README.md +++ b/pkg/compiler/README.md @@ -242,7 +242,7 @@ revisited AI: change how we build the SDK to launch dart2js from here, most logic might remain inside `lib/src/dart2js.dart` for testing purposes. -* `bin/resolver.dart`: an experiemntal binary we used to run the resolver and +* `bin/resolver.dart`: an experimental binary we used to run the resolver and serializer. As we are moving to work on top of kernel this is deprecated and should be deleted. @@ -268,7 +268,7 @@ library during `pub-build` and `pub-serve`. is another), and delete the legacy API. **lib/src folder**: most of the compiler lives here, as very little of its -funtionality is publicly exposed. +functionality is publicly exposed. * `lib/src/dart2js.dart`: the command-line script that runs dart2js. When @@ -362,7 +362,7 @@ funtionality is publicly exposed. expressions may be folded. Different implementations of the constant system are used to target Dart or JavaScript. - * `lib/src/compile_time_constants.dart`: defines how constant expresions are + * `lib/src/compile_time_constants.dart`: defines how constant expressions are created from a parsed AST. * `lib/src/constant_system_dart.dart`: defines an implementation of a constant diff --git a/pkg/compiler/lib/src/closure.dart b/pkg/compiler/lib/src/closure.dart index fe91dc9434b..9ad557d071e 100644 --- a/pkg/compiler/lib/src/closure.dart +++ b/pkg/compiler/lib/src/closure.dart @@ -1072,7 +1072,7 @@ class ClosureTranslator extends Visitor { // In checked mode, using a type variable in a type annotation may lead // to a runtime type check that needs to access the type argument and // therefore the closure needs a this-element, if it is not in a field - // initializer; field initatializers are evaluated in a context where + // initializer; field initializers are evaluated in a context where // the type arguments are available in locals. registerNeedsThis(); } diff --git a/pkg/compiler/lib/src/elements/elements.dart b/pkg/compiler/lib/src/elements/elements.dart index ba4bdf0df8c..6b685edbe98 100644 --- a/pkg/compiler/lib/src/elements/elements.dart +++ b/pkg/compiler/lib/src/elements/elements.dart @@ -557,7 +557,7 @@ class Elements { * For non-operator names, this method just returns its input. * * The results returned from this method are guaranteed to be valid - * JavaScript identifers, except it may include reserved words for + * JavaScript identifiers, except it may include reserved words for * non-operator names. */ static String operatorNameToIdentifier(String name) { @@ -1823,11 +1823,11 @@ abstract class MemberSignature { /// parameters. ResolutionFunctionType get functionType; - /// Returns `true` if this member is a getter, possibly implictly defined by a + /// Returns `true` if this member is a getter, possibly implicitly defined by a /// field declaration. bool get isGetter; - /// Returns `true` if this member is a setter, possibly implictly defined by a + /// Returns `true` if this member is a setter, possibly implicitly defined by a /// field declaration. bool get isSetter; diff --git a/pkg/compiler/lib/src/elements/resolution_types.dart b/pkg/compiler/lib/src/elements/resolution_types.dart index 050914f2139..811652baf56 100644 --- a/pkg/compiler/lib/src/elements/resolution_types.dart +++ b/pkg/compiler/lib/src/elements/resolution_types.dart @@ -96,7 +96,7 @@ abstract class ResolutionDartType implements DartType { */ ResolutionDartType get userProvidedBadType => null; - /// Is [: true :] if this type has no explict type arguments. + /// Is [: true :] if this type has no explicit type arguments. bool get isRaw => true; /// Returns the raw version of this type. diff --git a/pkg/compiler/lib/src/elements/types.dart b/pkg/compiler/lib/src/elements/types.dart index 260ab3479c4..136fb27caee 100644 --- a/pkg/compiler/lib/src/elements/types.dart +++ b/pkg/compiler/lib/src/elements/types.dart @@ -18,7 +18,7 @@ import 'entities.dart'; /// /// Current only 'resolution_types.dart' implement this hierarchy but when the /// compiler moves to use [Entity] instead of [Element] this hierarchy can be -/// implementated directly but other entity systems, for instance based directly +/// implemented directly but other entity systems, for instance based directly /// on kernel ir without the need for [Element]. abstract class DartType { diff --git a/pkg/compiler/lib/src/helpers/helpers.dart b/pkg/compiler/lib/src/helpers/helpers.dart index f8f617f1178..2182fc0ffeb 100644 --- a/pkg/compiler/lib/src/helpers/helpers.dart +++ b/pkg/compiler/lib/src/helpers/helpers.dart @@ -40,7 +40,7 @@ _DebugIndentation _indentation = new _DebugIndentation(); /// Function signature of [debugPrint]. typedef DebugPrint(s); -/// If [DEBUG_PRINT_ENABLED] is `true` print [s] using the current identation. +/// If [DEBUG_PRINT_ENABLED] is `true` print [s] using the current indentation. DebugPrint get debugPrint { enableDebugMode(); // TODO(johnniwinther): Maybe disable debug mode after the call. diff --git a/pkg/compiler/lib/src/inferrer/type_graph_nodes.dart b/pkg/compiler/lib/src/inferrer/type_graph_nodes.dart index 5d983caf5b0..e838943550a 100644 --- a/pkg/compiler/lib/src/inferrer/type_graph_nodes.dart +++ b/pkg/compiler/lib/src/inferrer/type_graph_nodes.dart @@ -383,7 +383,7 @@ class MemberTypeInformation extends ElementTypeInformation /** * If [element] is a function, [closurizedCount] is the number of - * times it is closurized. The value gets updated while infering. + * times it is closurized. The value gets updated while inferring. */ int closurizedCount = 0; @@ -456,7 +456,7 @@ class MemberTypeInformation extends ElementTypeInformation // Closurized methods never become stable to ensure that the information in // [users] is accurate. The inference stops tracking users for stable types. // Note that we only override the getter, the setter will still modify the - // state of the [isStable] field inhertied from [TypeInformation]. + // state of the [isStable] field inherited from [TypeInformation]. bool get isStable => super.isStable && !isClosurized; TypeMask handleSpecialCases(InferrerEngine inferrer) { diff --git a/pkg/compiler/lib/src/js_backend/custom_elements_analysis.dart b/pkg/compiler/lib/src/js_backend/custom_elements_analysis.dart index cedeeedb116..29c6db81766 100644 --- a/pkg/compiler/lib/src/js_backend/custom_elements_analysis.dart +++ b/pkg/compiler/lib/src/js_backend/custom_elements_analysis.dart @@ -205,7 +205,7 @@ class CustomElementsAnalysisJoin { escapingConstructors .forEach(_backendUsageBuilder.registerGlobalFunctionDependency); } - // Force the generaton of the type constant that is the key to an entry + // Force the generation of the type constant that is the key to an entry // in the generated table. ConstantValue constant = _makeTypeConstant(cls); impactBuilder diff --git a/pkg/compiler/lib/src/js_backend/namer.dart b/pkg/compiler/lib/src/js_backend/namer.dart index 798e8274bd9..8eb80dc29ac 100644 --- a/pkg/compiler/lib/src/js_backend/namer.dart +++ b/pkg/compiler/lib/src/js_backend/namer.dart @@ -1919,7 +1919,7 @@ class ConstantNamingVisitor implements ConstantValueVisitor { if (name == 'index') { indexField = field; } else if (name == '_name') { - // Ingore _name field. + // Ignore _name field. } else { indexField = null; break; diff --git a/pkg/compiler/lib/src/js_backend/runtime_types.dart b/pkg/compiler/lib/src/js_backend/runtime_types.dart index 01050c3f80d..0fbdff172bd 100644 --- a/pkg/compiler/lib/src/js_backend/runtime_types.dart +++ b/pkg/compiler/lib/src/js_backend/runtime_types.dart @@ -108,7 +108,7 @@ abstract class RuntimeTypesSubstitutions { Substitution getSubstitution(ClassEntity cls, ClassEntity other); /// Compute the required type checks and substitutions for the given - /// instantitated and checked classes. + /// instantiated and checked classes. TypeChecks computeChecks( Set instantiated, Set checked); @@ -944,7 +944,7 @@ class RuntimeTypesEncoderImpl implements RuntimeTypesEncoder { // adding ground-term type parameters, as they would just be 'dynamic'. // TODO(sra): Since the result string is used only in constructing constant // names, it would result in more readable names if the final string was a - // legal JavaScript identifer. + // legal JavaScript identifier. if (interface.typeArguments.isEmpty) return name; String arguments = new List.filled(interface.typeArguments.length, 'dynamic').join(', '); diff --git a/pkg/compiler/lib/src/js_emitter/class_stub_generator.dart b/pkg/compiler/lib/src/js_emitter/class_stub_generator.dart index 1441f9aa82b..a346fcf5bed 100644 --- a/pkg/compiler/lib/src/js_emitter/class_stub_generator.dart +++ b/pkg/compiler/lib/src/js_emitter/class_stub_generator.dart @@ -87,7 +87,7 @@ class ClassStubGenerator { Map generateCallStubsForGetter( MemberEntity member, Map selectors) { // If the method is intercepted, the stub gets the - // receiver explicitely and we need to pass it to the getter call. + // receiver explicitly and we need to pass it to the getter call. bool isInterceptedMethod = _interceptorData.isInterceptedMethod(member); bool isInterceptedClass = _interceptorData.isInterceptedClass(member.enclosingClass); diff --git a/pkg/compiler/lib/src/js_emitter/native_generator.dart b/pkg/compiler/lib/src/js_emitter/native_generator.dart index 2b6b33dee08..65ae253f3bc 100644 --- a/pkg/compiler/lib/src/js_emitter/native_generator.dart +++ b/pkg/compiler/lib/src/js_emitter/native_generator.dart @@ -19,7 +19,7 @@ class NativeGenerator { /// Generates the code for isolate affinity tags. /// - /// Independently Dart programs on the same page must not interfer and + /// Independently Dart programs on the same page must not interfere and /// this code sets up the variables needed to guarantee that behavior. static jsAst.Statement generateIsolateAffinityTagInitialization( BackendUsage backendUsage, diff --git a/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart b/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart index 692676b5844..7ec2c9afcfd 100644 --- a/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart +++ b/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart @@ -298,7 +298,7 @@ class RuntimeTypeGenerator { if (call != null && call.isFunction) { FunctionElement callFunction = call; // A superclass might already implement the Function interface. In such - // a case, we can avoid emiting the is test here. + // a case, we can avoid emitting the is test here. if (!cls.superclass.implementsFunction(_commonElements)) { _generateInterfacesIsTests(_commonElements.functionClass, generateIsTest, generateSubstitution, generated); diff --git a/pkg/compiler/lib/src/js_emitter/type_test_registry.dart b/pkg/compiler/lib/src/js_emitter/type_test_registry.dart index 2fd279dfb63..5938c6979d2 100644 --- a/pkg/compiler/lib/src/js_emitter/type_test_registry.dart +++ b/pkg/compiler/lib/src/js_emitter/type_test_registry.dart @@ -34,7 +34,7 @@ class TypeTestRegistry { Set checkedClasses; /** - * The set of function types that checked, both explicity through tests of + * The set of function types that checked, both explicitly through tests of * typedefs and implicitly through type annotations in checked mode. */ Set checkedFunctionTypes; diff --git a/pkg/compiler/lib/src/native/behavior.dart b/pkg/compiler/lib/src/native/behavior.dart index 3c950cc9e54..ea4e80f95c1 100644 --- a/pkg/compiler/lib/src/native/behavior.dart +++ b/pkg/compiler/lib/src/native/behavior.dart @@ -907,7 +907,7 @@ abstract class BehaviorBuilder { return types; } - /// Models the behavior of having intances of [type] escape from Dart code + /// Models the behavior of having instances of [type] escape from Dart code /// into native code. void _escape(DartType type) { if (type is ResolutionDartType) { diff --git a/pkg/compiler/lib/src/serialization/resolved_ast_serialization.dart b/pkg/compiler/lib/src/serialization/resolved_ast_serialization.dart index 954d9e907ca..c93a709786e 100644 --- a/pkg/compiler/lib/src/serialization/resolved_ast_serialization.dart +++ b/pkg/compiler/lib/src/serialization/resolved_ast_serialization.dart @@ -389,7 +389,7 @@ class ResolvedAstDeserializer { int charOffset = objectDecoder.getInt(Key.OFFSET); Token beginToken = getBeginToken(uri, charOffset); if (beginToken == null) { - // TODO(johnniwinther): Handle unfound tokens by adding an erronous + // TODO(johnniwinther): Handle unfound tokens by adding an erroneous // resolved ast kind. reporter.internalError( element, "No token found for $element in $uri @ $charOffset"); diff --git a/pkg/compiler/lib/src/serialization/values.dart b/pkg/compiler/lib/src/serialization/values.dart index cebbe18315c..e0c712b93f9 100644 --- a/pkg/compiler/lib/src/serialization/values.dart +++ b/pkg/compiler/lib/src/serialization/values.dart @@ -2,7 +2,7 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -/// Class hiarchy for semantic wrapping of serializable values. +/// Class hierarchy for semantic wrapping of serializable values. library dart2js.serialization.values; @@ -32,7 +32,7 @@ import 'keys.dart'; /// The distinction between map and object values is chosen to provide a more /// robust and checkable implementation of the latter; since the keys are drawn /// from a fixed typed set of values, consistency between serialization and -/// deserialization is easierly maintained. +/// deserialization is more easily maintained. abstract class Value { accept(ValueVisitor visitor, arg); } diff --git a/pkg/compiler/lib/src/ssa/builder.dart b/pkg/compiler/lib/src/ssa/builder.dart index ccb29e5fbfb..d72f5e2e2c9 100644 --- a/pkg/compiler/lib/src/ssa/builder.dart +++ b/pkg/compiler/lib/src/ssa/builder.dart @@ -6229,7 +6229,7 @@ class SsaAstGraphBuilder extends ast.Visitor endFinallyBlock.addSuccessor(exitBlock); // If a block inside try/catch aborts (eg with a return statement), - // we explicitely mark this block a predecessor of the catch + // we explicitly mark this block a predecessor of the catch // block and the finally block. addExitTrySuccessor(startFinallyBlock); @@ -6437,7 +6437,7 @@ class SsaAstGraphBuilder extends ast.Visitor } // If a block inside try/catch aborts (eg with a return statement), - // we explicitely mark this block a predecessor of the catch + // we explicitly mark this block a predecessor of the catch // block and the finally block. addExitTrySuccessor(startCatchBlock); addExitTrySuccessor(startFinallyBlock); diff --git a/pkg/compiler/lib/src/ssa/builder_kernel.dart b/pkg/compiler/lib/src/ssa/builder_kernel.dart index 535bdb478b6..5667106c95b 100644 --- a/pkg/compiler/lib/src/ssa/builder_kernel.dart +++ b/pkg/compiler/lib/src/ssa/builder_kernel.dart @@ -3360,7 +3360,7 @@ class TryCatchFinallyBuilder { endFinallyBlock?.addSuccessor(exitBlock); // If a block inside try/catch aborts (eg with a return statement), - // we explicitely mark this block a predecessor of the catch + // we explicitly mark this block a predecessor of the catch // block and the finally block. _addExitTrySuccessor(startCatchBlock); _addExitTrySuccessor(startFinallyBlock); diff --git a/pkg/compiler/lib/src/ssa/types_propagation.dart b/pkg/compiler/lib/src/ssa/types_propagation.dart index f3986296455..0a056991878 100644 --- a/pkg/compiler/lib/src/ssa/types_propagation.dart +++ b/pkg/compiler/lib/src/ssa/types_propagation.dart @@ -370,7 +370,7 @@ class SsaTypePropagator extends HBaseVisitor implements OptimizationPhase { TypeMask receiverType = receiver.instructionType; instruction.mask = receiverType; - // Try to specialize the receiver after this call by instering a refinement + // Try to specialize the receiver after this call by inserting a refinement // node (HTypeKnown). There are two potentially expensive tests - are there // any uses of the receiver dominated by and following this call?, and what // is the refined type? The first is expensive if the receiver has many diff --git a/pkg/compiler/lib/src/tree/nodes.dart b/pkg/compiler/lib/src/tree/nodes.dart index 4f8d31232a4..e9816bdc859 100644 --- a/pkg/compiler/lib/src/tree/nodes.dart +++ b/pkg/compiler/lib/src/tree/nodes.dart @@ -1284,7 +1284,7 @@ class StringQuoting { const StringQuoting($SQ, raw: true, leftQuoteLength: 3), const StringQuoting($DQ, raw: false, leftQuoteLength: 3), const StringQuoting($DQ, raw: true, leftQuoteLength: 3), - // Leading single whitespace or espaped newline. + // Leading single whitespace or escaped newline. const StringQuoting($SQ, raw: false, leftQuoteLength: 4), const StringQuoting($SQ, raw: true, leftQuoteLength: 4), const StringQuoting($DQ, raw: false, leftQuoteLength: 4), diff --git a/pkg/dev_compiler/lib/src/js_ast/builder.dart b/pkg/dev_compiler/lib/src/js_ast/builder.dart index 9239aeaedde..1101b7de42d 100644 --- a/pkg/dev_compiler/lib/src/js_ast/builder.dart +++ b/pkg/dev_compiler/lib/src/js_ast/builder.dart @@ -421,7 +421,7 @@ class MiniJsParserError { /// * brackets. /// * var declarations. /// * operator precedence. -/// * anonymous funtions and named function expressions and declarations. +/// * anonymous functions and named function expressions and declarations. /// Notable things it can't do yet include: /// * some statements are still missing (do-while, while, switch). /// diff --git a/pkg/dev_compiler/test/codegen/BenchmarkBase.dart b/pkg/dev_compiler/test/codegen/BenchmarkBase.dart index 949f6b85124..c6612c76dbe 100644 --- a/pkg/dev_compiler/test/codegen/BenchmarkBase.dart +++ b/pkg/dev_compiler/test/codegen/BenchmarkBase.dart @@ -38,7 +38,7 @@ class BenchmarkBase { run(); } - // Exercices the benchmark. By default invokes [run] 10 times. + // Exercises the benchmark. By default invokes [run] 10 times. void exercise() { for (int i = 0; i < 10; i++) { run(); diff --git a/pkg/dev_compiler/tool/input_sdk/lib/html/dart2js/html_dart2js.dart b/pkg/dev_compiler/tool/input_sdk/lib/html/dart2js/html_dart2js.dart index d0cb36a5678..248f8aab63f 100644 --- a/pkg/dev_compiler/tool/input_sdk/lib/html/dart2js/html_dart2js.dart +++ b/pkg/dev_compiler/tool/input_sdk/lib/html/dart2js/html_dart2js.dart @@ -44845,7 +44845,7 @@ class _KeyboardEventHandler extends EventStreamProvider { // Opera reports the character code in the keyCode field. e._shadowCharCode = KeyCode.isCharacterKey(e.keyCode) ? e.keyCode : 0; } - // Now we guestimate about what the keycode is that was actually + // Now we guesstimate about what the keycode is that was actually // pressed, given previous keydown information. e._shadowKeyCode = _determineKeyCodeForKeypress(e); diff --git a/pkg/dev_compiler/tool/input_sdk/patch/convert_patch.dart b/pkg/dev_compiler/tool/input_sdk/patch/convert_patch.dart index 2b8a38e876d..8306c782a1d 100644 --- a/pkg/dev_compiler/tool/input_sdk/patch/convert_patch.dart +++ b/pkg/dev_compiler/tool/input_sdk/patch/convert_patch.dart @@ -58,7 +58,7 @@ _convertJsonToDart(json, reviver(key, value)) { return e; } - // This test is needed to avoid identifing '{"__proto__":[]}' as an Array. + // This test is needed to avoid identifying '{"__proto__":[]}' as an Array. // TODO(sra): Replace this test with cheaper '#.constructor === Array' when // bug 621 below is fixed. if (JS('bool', 'Object.getPrototypeOf(#) === Array.prototype', e)) { @@ -103,7 +103,7 @@ _convertJsonToDartLazy(object) { return object; } - // This test is needed to avoid identifing '{"__proto__":[]}' as an array. + // This test is needed to avoid identifying '{"__proto__":[]}' as an array. // TODO(sra): Replace this test with cheaper '#.constructor === Array' when // bug https://code.google.com/p/v8/issues/detail?id=621 is fixed. if (JS('bool', 'Object.getPrototypeOf(#) !== Array.prototype', object)) { diff --git a/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/classes.dart b/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/classes.dart index 6d3de87bb78..63c95c4272f 100644 --- a/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/classes.dart +++ b/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/classes.dart @@ -334,7 +334,7 @@ _setStaticTypes(f, names) => JS( /// methods: A function returning an object mapping method names /// to method types. The function is evaluated lazily and cached. /// statics: A function returning an object mapping static method -/// names to types. The function is evalutated lazily and cached. +/// names to types. The function is evaluated lazily and cached. /// names: An array of the names of the static methods. Used to /// permit eagerly setting the runtimeType field on the methods /// while still lazily computing the type descriptor object. diff --git a/pkg/dev_compiler/tool/input_sdk/private/native_typed_data.dart b/pkg/dev_compiler/tool/input_sdk/private/native_typed_data.dart index 2a581548e6a..73b1741dd18 100644 --- a/pkg/dev_compiler/tool/input_sdk/private/native_typed_data.dart +++ b/pkg/dev_compiler/tool/input_sdk/private/native_typed_data.dart @@ -1885,7 +1885,7 @@ bool _isInvalidArrayIndex(int index) { /// Checks that [index] is a valid index into [list] which has length [length]. /// -/// That is, [index] is an insteger in the range `0..length - 1`. +/// That is, [index] is an integer in the range `0..length - 1`. void _checkValidIndex(int index, List list, int length) { if (_isInvalidArrayIndex(index) || JS('int', '#', index) >= length) { throw diagnoseIndexError(list, index); diff --git a/pkg/dev_compiler/tool/input_sdk/private/string_helper.dart b/pkg/dev_compiler/tool/input_sdk/private/string_helper.dart index 704cdb53278..2f106e13764 100644 --- a/pkg/dev_compiler/tool/input_sdk/private/string_helper.dart +++ b/pkg/dev_compiler/tool/input_sdk/private/string_helper.dart @@ -178,7 +178,7 @@ String stringReplaceAllFuncUnchecked(String receiver, Pattern pattern, return stringReplaceAllStringFuncUnchecked( receiver, pattern, onMatch, onNonMatch); } - // Placing the Pattern test here is indistingishable from placing it at the + // Placing the Pattern test here is indistinguishable from placing it at the // top of the method but it saves an extra check on the `pattern is String` // path. if (pattern is! Pattern) { diff --git a/pkg/expect/lib/expect.dart b/pkg/expect/lib/expect.dart index 8e312063943..3becc94b9db 100644 --- a/pkg/expect/lib/expect.dart +++ b/pkg/expect/lib/expect.dart @@ -440,7 +440,7 @@ class Expect { [_CheckExceptionFn check = null, String reason = null]) { String msg = reason == null ? "" : "($reason)"; if (f is! _Nullary) { - // Only throws from executing the funtion body should count as throwing. + // Only throws from executing the function body should count as throwing. // The failure to even call `f` should throw outside the try/catch. _fail("Expect.throws$msg: Function f not callable with zero arguments"); } diff --git a/pkg/front_end/lib/compiler_options.dart b/pkg/front_end/lib/compiler_options.dart index acc4e11ffbd..c360ee152c6 100644 --- a/pkg/front_end/lib/compiler_options.dart +++ b/pkg/front_end/lib/compiler_options.dart @@ -122,7 +122,7 @@ class CompilerOptions { /// are covered by summary files. /// /// When this option is true, these APIs will treat any dependency that is - /// not described in a summary as if it was explictly listed as an input. + /// not described in a summary as if it was explicitly listed as an input. bool chaseDependencies = false; /// Whether to interpret Dart sources in strong-mode. diff --git a/pkg/front_end/lib/src/base/library_info.dart b/pkg/front_end/lib/src/base/library_info.dart index a66b6d54022..f7541dac26b 100644 --- a/pkg/front_end/lib/src/base/library_info.dart +++ b/pkg/front_end/lib/src/base/library_info.dart @@ -36,7 +36,7 @@ enum Category { /// Indicates that a library can be used in a browser context. client, - /// Indicates that a lbirary can be used in a command line context. + /// Indicates that a library can be used in a command line context. server, /// Indicates that a library can be used from embedded devices. diff --git a/pkg/front_end/lib/src/fasta/scanner/recover.dart b/pkg/front_end/lib/src/fasta/scanner/recover.dart index 70484c48cdd..e393e1387a0 100644 --- a/pkg/front_end/lib/src/fasta/scanner/recover.dart +++ b/pkg/front_end/lib/src/fasta/scanner/recover.dart @@ -152,7 +152,7 @@ Token defaultRecoveryStrategy( recoverUnmatched() { // TODO(ahe): Try to use top-level keywords (such as `class`, `typedef`, - // and `enum`) and identation to recover. + // and `enum`) and indentation to recover. return errorTail.next; } diff --git a/pkg/front_end/lib/src/fasta/type_inference/type_inference_engine.dart b/pkg/front_end/lib/src/fasta/type_inference/type_inference_engine.dart index c2b0095dccb..d1ee1511fc6 100644 --- a/pkg/front_end/lib/src/fasta/type_inference/type_inference_engine.dart +++ b/pkg/front_end/lib/src/fasta/type_inference/type_inference_engine.dart @@ -125,7 +125,7 @@ class MethodNode { } /// Keeps track of the global state for the type inference that occurs outside -/// of method bodies and initalizers. +/// of method bodies and initializers. /// /// This class describes the interface for use by clients of type inference /// (e.g. DietListener). Derived classes should derive from diff --git a/pkg/front_end/test/fasta/parser/token_stream_rewriter_test.dart b/pkg/front_end/test/fasta/parser/token_stream_rewriter_test.dart index e7d4a670ab5..9aa7fe2c253 100644 --- a/pkg/front_end/test/fasta/parser/token_stream_rewriter_test.dart +++ b/pkg/front_end/test/fasta/parser/token_stream_rewriter_test.dart @@ -133,7 +133,7 @@ abstract class TokenStreamRewriterTest { /// Concrete implementation of [TokenStreamRewriterTest] in which /// [Token.previous] values are set to null. /// -/// This forces [TokenStreamRewriter] to use its more complex heursitc for +/// This forces [TokenStreamRewriter] to use its more complex heuristic for /// finding previous tokens. @reflectiveTest class TokenStreamRewriterTest_NoPrevious extends TokenStreamRewriterTest { diff --git a/pkg/js_ast/lib/src/builder.dart b/pkg/js_ast/lib/src/builder.dart index ff294470abe..dfebe7a993b 100644 --- a/pkg/js_ast/lib/src/builder.dart +++ b/pkg/js_ast/lib/src/builder.dart @@ -568,7 +568,7 @@ class MiniJsParserError { /// * brackets. /// * var declarations. /// * operator precedence. -/// * anonymous funtions and named function expressions and declarations. +/// * anonymous functions and named function expressions and declarations. /// Notable things it can't do yet include: /// * some statements are still missing (do-while, while, switch). /// diff --git a/pkg/js_ast/lib/src/nodes.dart b/pkg/js_ast/lib/src/nodes.dart index 3ab8e6bb992..1b893c96cef 100644 --- a/pkg/js_ast/lib/src/nodes.dart +++ b/pkg/js_ast/lib/src/nodes.dart @@ -984,7 +984,7 @@ abstract class DeferredToken extends Expression { DeferredToken _clone() => this; } -/// Interace for a deferred integer value. An implementation has to provide +/// Interface for a deferred integer value. An implementation has to provide /// a value via the [value] getter the latest when the ast is printed. abstract class DeferredNumber extends DeferredToken implements Literal { accept(NodeVisitor visitor) => visitor.visitDeferredNumber(this); @@ -994,7 +994,7 @@ abstract class DeferredNumber extends DeferredToken implements Literal { int get precedenceLevel => value.isNegative ? UNARY : PRIMARY; } -/// Interace for a deferred string value. An implementation has to provide +/// Interface for a deferred string value. An implementation has to provide /// a value via the [value] getter the latest when the ast is printed. abstract class DeferredString extends DeferredToken implements Literal { accept(NodeVisitor visitor) => visitor.visitDeferredString(this); @@ -1004,7 +1004,7 @@ abstract class DeferredString extends DeferredToken implements Literal { int get precedenceLevel => PRIMARY; } -/// Interace for a deferred [Expression] value. An implementation has to provide +/// Interface for a deferred [Expression] value. An implementation has to provide /// a value via the [value] getter the latest when the ast is printed. /// Also, [precedenceLevel] has to return the same value that /// [value.precedenceLevel] returns once [value] is bound to an [Expression]. diff --git a/pkg/js_ast/lib/src/template.dart b/pkg/js_ast/lib/src/template.dart index d7946cd0db6..2c04ce9bf28 100644 --- a/pkg/js_ast/lib/src/template.dart +++ b/pkg/js_ast/lib/src/template.dart @@ -180,15 +180,15 @@ class InstantiatorGeneratorVisitor implements NodeVisitor { throw 'Unimplemented InstantiatorGeneratorVisitor for $node'; } - static RegExp identiferRE = new RegExp(r'^[A-Za-z_$][A-Za-z_$0-9]*$'); + static RegExp identifierRE = new RegExp(r'^[A-Za-z_$][A-Za-z_$0-9]*$'); static Expression convertStringToVariableUse(String value) { - assert(identiferRE.hasMatch(value)); + assert(identifierRE.hasMatch(value)); return new VariableUse(value); } static Expression convertStringToVariableDeclaration(String value) { - assert(identiferRE.hasMatch(value)); + assert(identifierRE.hasMatch(value)); return new VariableDeclaration(value); } diff --git a/pkg/kernel/lib/ast.dart b/pkg/kernel/lib/ast.dart index a6c2f0b9127..ef9ad9eb115 100644 --- a/pkg/kernel/lib/ast.dart +++ b/pkg/kernel/lib/ast.dart @@ -1551,7 +1551,7 @@ abstract class Expression extends TreeNode { /// Should only be used on code compiled in strong mode, as this method /// assumes the IR is strongly typed. /// - /// This method futhermore assumes that the type of the expression actually + /// This method furthermore assumes that the type of the expression actually /// is a subtype of (some instantiation of) the given [superclass]. /// If this is not the case, either an exception is thrown or the raw type of /// [superclass] is returned. diff --git a/pkg/kernel/lib/transformations/async.dart b/pkg/kernel/lib/transformations/async.dart index 526bab46123..8539f2d548e 100644 --- a/pkg/kernel/lib/transformations/async.dart +++ b/pkg/kernel/lib/transformations/async.dart @@ -48,7 +48,7 @@ class ExpressionLifter extends Transformer { /// /// If an expression should be named it is named before visiting its children /// so the naming assignment appears in the list before all statements - /// implementating the translation of the children. + /// implementing the translation of the children. /// /// Children that are conditionally evaluated, such as some parts of logical /// and conditional expressions, must be delimited so that they do not emit diff --git a/pkg/kernel/lib/transformations/treeshaker.dart b/pkg/kernel/lib/transformations/treeshaker.dart index dc62fde124f..60846e4c4ae 100644 --- a/pkg/kernel/lib/transformations/treeshaker.dart +++ b/pkg/kernel/lib/transformations/treeshaker.dart @@ -127,7 +127,7 @@ class TreeShaker { /// Map from used members (regardless of host) to a summary object describing /// how the member invokes other members on `this`. /// - /// The summary object is a heterogenous list containing the [Member]s that + /// The summary object is a heterogeneous list containing the [Member]s that /// are invoked using `super` and the [Name]s that are dispatched on `this`. /// /// Names that are dispatched as a setter are preceded by the diff --git a/pkg/testing/lib/src/test_dart/path.dart b/pkg/testing/lib/src/test_dart/path.dart index b595e0b7367..5d22c0e0420 100644 --- a/pkg/testing/lib/src/test_dart/path.dart +++ b/pkg/testing/lib/src/test_dart/path.dart @@ -34,7 +34,7 @@ class Path { static String _cleanWindows(String source) { // Change \ to /. var clean = source.replaceAll('\\', '/'); - // Add / before intial [Drive letter]: + // Add / before initial [Drive letter]: if (clean.length >= 2 && clean[1] == ':') { clean = '/$clean'; } diff --git a/pkg/typed_mock/lib/typed_mock.dart b/pkg/typed_mock/lib/typed_mock.dart index c91854c43a5..b16420ed98c 100644 --- a/pkg/typed_mock/lib/typed_mock.dart +++ b/pkg/typed_mock/lib/typed_mock.dart @@ -240,7 +240,7 @@ class Verifier { times(0); } - /// Verifies that there was excatly one martching interaction. + /// Verifies that there was exactly one matching interaction. void once() { times(1); } diff --git a/runtime/bin/directory_win.cc b/runtime/bin/directory_win.cc index df82c11d87f..a8050b9fc0e 100644 --- a/runtime/bin/directory_win.cc +++ b/runtime/bin/directory_win.cc @@ -492,7 +492,7 @@ bool Directory::Rename(const char* path, const char* new_path) { return false; } ExistsResult new_exists = ExistsHelper(system_new_path.wide()); - // MoveFile does not allow replacing exising directories. Therefore, + // MoveFile does not allow replacing existing directories. Therefore, // if the new_path is currently a directory we need to delete it // first. if (new_exists == EXISTS) { diff --git a/runtime/bin/platform_macos.cc b/runtime/bin/platform_macos.cc index a03e8b99511..4dbdc7ce2a9 100644 --- a/runtime/bin/platform_macos.cc +++ b/runtime/bin/platform_macos.cc @@ -148,8 +148,8 @@ static const char* GetPreferredLanguageName() { const char* Platform::LocaleName() { // First see if there is a preferred language. If not, return the // current locale name. - const char* preferred_langauge = GetPreferredLanguageName(); - return (preferred_langauge != NULL) ? preferred_langauge : GetLocaleName(); + const char* preferred_language = GetPreferredLanguageName(); + return (preferred_language != NULL) ? preferred_language : GetLocaleName(); } diff --git a/runtime/bin/platform_win.cc b/runtime/bin/platform_win.cc index a15f4373911..b0e8eabb1e7 100644 --- a/runtime/bin/platform_win.cc +++ b/runtime/bin/platform_win.cc @@ -59,7 +59,7 @@ class PlatformWin { // See: https://msdn.microsoft.com/en-us/library/windows/desktop/ms680621(v=vs.85).aspx SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOOPENFILEERRORBOX); // Set up a signal handler that restores the console state on a - // CTRL_C_EVENT signal. This will only run when there is no signal hanlder + // CTRL_C_EVENT signal. This will only run when there is no signal handler // registered for the CTRL_C_EVENT from Dart code. SetConsoleCtrlHandler(SignalHandler, TRUE); } diff --git a/runtime/bin/process_android.cc b/runtime/bin/process_android.cc index 8107ee3dda9..9f6beeee0c7 100644 --- a/runtime/bin/process_android.cc +++ b/runtime/bin/process_android.cc @@ -519,12 +519,12 @@ class ProcessStarter { execvp(path_, const_cast(program_arguments_))); ReportChildError(); } else { - // Exit the intermeiate process. + // Exit the intermediate process. exit(0); } } } else { - // Exit the intermeiate process. + // Exit the intermediate process. exit(0); } } diff --git a/runtime/bin/socket_patch.dart b/runtime/bin/socket_patch.dart index 865726bcefe..93b23b27837 100644 --- a/runtime/bin/socket_patch.dart +++ b/runtime/bin/socket_patch.dart @@ -1053,7 +1053,7 @@ class _NativeSocket extends _NativeSocketNativeWrapper with _ServiceObject { "The network interface does not have an address " "of the same family as the multicast address"); } else { - // Default to the ANY address if no iterface is specified. + // Default to the ANY address if no interface is specified. return InternetAddress.ANY_IP_V4; } } else { diff --git a/runtime/bin/vmservice/loader.dart b/runtime/bin/vmservice/loader.dart index bec70ea882e..e9c35e6ab7e 100644 --- a/runtime/bin/vmservice/loader.dart +++ b/runtime/bin/vmservice/loader.dart @@ -784,7 +784,7 @@ _loadPackagesFile(SendPort sp, bool traceLoading, Uri packagesFile) async { _findPackagesFile(SendPort sp, bool traceLoading, Uri base) async { try { // Walk up the directory hierarchy to check for the existence of - // .packages files in parent directories and for the existense of a + // .packages files in parent directories and for the existence of a // packages/ directory on the first iteration. var dir = new File.fromUri(base).parent; var prev = null; diff --git a/runtime/include/dart_api.h b/runtime/include/dart_api.h index 2e8b8648097..ab57de43b4a 100644 --- a/runtime/include/dart_api.h +++ b/runtime/include/dart_api.h @@ -3103,7 +3103,7 @@ DART_EXPORT Dart_Handle Dart_FinalizeLoading(bool complete_futures); */ /** - * The peer field is a lazily allocated field intendend for storage of + * The peer field is a lazily allocated field intended for storage of * an uncommonly used values. Most instances types can have a peer * field allocated. The exceptions are subtypes of Null, num, and * bool. diff --git a/runtime/lib/object_patch.dart b/runtime/lib/object_patch.dart index ed77013fd67..4c429e42bc9 100644 --- a/runtime/lib/object_patch.dart +++ b/runtime/lib/object_patch.dart @@ -16,7 +16,7 @@ class Object { // bit). A new hashCode value is calculated using a random number generator. static final _hashCodeRnd = new Random(); - // Shared static implentation for hashCode and _identityHashCode. + // Shared static implementation for hashCode and _identityHashCode. static int _objectHashCode(obj) { var result = _getHash(obj); if (result == 0) { diff --git a/runtime/lib/timer_impl.dart b/runtime/lib/timer_impl.dart index 9bb71b43ec7..9a2d3ffbc1a 100644 --- a/runtime/lib/timer_impl.dart +++ b/runtime/lib/timer_impl.dart @@ -244,7 +244,7 @@ class _Timer implements Timer { } } - // Enqeue one message for each zero timer. To be able to distinguish from + // Enqueue one message for each zero timer. To be able to distinguish from // EventHandler messages we send a _ZERO_EVENT instead of a _TIMEOUT_EVENT. static void _notifyZeroHandler() { if (_sendPort == null) { diff --git a/runtime/observatory/lib/src/elements/script_inset.dart b/runtime/observatory/lib/src/elements/script_inset.dart index 8336f7ba6c4..f6ded1c3aaf 100644 --- a/runtime/observatory/lib/src/elements/script_inset.dart +++ b/runtime/observatory/lib/src/elements/script_inset.dart @@ -654,7 +654,7 @@ class ScriptInsetElement extends HtmlElement implements Renderable { for (int i = _startLine; i <= _endLine; i++) { var line = script.getLine(i); if (line.isBlank) { - // Try to introduce elipses if there are 4 or more contiguous + // Try to introduce ellipses if there are 4 or more contiguous // blank lines. blankLineCount++; } else { @@ -662,12 +662,12 @@ class ScriptInsetElement extends HtmlElement implements Renderable { int firstBlank = i - blankLineCount; int lastBlank = i - 1; if (blankLineCount < 4) { - // Too few blank lines for an elipsis. + // Too few blank lines for an ellipsis. for (int j = firstBlank; j <= lastBlank; j++) { table.append(lineElement(script.getLine(j), lineNumPad)); } } else { - // Add an elipsis for the skipped region. + // Add an ellipsis for the skipped region. table.append(lineElement(script.getLine(firstBlank), lineNumPad)); table.append(lineElement(null, lineNumPad)); table.append(lineElement(script.getLine(lastBlank), lineNumPad)); @@ -964,7 +964,7 @@ void addInfoBox(Element content, Function infoBoxGenerator) { infoBox.style.zIndex = '10'; infoBox.style.backgroundColor = 'white'; infoBox.style.cursor = 'auto'; - // Don't inherit pre formating from the script lines. + // Don't inherit pre formatting from the script lines. infoBox.style.whiteSpace = 'normal'; content.append(infoBox); } diff --git a/runtime/observatory/lib/src/models/objects/error.dart b/runtime/observatory/lib/src/models/objects/error.dart index d59ab6c0010..56eff8b1231 100644 --- a/runtime/observatory/lib/src/models/objects/error.dart +++ b/runtime/observatory/lib/src/models/objects/error.dart @@ -11,7 +11,7 @@ enum ErrorKind { /// The isolate has encountered a Dart language error in the program. languageError, - /// The isolate has encounted an internal error. These errors should be + /// The isolate has encountered an internal error. These errors should be /// reported as bugs. internalError, diff --git a/runtime/observatory/lib/src/service/object.dart b/runtime/observatory/lib/src/service/object.dart index 9bb77fc7895..0e4529a059d 100644 --- a/runtime/observatory/lib/src/service/object.dart +++ b/runtime/observatory/lib/src/service/object.dart @@ -4456,7 +4456,7 @@ class ServiceMetric extends ServiceObject implements M.Metric { String description; double value = 0.0; - // Only a guage has a non-null min and max. + // Only a gauge has a non-null min and max. double min; double max; diff --git a/runtime/observatory/tests/service/tcp_socket_closing_service_test.dart b/runtime/observatory/tests/service/tcp_socket_closing_service_test.dart index fa07ced4e06..970bca84a8e 100644 --- a/runtime/observatory/tests/service/tcp_socket_closing_service_test.dart +++ b/runtime/observatory/tests/service/tcp_socket_closing_service_test.dart @@ -10,7 +10,7 @@ import 'package:unittest/unittest.dart'; import 'test_helper.dart'; /// Test that we correctly remove sockets that have been closed from the list -/// of open sockets. We explictly leave one socket open. +/// of open sockets. We explicitly leave one socket open. Future setup() async { var serverSocket = await io.ServerSocket.bind('127.0.0.1', 0); diff --git a/runtime/observatory/tests/service/test_helper.dart b/runtime/observatory/tests/service/test_helper.dart index 32397502e28..809bfa42940 100644 --- a/runtime/observatory/tests/service/test_helper.dart +++ b/runtime/observatory/tests/service/test_helper.dart @@ -389,7 +389,7 @@ class _ServiceTesterRunner { /// Runs [tests] in sequence, each of which should take an [Isolate] and /// return a [Future]. Code for setting up state can run before and/or /// concurrently with the tests. Uses [mainArgs] to determine whether -/// to run tests or testee in this invokation of the script. +/// to run tests or testee in this invocation of the script. Future runIsolateTests(List mainArgs, List tests, {testeeBefore(), testeeConcurrent(), @@ -424,7 +424,7 @@ Future runIsolateTests(List mainArgs, List tests, /// Runs [tests] in sequence, each of which should take an [Isolate] and /// return a [Future]. Code for setting up state can run before and/or /// concurrently with the tests. Uses [mainArgs] to determine whether -/// to run tests or testee in this invokation of the script. +/// to run tests or testee in this invocation of the script. /// /// This is a special version of this test harness specifically for the /// pause_on_unhandled_exceptions_test, which cannot properly function @@ -460,7 +460,7 @@ void runIsolateTestsSynchronous(List mainArgs, List tests, /// Runs [tests] in sequence, each of which should take an [Isolate] and /// return a [Future]. Code for setting up state can run before and/or /// concurrently with the tests. Uses [mainArgs] to determine whether -/// to run tests or testee in this invokation of the script. +/// to run tests or testee in this invocation of the script. Future runVMTests(List mainArgs, List tests, {testeeBefore(), testeeConcurrent(), diff --git a/runtime/platform/utils.h b/runtime/platform/utils.h index d9d70c14518..a1695d4b291 100644 --- a/runtime/platform/utils.h +++ b/runtime/platform/utils.h @@ -184,7 +184,7 @@ class Utils { } - // Utility functions for converting values from host endianess to + // Utility functions for converting values from host endianness to // big or little endian values. static uint16_t HostToBigEndian16(uint16_t host_value); static uint32_t HostToBigEndian32(uint32_t host_value); diff --git a/runtime/vm/assembler_dbc_test.cc b/runtime/vm/assembler_dbc_test.cc index 12bca45fd67..8ae05185a37 100644 --- a/runtime/vm/assembler_dbc_test.cc +++ b/runtime/vm/assembler_dbc_test.cc @@ -1768,7 +1768,7 @@ ASSEMBLER_TEST_RUN(CheckSmiFail, test) { // - CheckClassId rA, D // -// If the object at FP[rA]'s class id matches hthe class id in PP[D], then +// If the object at FP[rA]'s class id matches the class id in PP[D], then // skip the following instruction. ASSEMBLER_TEST_GENERATE(CheckClassIdSmiPass, assembler) { __ Frame(2); @@ -1883,7 +1883,7 @@ ASSEMBLER_TEST_RUN(IfNeNullNotNull, test) { // Cond is Le, Lt, Ge, Gt, unsigned variants ULe, ULt, UGe, UGt, and // unboxed double variants DEq, DNe, DLe, DLt, DGe, DGt. // Skips the next instruction unless FP[rA] FP[rD]. Assumes that -// FP[rA] and FP[rD] are Smis or unboxed doubles as inidcated by . +// FP[rA] and FP[rD] are Smis or unboxed doubles as indicated by . ASSEMBLER_TEST_GENERATE(IfLeTrue, assembler) { __ Frame(3); __ LoadConstant(0, Smi::Handle(Smi::New(-1))); @@ -2588,7 +2588,7 @@ ASSEMBLER_TEST_RUN(CheckedUnboxFail, test) { // - DAdd, DSub, DMul, DDiv rA, rB, rC // -// Arithmetic operaions on unboxed doubles. FP[rA] <- FP[rB] op FP[rC]. +// Arithmetic operations on unboxed doubles. FP[rA] <- FP[rB] op FP[rC]. ASSEMBLER_TEST_GENERATE(DAdd, assembler) { __ Frame(3); __ LoadConstant(0, Double::Handle(Double::New(41.0, Heap::kOld))); diff --git a/runtime/vm/ast_transformer.cc b/runtime/vm/ast_transformer.cc index d21ef31e26d..7ce398c8652 100644 --- a/runtime/vm/ast_transformer.cc +++ b/runtime/vm/ast_transformer.cc @@ -233,8 +233,8 @@ void AwaitTransformer::VisitAwaitNode(AwaitNode* node) { } -// Transforms boolean expressions into a sequence of evaluatons that only lazily -// evaluate subexpressions. +// Transforms boolean expressions into a sequence of evaluations that only +// lazily evaluate subexpressions. // // Example: // @@ -281,7 +281,7 @@ LocalScope* AwaitTransformer::ChainNewScope(LocalScope* parent) { void AwaitTransformer::VisitBinaryOpNode(BinaryOpNode* node) { AstNode* new_left = Transform(node->left()); AstNode* new_right = NULL; - // Preserve lazy evaluaton. + // Preserve lazy evaluation. if ((node->kind() == Token::kAND) || (node->kind() == Token::kOR)) { new_right = LazyTransform(node->kind(), new_left, node->right()); } else { diff --git a/runtime/vm/constants_arm.h b/runtime/vm/constants_arm.h index a716d4949cf..9c9d86035e9 100644 --- a/runtime/vm/constants_arm.h +++ b/runtime/vm/constants_arm.h @@ -26,7 +26,7 @@ namespace dart { // The Linux/Android ABI and the iOS ABI differ in their choice of frame -// pointer, their treatment of R9, and the interproduceral stack alignment. +// pointer, their treatment of R9, and the interprocedural stack alignment. // EABI (Linux, Android) // See "Procedure Call Standard for the ARM Architecture". diff --git a/runtime/vm/constants_dbc.h b/runtime/vm/constants_dbc.h index eb2b21fe107..adb6d052bb6 100644 --- a/runtime/vm/constants_dbc.h +++ b/runtime/vm/constants_dbc.h @@ -86,7 +86,7 @@ namespace dart { // // - Nop D // -// This instuction does nothing. It may refer to an object in the constant +// This instruction does nothing. It may refer to an object in the constant // pool that may be decoded by other instructions. // // - Compile @@ -225,7 +225,7 @@ namespace dart { // // - DMin, DMax, DAdd, DSub, DMul, DDiv, DPow, DMod rA, rB, rC // -// Arithmetic operaions on unboxed doubles. FP[rA] <- FP[rB] op FP[rC]. +// Arithmetic operations on unboxed doubles. FP[rA] <- FP[rB] op FP[rC]. // // - DNeg, DCos, DSin, DSqrt rA, rD // @@ -334,7 +334,7 @@ namespace dart { // Cond is Le, Lt, Ge, Gt, unsigned variants ULe, ULt, UGe, UGt, and // unboxed double variants DEq, DNe, DLe, DLt, DGe, DGt. // Skips the next instruction unless FP[rA] FP[rD]. Assumes that -// FP[rA] and FP[rD] are Smis or unboxed doubles as inidcated by . +// FP[rA] and FP[rD] are Smis or unboxed doubles as indicated by . // // - CreateArrayTOS // diff --git a/runtime/vm/dart_api_impl.cc b/runtime/vm/dart_api_impl.cc index 39423ac5808..69b52f18c8d 100644 --- a/runtime/vm/dart_api_impl.cc +++ b/runtime/vm/dart_api_impl.cc @@ -1302,7 +1302,7 @@ static Dart_Isolate CreateIsolate(const char* script_uri, // We exit the API scope entered above. Dart_ExitScope(); // A Thread structure has been associated to the thread, we do the - // safepoint transition explicity here instead of using the + // safepoint transition explicitly here instead of using the // TransitionXXX scope objects as the reverse transition happens // outside this scope in Dart_ShutdownIsolate/Dart_ExitIsolate. T->set_execution_state(Thread::kThreadInNative); @@ -1353,7 +1353,7 @@ DART_EXPORT void Dart_ShutdownIsolate() { HandleScope handle_scope(T); Dart::RunShutdownCallback(); // The Thread structure is disassociated from the isolate, we do the - // safepoint transition explicity here instead of using the TransitionXXX + // safepoint transition explicitly here instead of using the TransitionXXX // scope objects as the original transition happened outside this scope in // Dart_EnterIsolate/Dart_CreateIsolate. T->ExitSafepoint(); @@ -1405,7 +1405,7 @@ DART_EXPORT void Dart_EnterIsolate(Dart_Isolate isolate) { "Dart VM is shutting down"); } // A Thread structure has been associated to the thread, we do the - // safepoint transition explicity here instead of using the + // safepoint transition explicitly here instead of using the // TransitionXXX scope objects as the reverse transition happens // outside this scope in Dart_ExitIsolate/Dart_ShutdownIsolate. Thread* T = Thread::Current(); @@ -1547,7 +1547,7 @@ DART_EXPORT void Dart_ExitIsolate() { Thread* T = Thread::Current(); CHECK_ISOLATE(T->isolate()); // The Thread structure is disassociated from the isolate, we do the - // safepoint transition explicity here instead of using the TransitionXXX + // safepoint transition explicitly here instead of using the TransitionXXX // scope objects as the original transition happened outside this scope in // Dart_EnterIsolate/Dart_CreateIsolate. ASSERT(T->execution_state() == Thread::kThreadInNative); @@ -5910,7 +5910,7 @@ DART_EXPORT Dart_Handle Dart_FinalizeLoading(bool complete_futures) { I->DoneLoading(); // TODO(hausner): move the remaining code below (finalization and - // invoing of _completeDeferredLoads) into Isolate::DoneLoading(). + // invoking of _completeDeferredLoads) into Isolate::DoneLoading(). // Finalize all classes if needed. Dart_Handle state = Api::CheckAndFinalizePendingClasses(T); diff --git a/runtime/vm/disassembler.h b/runtime/vm/disassembler.h index 18916fb910f..62eb06fa7af 100644 --- a/runtime/vm/disassembler.h +++ b/runtime/vm/disassembler.h @@ -12,7 +12,7 @@ namespace dart { -// Froward declaration. +// Forward declaration. class MemoryRegion; class JSONArray; diff --git a/runtime/vm/intermediate_language.h b/runtime/vm/intermediate_language.h index 602d7ec1094..69164b03d90 100644 --- a/runtime/vm/intermediate_language.h +++ b/runtime/vm/intermediate_language.h @@ -3755,7 +3755,7 @@ class StoreInstanceFieldInstr : public TemplateDefinition<2, NoThrow> { intptr_t offset_in_bytes_; const StoreBarrierType emit_store_barrier_; const TokenPosition token_pos_; - // Marks initialiing stores. E.g. in the constructor. + // Marks initializing stores. E.g. in the constructor. bool is_initialization_; DISALLOW_COPY_AND_ASSIGN(StoreInstanceFieldInstr); diff --git a/runtime/vm/jit_optimizer.cc b/runtime/vm/jit_optimizer.cc index 91c5e476e8e..8b1d5dc6c96 100644 --- a/runtime/vm/jit_optimizer.cc +++ b/runtime/vm/jit_optimizer.cc @@ -1615,7 +1615,7 @@ void JitOptimizer::VisitStoreInstanceField(StoreInstanceFieldInstr* instr) { void JitOptimizer::VisitAllocateContext(AllocateContextInstr* instr) { // Replace generic allocation with a sequence of inlined allocation and - // explicit initalizing stores. + // explicit initializing stores. AllocateUninitializedContextInstr* replacement = new AllocateUninitializedContextInstr(instr->token_pos(), instr->num_context_variables()); diff --git a/runtime/vm/native_arguments.h b/runtime/vm/native_arguments.h index 856c0437f58..43aa0967b63 100644 --- a/runtime/vm/native_arguments.h +++ b/runtime/vm/native_arguments.h @@ -158,7 +158,7 @@ class NativeArguments { // The closure object is hidden and not accessible from native code. // However, if the function is an instance closure function, the captured // receiver located in the context is made accessible in native code at - // index 0, thereby hidding the closure object at index 0. + // index 0, thereby hiding the closure object at index 0. count--; } return count; diff --git a/runtime/vm/object.h b/runtime/vm/object.h index f08fa72fcf4..9c474225683 100644 --- a/runtime/vm/object.h +++ b/runtime/vm/object.h @@ -4898,7 +4898,7 @@ class Code : public Object { intptr_t pc_offset, GrowableArray* functions, GrowableArray* token_positions) const; - // Same as above, expect the pc is intepreted as a return address (as needed + // Same as above, expect the pc is interpreted as a return address (as needed // for a stack trace or the bottom frames of a profiler sample). void GetInlinedFunctionsAtReturnAddress( intptr_t pc_offset, @@ -5652,7 +5652,7 @@ class Instance : public Object { static intptr_t NextFieldOffset() { return sizeof(RawInstance); } - // The follwoing raw methods are used for morphing. + // The following raw methods are used for morphing. // They are needed due to the extraction of the class in IsValidFieldOffset. RawObject** RawFieldAddrAtOffset(intptr_t offset) const { return reinterpret_cast(raw_value() - kHeapObjectTag + offset); diff --git a/runtime/vm/object_test.cc b/runtime/vm/object_test.cc index c79ac6d0164..0e04a7e3151 100644 --- a/runtime/vm/object_test.cc +++ b/runtime/vm/object_test.cc @@ -1142,7 +1142,7 @@ ISOLATE_UNIT_TEST_CASE(StringConcat) { EXPECT(str6.Equals(two_one_two, two_one_two_len)); } - // Concatenated emtpy and non-empty strings built from 4-byte elements. + // Concatenated empty and non-empty strings built from 4-byte elements. { const String& str1 = String::Handle(String::New("")); EXPECT(str1.IsOneByteString()); diff --git a/runtime/vm/parser.cc b/runtime/vm/parser.cc index bad94b2f98c..7eb318147eb 100644 --- a/runtime/vm/parser.cc +++ b/runtime/vm/parser.cc @@ -7375,7 +7375,7 @@ SequenceNode* Parser::CloseAsyncGeneratorFunction(const Function& closure_func, ASSERT(!closure_func.IsNull()); ASSERT(closure_body != NULL); - // Explicitly reference variables of the async genenerator function from the + // Explicitly reference variables of the async generator function from the // closure body in order to mark them as captured. LocalVariable* existing_var = closure_body->scope()->LookupVariable(Symbols::AwaitJumpVar(), false); @@ -7998,7 +7998,7 @@ AstNode* Parser::ParseVariableDeclaration(const AbstractType& type, } } - // Add variable to scope after parsing the initalizer expression. + // Add variable to scope after parsing the initializer expression. // The expression must not be able to refer to the variable. if (!current_block_->scope->AddVariable(variable)) { LocalVariable* existing_var = @@ -9836,7 +9836,7 @@ AstNode* Parser::ParseAssertStatement(bool is_const) { if (parsed_function()->have_seen_await()) { // The await transformation must be done manually because assertions // are parsed as statements, not expressions. Thus, we need to check - // explicitely whether the arguments contain await operators. (Note that + // explicitly whether the arguments contain await operators. (Note that // we must not parse the arguments with ParseAwaitableExpr(). In the // corner case of assert(await a, await b), this would create two // sibling scopes containing the temporary values for a and b. Both @@ -10206,7 +10206,7 @@ SequenceNode* Parser::ParseCatchClauses( // There isn't a generic catch clause so create a clause body that // rethrows the exception. This includes the case that there were no // catch clauses. - // An await cannot possibly be executed inbetween the catch entry and here, + // An await cannot possibly be executed in between the catch entry and here, // therefore, it is safe to rethrow the stack-based :exception_var instead // of the captured copy :saved_exception_var. current = new (Z) SequenceNode(handler_pos, NULL); @@ -10838,7 +10838,7 @@ AstNode* Parser::ParseStatement() { // Rethrow of current exception. ConsumeToken(); ExpectSemicolon(); - // Check if it is ok to do a rethrow. Find the inntermost enclosing + // Check if it is ok to do a rethrow. Find the innermost enclosing // catch block. TryStack* try_statement = try_stack_; while ((try_statement != NULL) && !try_statement->inside_catch()) { @@ -14754,7 +14754,7 @@ AstNode* Parser::ParsePrimary() { ? InvocationMirror::kMethod : InvocationMirror::kGetter; // Note: Adding a statement to current block is a hack, parsing an - // espression should have no side-effect. + // expression should have no side-effect. current_block_->statements->Add(ThrowNoSuchMethodError( qual_ident_pos, current_class(), qualified_name, NULL, // No arguments. diff --git a/runtime/vm/redundancy_elimination.cc b/runtime/vm/redundancy_elimination.cc index 50a80021285..06df06ab4b4 100644 --- a/runtime/vm/redundancy_elimination.cc +++ b/runtime/vm/redundancy_elimination.cc @@ -3182,7 +3182,7 @@ void AllocationSinking::ExitsCollector::CollectTransitively(Definition* alloc) { // Note: worklist potentially will grow while we are iterating over it. // We are not removing allocations from the worklist not to waste space on // the side maintaining BitVector of already processed allocations: worklist - // is expected to be very small thus linear search in it is just as effecient + // is expected to be very small thus linear search in it is just as efficient // as a bitvector. for (intptr_t i = 0; i < worklist_.length(); i++) { Collect(worklist_[i]); diff --git a/runtime/vm/redundancy_elimination.h b/runtime/vm/redundancy_elimination.h index 47afe2163c2..d92ac49c024 100644 --- a/runtime/vm/redundancy_elimination.h +++ b/runtime/vm/redundancy_elimination.h @@ -19,7 +19,7 @@ class AllocationSinking : public ZoneAllocated { const GrowableArray& candidates() const { return candidates_; } - // Find the materialization insterted for the given allocation + // Find the materialization inserted for the given allocation // at the given exit. MaterializeObjectInstr* MaterializationFor(Definition* alloc, Instruction* exit); diff --git a/runtime/vm/runtime_entry.cc b/runtime/vm/runtime_entry.cc index 0e0702d7f20..c9008b0478d 100644 --- a/runtime/vm/runtime_entry.cc +++ b/runtime/vm/runtime_entry.cc @@ -2312,7 +2312,7 @@ END_LEAF_RUNTIME_ENTRY double DartModulo(double left, double right) { double remainder = fmod_ieee(left, right); if (remainder == 0.0) { - // We explicitely switch to the positive 0.0 (just in case it was negative). + // We explicitly switch to the positive 0.0 (just in case it was negative). remainder = +0.0; } else if (remainder < 0.0) { if (right < 0) { diff --git a/runtime/vm/scavenger.cc b/runtime/vm/scavenger.cc index 7445e77d264..a13bcce75a2 100644 --- a/runtime/vm/scavenger.cc +++ b/runtime/vm/scavenger.cc @@ -33,7 +33,7 @@ DEFINE_FLAG(int, "Grow new gen when less than this percentage is garbage."); DEFINE_FLAG(int, new_gen_growth_factor, 4, "Grow new gen by this factor."); -// Scavenger uses RawObject::kMarkBit to distinguish forwaded and non-forwarded +// Scavenger uses RawObject::kMarkBit to distinguish forwarded and non-forwarded // objects. The kMarkBit does not intersect with the target address because of // object alignment. enum { diff --git a/runtime/vm/scavenger.h b/runtime/vm/scavenger.h index b0e5dca273c..8d8c0e49e3f 100644 --- a/runtime/vm/scavenger.h +++ b/runtime/vm/scavenger.h @@ -56,7 +56,7 @@ class SemiSpace { explicit SemiSpace(VirtualMemory* reserved); ~SemiSpace(); - VirtualMemory* reserved_; // NULL for an emtpy space. + VirtualMemory* reserved_; // NULL for an empty space. MemoryRegion region_; static SemiSpace* cache_; diff --git a/runtime/vm/simulator_dbc.cc b/runtime/vm/simulator_dbc.cc index 127b6d4f6e4..a5b65f078c3 100644 --- a/runtime/vm/simulator_dbc.cc +++ b/runtime/vm/simulator_dbc.cc @@ -1754,7 +1754,7 @@ RawObject* Simulator::Call(const Code& code, // Invoke target function. { const uint16_t argc = rA; - // Lookup the funciton in the ICData. + // Look up the function in the ICData. RawObject* ic_data_obj = SP[0]; RawICData* ic_data = RAW_CAST(ICData, ic_data_obj); RawObject** data = ic_data->ptr()->ic_data_->ptr()->data(); diff --git a/runtime/vm/snapshot_test.dart b/runtime/vm/snapshot_test.dart index c0da5286b96..8c0d8d9b6eb 100644 --- a/runtime/vm/snapshot_test.dart +++ b/runtime/vm/snapshot_test.dart @@ -721,7 +721,7 @@ class BenchmarkBase { run(); } - // Exercices the benchmark. By default invokes [run] 10 times. + // Exercises the benchmark. By default invokes [run] 10 times. void exercise() { for (int i = 0; i < 10; i++) { run(); diff --git a/runtime/vm/stub_code_arm.cc b/runtime/vm/stub_code_arm.cc index c1e09c0010c..14fe95c8259 100644 --- a/runtime/vm/stub_code_arm.cc +++ b/runtime/vm/stub_code_arm.cc @@ -2153,7 +2153,7 @@ void StubCode::GenerateMegamorphicCallStub(Assembler* assembler) { __ tst(R6, Operand(R6)); __ b(&load_target, EQ); // branch if miss. - // Try next extry in the table. + // Try next entry in the table. __ AddImmediate(R3, Smi::RawValue(1)); __ b(&loop); } diff --git a/runtime/vm/stub_code_ia32.cc b/runtime/vm/stub_code_ia32.cc index 445c0f21dca..240d1fd1902 100644 --- a/runtime/vm/stub_code_ia32.cc +++ b/runtime/vm/stub_code_ia32.cc @@ -668,7 +668,7 @@ void StubCode::GenerateAllocateArrayStub(Assembler* assembler) { // ECX: array element type. // EDX: Array length as Smi (preserved). // Store the type argument field. - // No generetional barrier needed, since we store into a new object. + // No generational barrier needed, since we store into a new object. __ StoreIntoObjectNoBarrier( EAX, FieldAddress(EAX, Array::type_arguments_offset()), ECX); @@ -2091,7 +2091,7 @@ void StubCode::GenerateMegamorphicCallStub(Assembler* assembler) { __ cmpl(FieldAddress(EDI, EDX, TIMES_4, base), Immediate(kIllegalCid)); __ j(ZERO, &load_target, Assembler::kNearJump); - // Try next extry in the table. + // Try next entry in the table. __ AddImmediate(EDX, Immediate(Smi::RawValue(1))); __ jmp(&loop); diff --git a/runtime/vm/stub_code_x64.cc b/runtime/vm/stub_code_x64.cc index 67a1832ad08..95874ca8b11 100644 --- a/runtime/vm/stub_code_x64.cc +++ b/runtime/vm/stub_code_x64.cc @@ -706,7 +706,7 @@ void StubCode::GenerateAllocateArrayStub(Assembler* assembler) { // RAX: new object start as a tagged pointer. // Store the type argument field. - // No generetional barrier needed, since we store into a new object. + // No generational barrier needed, since we store into a new object. __ StoreIntoObjectNoBarrier( RAX, FieldAddress(RAX, Array::type_arguments_offset()), RBX); @@ -2145,7 +2145,7 @@ void StubCode::GenerateMegamorphicCallStub(Assembler* assembler) { __ cmpq(FieldAddress(RDI, RCX, TIMES_8, base), Immediate(kIllegalCid)); __ j(ZERO, &load_target, Assembler::kNearJump); - // Try next extry in the table. + // Try next entry in the table. __ AddImmediate(RCX, Immediate(Smi::RawValue(1))); __ jmp(&loop); diff --git a/runtime/vm/thread_test.cc b/runtime/vm/thread_test.cc index f50b7abf40e..c20f19ef860 100644 --- a/runtime/vm/thread_test.cc +++ b/runtime/vm/thread_test.cc @@ -60,7 +60,7 @@ VM_UNIT_TEST_CASE(Monitor) { // We expect to be timing out here. EXPECT_EQ(Monitor::kTimedOut, wait_result); - // Check whether this attempt falls within the exptected time limits. + // Check whether this attempt falls within the expected time limits. int64_t wakeup_time = (stop - start) / kMicrosecondsPerMillisecond; OS::Print("wakeup_time: %" Pd64 "\n", wakeup_time); const int kAcceptableTimeJitter = 20; // Measured in milliseconds. diff --git a/samples-dev/swarm/swarm_ui_lib/touch/Scrollbar.dart b/samples-dev/swarm/swarm_ui_lib/touch/Scrollbar.dart index 3f458392a76..122b225c477 100644 --- a/samples-dev/swarm/swarm_ui_lib/touch/Scrollbar.dart +++ b/samples-dev/swarm/swarm_ui_lib/touch/Scrollbar.dart @@ -131,7 +131,7 @@ class Scrollbar implements ScrollListener { _frame.onMouseOver.listen((Event e) { final activeElement = document.activeElement; // TODO(jacobr): don't steal focus from a child element or a truly - // focusable element. Only support stealing focus ffrom another + // focusable element. Only support stealing focus from another // element that was given fake focus. if (activeElement is BodyElement || (!_frame.contains(activeElement) && activeElement is DivElement)) { @@ -148,7 +148,7 @@ class Scrollbar implements ScrollListener { _hovering = false; // Start hiding immediately if we aren't // scrolling or already in the process of - // hidng the scrollbar + // hiding the scrollbar if (!_scrollInProgress && _timer == null) { _boundHideFn(); } diff --git a/samples-dev/swarm/swarm_ui_lib/view/view.dart b/samples-dev/swarm/swarm_ui_lib/view/view.dart index b84981d1068..ead4f2b452d 100644 --- a/samples-dev/swarm/swarm_ui_lib/view/view.dart +++ b/samples-dev/swarm/swarm_ui_lib/view/view.dart @@ -180,10 +180,10 @@ class View implements Positionable { /** * Registers the given listener callback to the given observable. Also - * immedially invokes the callback once as if a change has just come in. This - * lets you define a render() method that renders the skeleton of a view, then - * register a bunch of listeners which all fire to populate the view with - * model data. + * immediately invokes the callback once as if a change has just come in. + * This lets you define a render() method that renders the skeleton of a + * view, then register a bunch of listeners which all fire to populate the + * view with model data. */ void watch(Observable observable, void watcher(EventSummary summary)) { // Make a fake summary for the initial watch. diff --git a/sdk/lib/_internal/js_runtime/lib/convert_patch.dart b/sdk/lib/_internal/js_runtime/lib/convert_patch.dart index 2b8a38e876d..8306c782a1d 100644 --- a/sdk/lib/_internal/js_runtime/lib/convert_patch.dart +++ b/sdk/lib/_internal/js_runtime/lib/convert_patch.dart @@ -58,7 +58,7 @@ _convertJsonToDart(json, reviver(key, value)) { return e; } - // This test is needed to avoid identifing '{"__proto__":[]}' as an Array. + // This test is needed to avoid identifying '{"__proto__":[]}' as an Array. // TODO(sra): Replace this test with cheaper '#.constructor === Array' when // bug 621 below is fixed. if (JS('bool', 'Object.getPrototypeOf(#) === Array.prototype', e)) { @@ -103,7 +103,7 @@ _convertJsonToDartLazy(object) { return object; } - // This test is needed to avoid identifing '{"__proto__":[]}' as an array. + // This test is needed to avoid identifying '{"__proto__":[]}' as an array. // TODO(sra): Replace this test with cheaper '#.constructor === Array' when // bug https://code.google.com/p/v8/issues/detail?id=621 is fixed. if (JS('bool', 'Object.getPrototypeOf(#) !== Array.prototype', object)) { diff --git a/sdk/lib/_internal/js_runtime/lib/js_helper.dart b/sdk/lib/_internal/js_runtime/lib/js_helper.dart index d0e60d9ec07..3bb3da1221c 100644 --- a/sdk/lib/_internal/js_runtime/lib/js_helper.dart +++ b/sdk/lib/_internal/js_runtime/lib/js_helper.dart @@ -2247,7 +2247,7 @@ class ExceptionAndStackTrace { */ unwrapException(ex) { /// If error implements Error, save [ex] in [error.$thrownJsError]. - /// Otherwise, do nothing. Later, the stack trace can then be extraced from + /// Otherwise, do nothing. Later, the stack trace can then be extracted from /// [ex]. saveStackTrace(error) { if (error is Error) { diff --git a/sdk/lib/_internal/js_runtime/lib/native_typed_data.dart b/sdk/lib/_internal/js_runtime/lib/native_typed_data.dart index 9953b06998d..7e660e1f23d 100644 --- a/sdk/lib/_internal/js_runtime/lib/native_typed_data.dart +++ b/sdk/lib/_internal/js_runtime/lib/native_typed_data.dart @@ -1878,7 +1878,7 @@ bool _isInvalidArrayIndex(int index) { /// Checks that [index] is a valid index into [list] which has length [length]. /// -/// That is, [index] is an insteger in the range `0..length - 1`. +/// That is, [index] is an integer in the range `0..length - 1`. void _checkValidIndex(int index, List list, int length) { if (_isInvalidArrayIndex(index) || JS('int', '#', index) >= length) { throw diagnoseIndexError(list, index); diff --git a/sdk/lib/_internal/js_runtime/lib/string_helper.dart b/sdk/lib/_internal/js_runtime/lib/string_helper.dart index e202f32c813..cf8b17ad245 100644 --- a/sdk/lib/_internal/js_runtime/lib/string_helper.dart +++ b/sdk/lib/_internal/js_runtime/lib/string_helper.dart @@ -175,7 +175,7 @@ stringReplaceAllFuncUnchecked(receiver, pattern, onMatch, onNonMatch) { return stringReplaceAllStringFuncUnchecked( receiver, pattern, onMatch, onNonMatch); } - // Placing the Pattern test here is indistingishable from placing it at the + // Placing the Pattern test here is indistinguishable from placing it at the // top of the method but it saves an extra check on the `pattern is String` // path. if (pattern is! Pattern) { diff --git a/sdk/lib/async/stream_impl.dart b/sdk/lib/async/stream_impl.dart index 7337756f7e5..b5e89c17f52 100644 --- a/sdk/lib/async/stream_impl.dart +++ b/sdk/lib/async/stream_impl.dart @@ -79,7 +79,7 @@ class _BufferingStreamSubscription * * a done event is sent. * * If the subscription is canceled while _STATE_WAIT_FOR_CANCEL is set, the - * state is unset, and no furher events must be delivered. + * state is unset, and no further events must be delivered. */ static const int _STATE_WAIT_FOR_CANCEL = 16; static const int _STATE_IN_CALLBACK = 32; diff --git a/sdk/lib/core/num.dart b/sdk/lib/core/num.dart index 56cec4b9668..5231ee9da7d 100644 --- a/sdk/lib/core/num.dart +++ b/sdk/lib/core/num.dart @@ -115,11 +115,11 @@ abstract class num implements Comparable { /** * Euclidean modulo operator. * - * Returns the remainder of the euclidean division. The euclidean division of + * Returns the remainder of the Euclidean division. The Euclidean division of * two integers `a` and `b` yields two integers `q` and `r` such that * `a == b * q + r` and `0 <= r < b.abs()`. * - * The euclidean division is only defined for integers, but can be easily + * The Euclidean division is only defined for integers, but can be easily * extended to work with doubles. In that case `r` may have a non-integer * value, but it still verifies `0 <= r < |b|`. * diff --git a/sdk/lib/html/dart2js/html_dart2js.dart b/sdk/lib/html/dart2js/html_dart2js.dart index c07f01bdccd..f35d89b584e 100644 --- a/sdk/lib/html/dart2js/html_dart2js.dart +++ b/sdk/lib/html/dart2js/html_dart2js.dart @@ -44845,7 +44845,7 @@ class _KeyboardEventHandler extends EventStreamProvider { // Opera reports the character code in the keyCode field. e._shadowCharCode = KeyCode.isCharacterKey(e.keyCode) ? e.keyCode : 0; } - // Now we guestimate about what the keycode is that was actually + // Now we guesstimate about what the keycode is that was actually // pressed, given previous keydown information. e._shadowKeyCode = _determineKeyCodeForKeypress(e); diff --git a/sdk/lib/html/dartium/html_dartium.dart b/sdk/lib/html/dartium/html_dartium.dart index fe9efb37e12..02d69ff93af 100644 --- a/sdk/lib/html/dartium/html_dartium.dart +++ b/sdk/lib/html/dartium/html_dartium.dart @@ -50982,7 +50982,7 @@ class _KeyboardEventHandler extends EventStreamProvider { // Opera reports the character code in the keyCode field. e._shadowCharCode = KeyCode.isCharacterKey(e.keyCode) ? e.keyCode : 0; } - // Now we guestimate about what the keycode is that was actually + // Now we guesstimate about what the keycode is that was actually // pressed, given previous keydown information. e._shadowKeyCode = _determineKeyCodeForKeypress(e); @@ -52985,7 +52985,7 @@ class _Utils { // Inject all the already defined console variables. _consoleTempVariables._data.forEach(addArg); - // TODO(jacobr): remove the parentheses around the expresson once + // TODO(jacobr): remove the parentheses around the expression once // dartbug.com/13723 is fixed. Currently we wrap expression in parentheses // to ensure only valid Dart expressions are allowed. Otherwise the DartVM // quietly ignores trailing Dart statements resulting in user confusion diff --git a/sdk/lib/io/http_parser.dart b/sdk/lib/io/http_parser.dart index 64c23c91721..dc397c3c178 100644 --- a/sdk/lib/io/http_parser.dart +++ b/sdk/lib/io/http_parser.dart @@ -754,7 +754,7 @@ class _HttpParser extends Stream<_HttpIncoming> { dataAvailable = _remainingContent; } // Always present the data as a view. This way we can handle all - // cases like this, and the user will not experince different data + // cases like this, and the user will not experience different data // typed (which could lead to polymorphic user code). List data = new Uint8List.view( _buffer.buffer, _buffer.offsetInBytes + _index, dataAvailable); diff --git a/sdk/lib/io/socket.dart b/sdk/lib/io/socket.dart index 4ece18658ba..7524f3dcf15 100644 --- a/sdk/lib/io/socket.dart +++ b/sdk/lib/io/socket.dart @@ -354,7 +354,7 @@ class SocketOption { /** * Enable or disable no-delay on the socket. If TCP_NODELAY is enabled, the * socket will not buffer data internally, but instead write each data chunk - * as an invidual TCP packet. + * as an individual TCP packet. * * TCP_NODELAY is disabled by default. */ diff --git a/sdk/lib/io/stdio.dart b/sdk/lib/io/stdio.dart index 7473706eb0d..45e7fdc41f9 100644 --- a/sdk/lib/io/stdio.dart +++ b/sdk/lib/io/stdio.dart @@ -79,7 +79,7 @@ class Stdin extends _StdStream implements Stream> { line.add(byte); } } else { - // Case having to handel CR LF as a single unretained line terminator. + // Case having to handle CR LF as a single unretained line terminator. outer: while (true) { int byte = readByteSync(); diff --git a/sdk/lib/js/dartium/js_dartium.dart b/sdk/lib/js/dartium/js_dartium.dart index 6c7e9a78081..f03aab9ae22 100644 --- a/sdk/lib/js/dartium/js_dartium.dart +++ b/sdk/lib/js/dartium/js_dartium.dart @@ -307,7 +307,7 @@ class _DeclarationSet { startNamed++; // TODO(jacobr): we are unnecessarily using an O(n^2) algorithm here. - // If we have JS APIs with a lange number of named parameters we should + // If we have JS APIs with a large number of named parameters we should // optimize this. Either use a HashSet or invert this, walking over // parameters, querying invocation, and making sure we match //invocation.namedArguments.size keys. @@ -842,7 +842,7 @@ List _generateInteropPatchFiles( (isArray ? implementsArray : implements).add(fullName); if (!isArray && !isFunction && !isJSObject) { // For DOM classes we need to be a bit more conservative at tagging them - // as implementing JS inteorp classes risks strange unintended + // as implementing JS interop classes risks strange unintended // consequences as unrleated code may have instanceof checks. Checking // for isJSObject ensures we do not accidentally pull in existing // dart:html classes as they all have JSObject as a base class. diff --git a/tests/benchmark_smoke/benchmark_base.dart b/tests/benchmark_smoke/benchmark_base.dart index 64c24b7ecf1..f999cd83a99 100644 --- a/tests/benchmark_smoke/benchmark_base.dart +++ b/tests/benchmark_smoke/benchmark_base.dart @@ -37,7 +37,7 @@ class BenchmarkBase { run(); } - /** Exercices the benchmark. By default invokes [run] 10 times. */ + /** Exercises the benchmark. By default invokes [run] 10 times. */ void exercise() { for (int i = 0; i < 10; i++) { run(); diff --git a/tests/compiler/dart2js/kernel/constructors_test.dart b/tests/compiler/dart2js/kernel/constructors_test.dart index 1acb6889a01..7946801fbeb 100644 --- a/tests/compiler/dart2js/kernel/constructors_test.dart +++ b/tests/compiler/dart2js/kernel/constructors_test.dart @@ -48,7 +48,7 @@ main() => new Foo(number: 3); }); // TODO(efortuna): Kernel needs to have some additional constructor - // implementaion work before this is legitimately equivalent code to the + // implementation work before this is legitimately equivalent code to the // original AST. /* test('initialized field and constructor', () { String code = ''' diff --git a/tests/compiler/dart2js/simple_inferrer_final_field2_test.dart b/tests/compiler/dart2js/simple_inferrer_final_field2_test.dart index d81f3fc6956..9a90bd1da80 100644 --- a/tests/compiler/dart2js/simple_inferrer_final_field2_test.dart +++ b/tests/compiler/dart2js/simple_inferrer_final_field2_test.dart @@ -3,7 +3,7 @@ // BSD-style license that can be found in the LICENSE file. // Test that a non-used generative constructor does not prevent -// infering types for fields. +// inferring types for fields. import 'package:async_helper/async_helper.dart'; import 'package:expect/expect.dart'; diff --git a/tests/compiler/dart2js_extra/js_array_index_error_test.dart b/tests/compiler/dart2js_extra/js_array_index_error_test.dart index ca0ffe0c698..be5e310be78 100644 --- a/tests/compiler/dart2js_extra/js_array_index_error_test.dart +++ b/tests/compiler/dart2js_extra/js_array_index_error_test.dart @@ -2,7 +2,7 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -// Test that optimized JSArray indexers enerate the same error as dynamically +// Test that optimized JSArray indexers generate the same error as dynamically // dispatched calls. import 'package:expect/expect.dart'; diff --git a/tests/compiler/dart2js_extra/switch_test.dart b/tests/compiler/dart2js_extra/switch_test.dart index 2aa077497fc..09efd475447 100644 --- a/tests/compiler/dart2js_extra/switch_test.dart +++ b/tests/compiler/dart2js_extra/switch_test.dart @@ -23,7 +23,7 @@ switcher(val) { return x; } -// Check unambiguated grammar allowing multiple lables per case/default. +// Check unambiguated grammar allowing multiple labels per case/default. switcher2(val) { var x = 0; switch (val) { diff --git a/tests/corelib/list_test.dart b/tests/corelib/list_test.dart index 889a916626e..0323c1de89d 100644 --- a/tests/corelib/list_test.dart +++ b/tests/corelib/list_test.dart @@ -301,7 +301,7 @@ void testLengthInvariantOperations(List list) { testArgumentError(() => list.setRange(-1, 5, [1, 2, 3, 4, 5, 6])); testArgumentError(() => list.setRange(2, 5, [1, 2, 3])); testArgumentError(() => list.setRange(4, 2, [1, 2])); - // for setAll, end is implictly start + values.length. + // for setAll, end is implicitly start + values.length. testArgumentError(() => list.setAll(-1, [])); testArgumentError(() => list.setAll(5, [])); testArgumentError(() => list.setAll(2, [1, 2, 3])); diff --git a/tests/corelib/regexp/UC16_test.dart b/tests/corelib/regexp/UC16_test.dart index 41e5dc8b9fd..c89464fe5dd 100644 --- a/tests/corelib/regexp/UC16_test.dart +++ b/tests/corelib/regexp/UC16_test.dart @@ -32,7 +32,8 @@ import 'package:expect/expect.dart'; void main() { // UC16 // Characters used: - // "\u03a3\u03c2\u03c3\u039b\u03bb" - Sigma, final sigma, sigma, Lambda, lamda + // "\u03a3\u03c2\u03c3\u039b\u03bb" - Sigma, final sigma, sigma, Lambda, + // lambda shouldBe( new RegExp(r"x(.)\1x", caseSensitive: false).firstMatch("x\u03a3\u03c3x"), ["x\u03a3\u03c3x", "\u03a3"], diff --git a/tests/corelib/regexp/invalid-range-in-class_test.dart b/tests/corelib/regexp/invalid-range-in-class_test.dart index 001ebdd5815..4669858902a 100644 --- a/tests/corelib/regexp/invalid-range-in-class_test.dart +++ b/tests/corelib/regexp/invalid-range-in-class_test.dart @@ -44,7 +44,7 @@ void main() { // the grammar, and as such in the following regex a-z cannot be matched as a range. shouldBe(new RegExp(r"[\d-a-z]+").firstMatch("az1-3y"), ["az1-3"]); - // An escaped hypen should not be confused for an invalid range. + // An escaped hyphen should not be confused for an invalid range. shouldBe(new RegExp(r"[\d\-x]+").firstMatch("1-3xy"), ["1-3x"]); shouldBe(new RegExp(r"[x\-\d]+").firstMatch("1-3xy"), ["1-3x"]); shouldBe(new RegExp(r"[\d\-\d]+").firstMatch("1-3xy"), ["1-3"]); diff --git a/tests/corelib/regexp/unicode-handling_test.dart b/tests/corelib/regexp/unicode-handling_test.dart index 186e0263fc0..01685ec72c6 100644 --- a/tests/corelib/regexp/unicode-handling_test.dart +++ b/tests/corelib/regexp/unicode-handling_test.dart @@ -29,7 +29,7 @@ void main() { description( 'Test for proper handling of Unicode RegExps and bug 7445: Gmail puts wrong subject in replies.'); - // Regex to match Re in various languanges straight from Gmail source + // Regex to match Re in various languages straight from Gmail source var I3 = new RegExp( r"^\s*(fwd|re|aw|antw|antwort|wg|sv|ang|odp|betreff|betr|transf|reenv\.|reenv|in|res|resp|resp\.|enc|\u8f6c\u53d1|\u56DE\u590D|\u041F\u0435\u0440\u0435\u0441\u043B|\u041E\u0442\u0432\u0435\u0442):\s*(.*)$", caseSensitive: false); diff --git a/tests/corelib/set_test.dart b/tests/corelib/set_test.dart index 807d96cfbb0..bfe4172efb6 100644 --- a/tests/corelib/set_test.dart +++ b/tests/corelib/set_test.dart @@ -362,7 +362,7 @@ void testDifferenceIntersection(create([equals, hashCode, validKey, compare])) { Expect.identical(ce1a, difference.lookup(ce1a)); Expect.identical(ce2, difference.lookup(ce2)); - // Intesection always takes elements from receiver set. + // Intersection always takes elements from receiver set. var intersection = set1.intersection(set2); testLength(1, intersection); Expect.identical(ce1a, intersection.lookup(ce1a)); diff --git a/tests/corelib_strong/list_test.dart b/tests/corelib_strong/list_test.dart index 889a916626e..0323c1de89d 100644 --- a/tests/corelib_strong/list_test.dart +++ b/tests/corelib_strong/list_test.dart @@ -301,7 +301,7 @@ void testLengthInvariantOperations(List list) { testArgumentError(() => list.setRange(-1, 5, [1, 2, 3, 4, 5, 6])); testArgumentError(() => list.setRange(2, 5, [1, 2, 3])); testArgumentError(() => list.setRange(4, 2, [1, 2])); - // for setAll, end is implictly start + values.length. + // for setAll, end is implicitly start + values.length. testArgumentError(() => list.setAll(-1, [])); testArgumentError(() => list.setAll(5, [])); testArgumentError(() => list.setAll(2, [1, 2, 3])); diff --git a/tests/corelib_strong/regexp/UC16_test.dart b/tests/corelib_strong/regexp/UC16_test.dart index 41e5dc8b9fd..c89464fe5dd 100644 --- a/tests/corelib_strong/regexp/UC16_test.dart +++ b/tests/corelib_strong/regexp/UC16_test.dart @@ -32,7 +32,8 @@ import 'package:expect/expect.dart'; void main() { // UC16 // Characters used: - // "\u03a3\u03c2\u03c3\u039b\u03bb" - Sigma, final sigma, sigma, Lambda, lamda + // "\u03a3\u03c2\u03c3\u039b\u03bb" - Sigma, final sigma, sigma, Lambda, + // lambda shouldBe( new RegExp(r"x(.)\1x", caseSensitive: false).firstMatch("x\u03a3\u03c3x"), ["x\u03a3\u03c3x", "\u03a3"], diff --git a/tests/corelib_strong/regexp/invalid-range-in-class_test.dart b/tests/corelib_strong/regexp/invalid-range-in-class_test.dart index 001ebdd5815..4669858902a 100644 --- a/tests/corelib_strong/regexp/invalid-range-in-class_test.dart +++ b/tests/corelib_strong/regexp/invalid-range-in-class_test.dart @@ -44,7 +44,7 @@ void main() { // the grammar, and as such in the following regex a-z cannot be matched as a range. shouldBe(new RegExp(r"[\d-a-z]+").firstMatch("az1-3y"), ["az1-3"]); - // An escaped hypen should not be confused for an invalid range. + // An escaped hyphen should not be confused for an invalid range. shouldBe(new RegExp(r"[\d\-x]+").firstMatch("1-3xy"), ["1-3x"]); shouldBe(new RegExp(r"[x\-\d]+").firstMatch("1-3xy"), ["1-3x"]); shouldBe(new RegExp(r"[\d\-\d]+").firstMatch("1-3xy"), ["1-3"]); diff --git a/tests/corelib_strong/regexp/unicode-handling_test.dart b/tests/corelib_strong/regexp/unicode-handling_test.dart index 186e0263fc0..01685ec72c6 100644 --- a/tests/corelib_strong/regexp/unicode-handling_test.dart +++ b/tests/corelib_strong/regexp/unicode-handling_test.dart @@ -29,7 +29,7 @@ void main() { description( 'Test for proper handling of Unicode RegExps and bug 7445: Gmail puts wrong subject in replies.'); - // Regex to match Re in various languanges straight from Gmail source + // Regex to match Re in various languages straight from Gmail source var I3 = new RegExp( r"^\s*(fwd|re|aw|antw|antwort|wg|sv|ang|odp|betreff|betr|transf|reenv\.|reenv|in|res|resp|resp\.|enc|\u8f6c\u53d1|\u56DE\u590D|\u041F\u0435\u0440\u0435\u0441\u043B|\u041E\u0442\u0432\u0435\u0442):\s*(.*)$", caseSensitive: false); diff --git a/tests/corelib_strong/set_test.dart b/tests/corelib_strong/set_test.dart index d4e8da0598d..35af9f76e7e 100644 --- a/tests/corelib_strong/set_test.dart +++ b/tests/corelib_strong/set_test.dart @@ -353,7 +353,7 @@ void testDifferenceIntersection(create([equals, hashCode, validKey, compare])) { Expect.identical(ce1a, difference.lookup(ce1a)); Expect.identical(ce2, difference.lookup(ce2)); - // Intesection always takes elements from receiver set. + // Intersection always takes elements from receiver set. var intersection = set1.intersection(set2); testLength(1, intersection); Expect.identical(ce1a, intersection.lookup(ce1a)); diff --git a/tests/html/element_test.dart b/tests/html/element_test.dart index c1f74b58622..2fdd9ec93fd 100644 --- a/tests/html/element_test.dart +++ b/tests/html/element_test.dart @@ -934,7 +934,7 @@ main() { // There are two interesting things that are checked here from the viewpoint // of the dart2js implementation of a 'native' class: // - // 1. Some methods are implementated from by 'Object' or 'Interceptor'; + // 1. Some methods are implemented from by 'Object' or 'Interceptor'; // some of these tests simply check that a method can be called. // 2. Some methods are implemented by mixins. diff --git a/tests/language/abstract_runtime_error_test.dart b/tests/language/abstract_runtime_error_test.dart index 99f8fa051bc..a34791f72ad 100644 --- a/tests/language/abstract_runtime_error_test.dart +++ b/tests/language/abstract_runtime_error_test.dart @@ -6,7 +6,7 @@ import "package:expect/expect.dart"; // Test various conditions around instantiating an abstract class. -// From The Dart Programming Langauge Specification, 11.11.1 "New": +// From The Dart Programming Language Specification, 11.11.1 "New": // If q is a constructor of an abstract class then an // AbstractClassInstantiation- Error is thrown. diff --git a/tests/language/class_codegen_test.dart b/tests/language/class_codegen_test.dart index bfec70f0232..cbece1d0921 100644 --- a/tests/language/class_codegen_test.dart +++ b/tests/language/class_codegen_test.dart @@ -20,7 +20,7 @@ class C extends A { main() { // We don't instantiate A, but the codegen still needs to emit (parts of) it - // for inheritence purposes. + // for inheritance purposes. var b = new B(); var c = new C(); Expect.equals(3, b.foo()); diff --git a/tests/language/constructor_duplicate_initializers_test.dart b/tests/language/constructor_duplicate_initializers_test.dart index 46035de155b..9c873b15765 100644 --- a/tests/language/constructor_duplicate_initializers_test.dart +++ b/tests/language/constructor_duplicate_initializers_test.dart @@ -5,7 +5,7 @@ class Class { Class(var v) : field_ = v - // Test against duplicate final field initializaion in initializing list. + // Test against duplicate final field initialization in initializing list. , field_ = 2 // //# 01: compile-time error ; Class.field(this.field_) diff --git a/tests/language/if_null_behavior_test.dart b/tests/language/if_null_behavior_test.dart index 206fc3a25d8..c871c4e23fd 100644 --- a/tests/language/if_null_behavior_test.dart +++ b/tests/language/if_null_behavior_test.dart @@ -2,7 +2,7 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -// Evaluation of an if-null expresion e of the form e1 ?? e2 is equivalent to +// Evaluation of an if-null expression e of the form e1 ?? e2 is equivalent to // the evaluation of the expression ((x) => x == null ? e2 : x)(e1). The // static type of e is the least upper bound of the static type of e1 and the // static type of e2. diff --git a/tests/language/if_null_evaluation_order_test.dart b/tests/language/if_null_evaluation_order_test.dart index 5cfc2644395..f5db1c259c4 100644 --- a/tests/language/if_null_evaluation_order_test.dart +++ b/tests/language/if_null_evaluation_order_test.dart @@ -2,7 +2,7 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -// Evaluation of an if-null expresion e of the form e1 ?? e2 is equivalent to +// Evaluation of an if-null expression e of the form e1 ?? e2 is equivalent to // the evaluation of the expression ((x) => x == null ? e2 : x)(e1). // // Therefore, e1 should be evaluated first; if it is non-null, e2 should not diff --git a/tests/language/inst_field_initializer1_negative_test.dart b/tests/language/inst_field_initializer1_negative_test.dart index 8f18981a0fc..af446c7fbcf 100644 --- a/tests/language/inst_field_initializer1_negative_test.dart +++ b/tests/language/inst_field_initializer1_negative_test.dart @@ -1,7 +1,7 @@ // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -// Catch illegal access to 'this' in initalized instance fields. +// Catch illegal access to 'this' in initialized instance fields. class A { A() {} diff --git a/tests/language/instance_inline_test.dart b/tests/language/instance_inline_test.dart index 0aabedc3498..e6cf10dca54 100644 --- a/tests/language/instance_inline_test.dart +++ b/tests/language/instance_inline_test.dart @@ -5,7 +5,7 @@ import "package:expect/expect.dart"; // Test inlining of assignments in parameter passing. If [StringScanner.charAt] -// is inlined, the argument expresion [: ++byteOffset :] should not be +// is inlined, the argument expression [: ++byteOffset :] should not be // duplicated. class StringScanner { diff --git a/tests/language/named_parameters4_test.dart b/tests/language/named_parameters4_test.dart index 3602cd29867..ff5bca2d476 100644 --- a/tests/language/named_parameters4_test.dart +++ b/tests/language/named_parameters4_test.dart @@ -6,7 +6,7 @@ import "package:expect/expect.dart"; -// This test is very similar to NamedParameters3Test, but exersizes a +// This test is very similar to NamedParameters3Test, but exercises a // different corner case in the frog compiler. frog wasn't detecting unused // named arguments when no other arguments were expected. So, this test // purposely passes the exact number of positional parameters. diff --git a/tests/language/named_parameters_aggregated_test.dart b/tests/language/named_parameters_aggregated_test.dart index 52e2189d8fc..57616527a12 100644 --- a/tests/language/named_parameters_aggregated_test.dart +++ b/tests/language/named_parameters_aggregated_test.dart @@ -41,7 +41,7 @@ main() { , 25 //# 02: continued ); - // Expect compile-time erorr due to duplicate named argument. + // Expect compile-time error due to duplicate named argument. NamedParametersAggregatedTests.F31(10, b: 25 , b:35 //# 04: compile-time error , b:35, b:45 //# 06: compile-time error diff --git a/tests/language/static_inline_test.dart b/tests/language/static_inline_test.dart index 50141e32f2a..12bfe48a6b8 100644 --- a/tests/language/static_inline_test.dart +++ b/tests/language/static_inline_test.dart @@ -5,7 +5,7 @@ import "package:expect/expect.dart"; // Test inlining of assignments in parameter passing. If [StringScanner.charAt] -// is inlined, the argument expresion [: ++byteOffset :] should not be +// is inlined, the argument expression [: ++byteOffset :] should not be // duplicated. class StringScanner { diff --git a/tests/language/type_variable_initializer_test.dart b/tests/language/type_variable_initializer_test.dart index e875edc8b03..3d5a85d114b 100644 --- a/tests/language/type_variable_initializer_test.dart +++ b/tests/language/type_variable_initializer_test.dart @@ -9,7 +9,7 @@ import "package:expect/expect.dart"; class A { var map; - // Usage of type variables in the intializer makes the SSA builder + // Usage of type variables in the initializer makes the SSA builder // want to access [:this:]. And because the initializers of A are // inlined in the constructor of B, we have to make sure the // [:this:] in the A constructor has a corresponding diff --git a/tests/language/vm/regress_29137_vm_test.dart b/tests/language/vm/regress_29137_vm_test.dart index 1ada35e2ee8..978483f5b60 100644 --- a/tests/language/vm/regress_29137_vm_test.dart +++ b/tests/language/vm/regress_29137_vm_test.dart @@ -26,7 +26,7 @@ rot8(v) => _rotl32(v, 8); main() { // Note: value is selected in such a way that (value << 8) is not a smi - this - // triggers emittion of BinaryMintOp instructions for shifts. + // triggers emission of BinaryMintOp instructions for shifts. const value = 0xF0F00000; const rotated = 0xF00000F0; Expect.equals(rotated, rot8(value)); diff --git a/tests/language_strong/abstract_runtime_error_test.dart b/tests/language_strong/abstract_runtime_error_test.dart index f885ea8cded..567e2c1d471 100644 --- a/tests/language_strong/abstract_runtime_error_test.dart +++ b/tests/language_strong/abstract_runtime_error_test.dart @@ -6,7 +6,7 @@ import "package:expect/expect.dart"; // Test various conditions around instantiating an abstract class. -// From The Dart Programming Langauge Specification, 11.11.1 "New": +// From The Dart Programming Language Specification, 11.11.1 "New": // If q is a constructor of an abstract class then an // AbstractClassInstantiation- Error is thrown. diff --git a/tests/language_strong/built_in_identifier_prefix_test.dart b/tests/language_strong/built_in_identifier_prefix_test.dart index de995c95643..6c3934ad8f3 100644 --- a/tests/language_strong/built_in_identifier_prefix_test.dart +++ b/tests/language_strong/built_in_identifier_prefix_test.dart @@ -16,7 +16,7 @@ // Observation: it is not illegal to use a built-in identifier as a library // prefix. // -// Observation: it is not legal to use a built-in identifer as a type +// Observation: it is not legal to use a built-in identifier as a type // annotation. A type annotation is not fully defined in the // specification, so we assume this means that the grammar production // "type" cannot match a built-in identifier. Unfortunately, this diff --git a/tests/language_strong/class_codegen_test.dart b/tests/language_strong/class_codegen_test.dart index bfec70f0232..cbece1d0921 100644 --- a/tests/language_strong/class_codegen_test.dart +++ b/tests/language_strong/class_codegen_test.dart @@ -20,7 +20,7 @@ class C extends A { main() { // We don't instantiate A, but the codegen still needs to emit (parts of) it - // for inheritence purposes. + // for inheritance purposes. var b = new B(); var c = new C(); Expect.equals(3, b.foo()); diff --git a/tests/language_strong/constructor_duplicate_initializers_test.dart b/tests/language_strong/constructor_duplicate_initializers_test.dart index 46035de155b..9c873b15765 100644 --- a/tests/language_strong/constructor_duplicate_initializers_test.dart +++ b/tests/language_strong/constructor_duplicate_initializers_test.dart @@ -5,7 +5,7 @@ class Class { Class(var v) : field_ = v - // Test against duplicate final field initializaion in initializing list. + // Test against duplicate final field initialization in initializing list. , field_ = 2 // //# 01: compile-time error ; Class.field(this.field_) diff --git a/tests/language_strong/if_null_behavior_test.dart b/tests/language_strong/if_null_behavior_test.dart index 206fc3a25d8..c871c4e23fd 100644 --- a/tests/language_strong/if_null_behavior_test.dart +++ b/tests/language_strong/if_null_behavior_test.dart @@ -2,7 +2,7 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -// Evaluation of an if-null expresion e of the form e1 ?? e2 is equivalent to +// Evaluation of an if-null expression e of the form e1 ?? e2 is equivalent to // the evaluation of the expression ((x) => x == null ? e2 : x)(e1). The // static type of e is the least upper bound of the static type of e1 and the // static type of e2. diff --git a/tests/language_strong/if_null_evaluation_order_test.dart b/tests/language_strong/if_null_evaluation_order_test.dart index 5cfc2644395..f5db1c259c4 100644 --- a/tests/language_strong/if_null_evaluation_order_test.dart +++ b/tests/language_strong/if_null_evaluation_order_test.dart @@ -2,7 +2,7 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -// Evaluation of an if-null expresion e of the form e1 ?? e2 is equivalent to +// Evaluation of an if-null expression e of the form e1 ?? e2 is equivalent to // the evaluation of the expression ((x) => x == null ? e2 : x)(e1). // // Therefore, e1 should be evaluated first; if it is non-null, e2 should not diff --git a/tests/language_strong/inst_field_initializer1_negative_test.dart b/tests/language_strong/inst_field_initializer1_negative_test.dart index 8f18981a0fc..af446c7fbcf 100644 --- a/tests/language_strong/inst_field_initializer1_negative_test.dart +++ b/tests/language_strong/inst_field_initializer1_negative_test.dart @@ -1,7 +1,7 @@ // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -// Catch illegal access to 'this' in initalized instance fields. +// Catch illegal access to 'this' in initialized instance fields. class A { A() {} diff --git a/tests/language_strong/instance_inline_test.dart b/tests/language_strong/instance_inline_test.dart index 0aabedc3498..e6cf10dca54 100644 --- a/tests/language_strong/instance_inline_test.dart +++ b/tests/language_strong/instance_inline_test.dart @@ -5,7 +5,7 @@ import "package:expect/expect.dart"; // Test inlining of assignments in parameter passing. If [StringScanner.charAt] -// is inlined, the argument expresion [: ++byteOffset :] should not be +// is inlined, the argument expression [: ++byteOffset :] should not be // duplicated. class StringScanner { diff --git a/tests/language_strong/named_parameters4_test.dart b/tests/language_strong/named_parameters4_test.dart index 3602cd29867..ff5bca2d476 100644 --- a/tests/language_strong/named_parameters4_test.dart +++ b/tests/language_strong/named_parameters4_test.dart @@ -6,7 +6,7 @@ import "package:expect/expect.dart"; -// This test is very similar to NamedParameters3Test, but exersizes a +// This test is very similar to NamedParameters3Test, but exercises a // different corner case in the frog compiler. frog wasn't detecting unused // named arguments when no other arguments were expected. So, this test // purposely passes the exact number of positional parameters. diff --git a/tests/language_strong/named_parameters_aggregated_test.dart b/tests/language_strong/named_parameters_aggregated_test.dart index 149f2eb7efa..a1a055fa8df 100644 --- a/tests/language_strong/named_parameters_aggregated_test.dart +++ b/tests/language_strong/named_parameters_aggregated_test.dart @@ -41,7 +41,7 @@ main() { , 25 // //# 02: continued ); - // Expect compile-time erorr due to duplicate named argument. + // Expect compile-time error due to duplicate named argument. NamedParametersAggregatedTests.F31(10, b: 25 , b:35 // //# 04: compile-time error ); diff --git a/tests/language_strong/static_inline_test.dart b/tests/language_strong/static_inline_test.dart index 50141e32f2a..12bfe48a6b8 100644 --- a/tests/language_strong/static_inline_test.dart +++ b/tests/language_strong/static_inline_test.dart @@ -5,7 +5,7 @@ import "package:expect/expect.dart"; // Test inlining of assignments in parameter passing. If [StringScanner.charAt] -// is inlined, the argument expresion [: ++byteOffset :] should not be +// is inlined, the argument expression [: ++byteOffset :] should not be // duplicated. class StringScanner { diff --git a/tests/language_strong/type_variable_initializer_test.dart b/tests/language_strong/type_variable_initializer_test.dart index e875edc8b03..3d5a85d114b 100644 --- a/tests/language_strong/type_variable_initializer_test.dart +++ b/tests/language_strong/type_variable_initializer_test.dart @@ -9,7 +9,7 @@ import "package:expect/expect.dart"; class A { var map; - // Usage of type variables in the intializer makes the SSA builder + // Usage of type variables in the initializer makes the SSA builder // want to access [:this:]. And because the initializers of A are // inlined in the constructor of B, we have to make sure the // [:this:] in the A constructor has a corresponding diff --git a/tests/lib/async/stream_state_helper.dart b/tests/lib/async/stream_state_helper.dart index eda69b92cc8..59b53db12c1 100644 --- a/tests/lib/async/stream_state_helper.dart +++ b/tests/lib/async/stream_state_helper.dart @@ -144,7 +144,7 @@ class StreamProtocolTest { _latestSubscription = null; } - // End the test now. There must be no open expectations, and no furter + // End the test now. There must be no open expectations, and no further // expectations will be allowed. // Called automatically by an onCancel event on a non-broadcast stream. void terminate() { diff --git a/tests/lib/async/zone_bind_callback_unary_test.dart b/tests/lib/async/zone_bind_callback_unary_test.dart index 3f315e312db..19155abc214 100644 --- a/tests/lib/async/zone_bind_callback_unary_test.dart +++ b/tests/lib/async/zone_bind_callback_unary_test.dart @@ -36,7 +36,7 @@ main() { Expect.isFalse(identical(fun, bound)); // It is legal to invoke the callback in a different zone. This is, of course, - // etremely discouraged. + // extremely discouraged. var result = bound(399); Expect.equals(498, result); Expect.equals(499, restoredValue); diff --git a/tests/lib/math/math_parse_double_test.dart b/tests/lib/math/math_parse_double_test.dart index 0c00a7ac19a..481e0cc110b 100644 --- a/tests/lib/math/math_parse_double_test.dart +++ b/tests/lib/math/math_parse_double_test.dart @@ -75,8 +75,8 @@ final TESTS = [ [4295967295.0, "4295967295"], // max uint32 [4295967295.000001, "4295967295.000001"], // min not uint-32 [4295967296.0, "4295967296"], // min int not-uint32 - [1.7976931348623157e+308, "1.7976931348623157e+308"], // Max finit - [1.7976931348623157e+308, "1.7976931348623158e+308"], // Max finit + [1.7976931348623157e+308, "1.7976931348623157e+308"], // Max finite + [1.7976931348623157e+308, "1.7976931348623158e+308"], // Max finite [double.INFINITY, "1.7976931348623159e+308"], // Infinity [.049999999999999994, ".049999999999999994"], // not 0.5 [.05, ".04999999999999999935"], diff --git a/tests/lib_strong/async/stream_state_helper.dart b/tests/lib_strong/async/stream_state_helper.dart index eda69b92cc8..59b53db12c1 100644 --- a/tests/lib_strong/async/stream_state_helper.dart +++ b/tests/lib_strong/async/stream_state_helper.dart @@ -144,7 +144,7 @@ class StreamProtocolTest { _latestSubscription = null; } - // End the test now. There must be no open expectations, and no furter + // End the test now. There must be no open expectations, and no further // expectations will be allowed. // Called automatically by an onCancel event on a non-broadcast stream. void terminate() { diff --git a/tests/lib_strong/async/zone_bind_callback_unary_test.dart b/tests/lib_strong/async/zone_bind_callback_unary_test.dart index 3f315e312db..19155abc214 100644 --- a/tests/lib_strong/async/zone_bind_callback_unary_test.dart +++ b/tests/lib_strong/async/zone_bind_callback_unary_test.dart @@ -36,7 +36,7 @@ main() { Expect.isFalse(identical(fun, bound)); // It is legal to invoke the callback in a different zone. This is, of course, - // etremely discouraged. + // extremely discouraged. var result = bound(399); Expect.equals(498, result); Expect.equals(499, restoredValue); diff --git a/tests/lib_strong/html/debugger_test.dart b/tests/lib_strong/html/debugger_test.dart index f14c00347f7..83d39aaa2d3 100644 --- a/tests/lib_strong/html/debugger_test.dart +++ b/tests/lib_strong/html/debugger_test.dart @@ -302,7 +302,7 @@ window.ExampleJSClass = function ExampleJSClass(x) { group('Class formatting', () { addNestedFormatterGoldens('TestClass', new TestClass(17)); addNestedFormatterGoldens('MouseEvent', new MouseEvent("click")); - // This is a good class to test as it has statics and a deep inheritance heirarchy + // This is a good class to test as it has statics and a deep inheritance hierarchy addNestedFormatterGoldens('HttpRequest', new HttpRequest()); }); diff --git a/tests/lib_strong/html/element_test.dart b/tests/lib_strong/html/element_test.dart index c1f74b58622..2fdd9ec93fd 100644 --- a/tests/lib_strong/html/element_test.dart +++ b/tests/lib_strong/html/element_test.dart @@ -934,7 +934,7 @@ main() { // There are two interesting things that are checked here from the viewpoint // of the dart2js implementation of a 'native' class: // - // 1. Some methods are implementated from by 'Object' or 'Interceptor'; + // 1. Some methods are implemented from by 'Object' or 'Interceptor'; // some of these tests simply check that a method can be called. // 2. Some methods are implemented by mixins. diff --git a/tests/standalone/io/skipping_dart2js_compilations_test.dart b/tests/standalone/io/skipping_dart2js_compilations_test.dart index 269999e7684..79bd12f95ca 100644 --- a/tests/standalone/io/skipping_dart2js_compilations_test.dart +++ b/tests/standalone/io/skipping_dart2js_compilations_test.dart @@ -11,7 +11,7 @@ * modified date of the output of a dart2js compilation is newer than * - the dart application to compile (including it's dependencies) * - the dart2js snapshot - * Furtheremore it ensure that a compilations is not skipped if any of the + * Furthermore it ensures that a compilation is not skipped if any of the * necessary files could not be found (dart2js snapshots, previous dart2js * output (+deps file), dart application) */ @@ -220,7 +220,7 @@ void main() { }); } - // We run the tests in sequence, so that if one of them failes we clean up + // We run the tests in sequence, so that if one of them fails we clean up // everything and throw. runTest("fs_noTestJs", fs_noTestJs, true).then((_) { return runTest("fs_noTestJsDeps", fs_noTestJsDeps, true); diff --git a/tools/dom/src/KeyboardEventStream.dart b/tools/dom/src/KeyboardEventStream.dart index 7b9b13eda75..fea4654ad03 100644 --- a/tools/dom/src/KeyboardEventStream.dart +++ b/tools/dom/src/KeyboardEventStream.dart @@ -328,7 +328,7 @@ class _KeyboardEventHandler extends EventStreamProvider { // Opera reports the character code in the keyCode field. e._shadowCharCode = KeyCode.isCharacterKey(e.keyCode) ? e.keyCode : 0; } - // Now we guestimate about what the keycode is that was actually + // Now we guesstimate about what the keycode is that was actually // pressed, given previous keydown information. e._shadowKeyCode = _determineKeyCodeForKeypress(e); diff --git a/tools/dom/src/native_DOMImplementation.dart b/tools/dom/src/native_DOMImplementation.dart index a97d3f2dda9..66aa6cfcb03 100644 --- a/tools/dom/src/native_DOMImplementation.dart +++ b/tools/dom/src/native_DOMImplementation.dart @@ -520,7 +520,7 @@ class _Utils { // Inject all the already defined console variables. _consoleTempVariables._data.forEach(addArg); - // TODO(jacobr): remove the parentheses around the expresson once + // TODO(jacobr): remove the parentheses around the expression once // dartbug.com/13723 is fixed. Currently we wrap expression in parentheses // to ensure only valid Dart expressions are allowed. Otherwise the DartVM // quietly ignores trailing Dart statements resulting in user confusion diff --git a/tools/testing/dart/path.dart b/tools/testing/dart/path.dart index 99da4397e44..139dcfa5c7d 100644 --- a/tools/testing/dart/path.dart +++ b/tools/testing/dart/path.dart @@ -34,7 +34,7 @@ class Path { static String _cleanWindows(String source) { // Change \ to /. var clean = source.replaceAll('\\', '/'); - // Add / before intial [Drive letter]: + // Add / before initial [Drive letter]: if (clean.length >= 2 && clean[1] == ':') { clean = '/$clean'; } diff --git a/tools/testing/dart/test_suite.dart b/tools/testing/dart/test_suite.dart index 7bce35d5660..7ad3a59f45d 100644 --- a/tools/testing/dart/test_suite.dart +++ b/tools/testing/dart/test_suite.dart @@ -792,7 +792,8 @@ class StandardTestSuite extends TestSuite { if (info.optionsFromFile['isMultiHtmlTest'] as bool) { // A browser multi-test has multiple expectations for one test file. - // Find all the different sub-test expecations for one entire test file. + // Find all the different sub-test expectations for one entire test + // file. var subtestNames = info.optionsFromFile['subtestNames'] as List; expectationsMap = >{}; for (var name in subtestNames) { diff --git a/utils/peg/pegparser.dart b/utils/peg/pegparser.dart index 69292b6002b..a5fb3bbe6bb 100644 --- a/utils/peg/pegparser.dart +++ b/utils/peg/pegparser.dart @@ -146,7 +146,7 @@ _Rule TEXT(rule, [extractor]) => new _TextValueRule( * If [rule] is value generating then the value is the value generated by [rule] * if it matches, and [:null:] if it does not. * - * If [rule] is not value generatinge then the value is [:true:] if [rule] + * If [rule] is not value generating then the value is [:true:] if [rule] * matches and [:false:] if it does not. */ _Rule MAYBE(rule) => new _OptionalRule(_compile(rule));