diff --git a/CHANGELOG.md b/CHANGELOG.md index 4ef3c04d630..7845cebe2b0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6883,7 +6883,7 @@ Patch release, resolves one issue: `dart:indexed_db`, `dart:svg`, `dart:web_audio`, and `dart:web_gl` that correspond to changes to Chrome APIs between v39 and v45. Many of the breaking changes represent APIs that would have caused runtime exceptions when compiled - to Javascript and run on recent Chrome releases. + to JavaScript and run on recent Chrome releases. - `dart:io` - Added `SecurityContext.alpnSupported`, which is true if a platform supports @@ -7265,7 +7265,7 @@ Patch release, resolves three issues: ### Tool changes -- `dart2js` and Dartium now support improved Javascript Interoperability via the +- `dart2js` and Dartium now support improved JavaScript Interoperability via the [js package](https://pub.dev/packages/js). - `docgen` and `dartdocgen` no longer ship in the SDK. The `docgen` sources have @@ -7626,7 +7626,7 @@ Patch release, resolves three issues: This is a bug fix release which merges a number of commits from `bleeding_edge`. -- dart2js: Addresses as issue with minified Javascript output with CSP enabled - +- dart2js: Addresses as issue with minified JavaScript output with CSP enabled - [r44453](https://code.google.com/p/dart/source/detail?r=44453) - Editor: Fixes accidental updating of files in the pub cache during rename diff --git a/README.dart-sdk b/README.dart-sdk index f76fd11e3bd..fa90e9dc65b 100644 --- a/README.dart-sdk +++ b/README.dart-sdk @@ -8,7 +8,7 @@ bin/ Binaries/scripts to compile, run, and manage Dart apps. dart Command line Dart tool dartaotruntime Minimal Dart runtime for running AOT modules dart2js Dart to JavaScript production compiler - dartdevc Dart to Javascript development compiler + dartdevc Dart to JavaScript development compiler dartdoc Dart documentation generator analyze_snapshot Standalone tool to dump information on AOT snapshots diff --git a/pkg/_fe_analyzer_shared/lib/src/messages/codes_generated.dart b/pkg/_fe_analyzer_shared/lib/src/messages/codes_generated.dart index 641728de82d..c1e139a2942 100644 --- a/pkg/_fe_analyzer_shared/lib/src/messages/codes_generated.dart +++ b/pkg/_fe_analyzer_shared/lib/src/messages/codes_generated.dart @@ -12425,7 +12425,7 @@ const Template< problemMessageTemplate: r"""The integer literal #string can't be represented exactly in JavaScript.""", correctionMessageTemplate: - r"""Try changing the literal to something that can be represented in Javascript. In Javascript #string2 is the nearest value that can be represented exactly.""", + r"""Try changing the literal to something that can be represented in JavaScript. In JavaScript #string2 is the nearest value that can be represented exactly.""", withArguments: _withArgumentsWebLiteralCannotBeRepresentedExactly); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. @@ -12443,7 +12443,7 @@ Message _withArgumentsWebLiteralCannotBeRepresentedExactly( return new Message(codeWebLiteralCannotBeRepresentedExactly, problemMessage: """The integer literal ${string} can't be represented exactly in JavaScript.""", - correctionMessage: """Try changing the literal to something that can be represented in Javascript. In Javascript ${string2} is the nearest value that can be represented exactly.""", + correctionMessage: """Try changing the literal to something that can be represented in JavaScript. In JavaScript ${string2} is the nearest value that can be represented exactly.""", arguments: {'string': string, 'string2': string2}); } diff --git a/pkg/_fe_analyzer_shared/lib/src/parser/listener.dart b/pkg/_fe_analyzer_shared/lib/src/parser/listener.dart index f1f0a3f0096..6786d79b587 100644 --- a/pkg/_fe_analyzer_shared/lib/src/parser/listener.dart +++ b/pkg/_fe_analyzer_shared/lib/src/parser/listener.dart @@ -657,7 +657,7 @@ class Listener implements UnescapeErrorListener { } /// Handle the beginning of a named function expression which isn't legal - /// syntax in Dart. Useful for recovering from Javascript code being pasted + /// syntax in Dart. Useful for recovering from JavaScript code being pasted /// into a Dart program, as it will interpret `function foo() {}` as a named /// function expression with return type `function` and name `foo`. /// @@ -666,7 +666,7 @@ class Listener implements UnescapeErrorListener { void beginNamedFunctionExpression(Token token) {} /// A named function expression which isn't legal syntax in Dart. - /// Useful for recovering from Javascript code being pasted into a Dart + /// Useful for recovering from JavaScript code being pasted into a Dart /// program, as it will interpret `function foo() {}` as a named function /// expression with return type `function` and name `foo`. /// diff --git a/pkg/_fe_analyzer_shared/lib/src/parser/parser_impl.dart b/pkg/_fe_analyzer_shared/lib/src/parser/parser_impl.dart index 60ef398f69b..3fcb7a85c22 100644 --- a/pkg/_fe_analyzer_shared/lib/src/parser/parser_impl.dart +++ b/pkg/_fe_analyzer_shared/lib/src/parser/parser_impl.dart @@ -4996,7 +4996,7 @@ class Parser { /// /// If [isFunctionExpression] is true, this method parses the rest of named /// function expression which isn't legal syntax in Dart. Useful for - /// recovering from Javascript code being pasted into a Dart program, as it + /// recovering from JavaScript code being pasted into a Dart program, as it /// will interpret `function foo() {}` as a named function expression with /// return type `function` and name `foo`. /// diff --git a/pkg/analysis_server/lib/protocol/protocol.dart b/pkg/analysis_server/lib/protocol/protocol.dart index d719acb3f0f..1372285524f 100644 --- a/pkg/analysis_server/lib/protocol/protocol.dart +++ b/pkg/analysis_server/lib/protocol/protocol.dart @@ -443,7 +443,7 @@ class Response { /// Initialize a newly created instance to represent an error condition caused /// by a [request] that had invalid parameter. [path] is the path to the - /// invalid parameter, in Javascript notation (e.g. "foo.bar" means that the + /// invalid parameter, in JavaScript notation (e.g. "foo.bar" means that the /// parameter "foo" contained a key "bar" whose value was the wrong type). /// [expectation] is a description of the type of data that was expected. Response.invalidParameter(Request request, String path, String expectation) diff --git a/pkg/analysis_server_client/lib/src/protocol/protocol_base.dart b/pkg/analysis_server_client/lib/src/protocol/protocol_base.dart index 722be536c05..401363dad29 100644 --- a/pkg/analysis_server_client/lib/src/protocol/protocol_base.dart +++ b/pkg/analysis_server_client/lib/src/protocol/protocol_base.dart @@ -425,7 +425,7 @@ class Response { /// Initialize a newly created instance to represent an error condition caused /// by a [request] that had invalid parameter. [path] is the path to the - /// invalid parameter, in Javascript notation (e.g. "foo.bar" means that the + /// invalid parameter, in JavaScript notation (e.g. "foo.bar" means that the /// parameter "foo" contained a key "bar" whose value was the wrong type). /// [expectation] is a description of the type of data that was expected. Response.invalidParameter(Request request, String path, String expectation) diff --git a/pkg/analyzer_plugin/lib/protocol/protocol.dart b/pkg/analyzer_plugin/lib/protocol/protocol.dart index 0abe5d495ee..079444364c7 100644 --- a/pkg/analyzer_plugin/lib/protocol/protocol.dart +++ b/pkg/analyzer_plugin/lib/protocol/protocol.dart @@ -242,7 +242,7 @@ class RequestErrorFactory { /// Return a request error representing an error condition caused by a request /// that had an invalid parameter. The [path] is the path to the invalid - /// parameter, in Javascript notation (e.g. "foo.bar" means that the parameter + /// parameter, in JavaScript notation (e.g. "foo.bar" means that the parameter /// "foo" contained a key "bar" whose value was the wrong type). The /// [expectation] is a description of the type of data that was expected. static RequestError invalidParameter(String path, String expectation) => diff --git a/pkg/compiler/README.md b/pkg/compiler/README.md index 8e728347f20..e226981d9e2 100644 --- a/pkg/compiler/README.md +++ b/pkg/compiler/README.md @@ -227,7 +227,7 @@ functionality is publicly exposed. to elements that are understood directly in Dart. * `lib/src/js_backend/backend_helpers.dart`: provides a way to lookup internal - elements of the Javascript backend, like our internal + elements of the JavaScript backend, like our internal representation of JSInt31, JSArray, and other implementation-specific elements. diff --git a/pkg/compiler/lib/src/dump_info.dart b/pkg/compiler/lib/src/dump_info.dart index 92b26e97e4b..12c21d72f77 100644 --- a/pkg/compiler/lib/src/dump_info.dart +++ b/pkg/compiler/lib/src/dump_info.dart @@ -1157,7 +1157,7 @@ class DumpInfoTask extends CompilerTask implements InfoReporter { /// [registerEntityAst] is called. final Map _nodeData = {}; - // A mapping from Dart Entities to Javascript AST Nodes. + // A mapping from Dart Entities to JavaScript AST Nodes. final Map> _entityToNodes = >{}; final Map _constantToNode = diff --git a/pkg/compiler/lib/src/js/rewrite_async.dart b/pkg/compiler/lib/src/js/rewrite_async.dart index ae7c0fce7d1..0ebc1a1e12f 100644 --- a/pkg/compiler/lib/src/js/rewrite_async.dart +++ b/pkg/compiler/lib/src/js/rewrite_async.dart @@ -71,7 +71,7 @@ abstract class AsyncRewriterBase extends js.NodeVisitor { final String Function(String) safeVariableName; - // All the Name variables are names of Javascript variables used in the + // All the Name variables are names of JavaScript variables used in the // transformed code. /// Contains the result of an awaited expression, or a conditional or @@ -567,7 +567,7 @@ abstract class AsyncRewriterBase extends js.NodeVisitor { Iterable variableInitializations( js.JavaScriptNodeSourceInformation? sourceInformation); - /// Rewrites an async/sync*/async* function to a normal Javascript function. + /// Rewrites an async/sync*/async* function to a normal JavaScript function. /// /// The control flow is flattened by simulating 'goto' using a switch in a /// loop and a state variable [goto] inside a nested function [body] @@ -1138,7 +1138,7 @@ abstract class AsyncRewriterBase extends js.NodeVisitor { @override void visitForIn(js.ForIn node) { // The dart output currently never uses for-in loops. - throw "Javascript for-in not implemented yet in the await transformation"; + throw "JavaScript for-in not implemented yet in the await transformation"; } @override diff --git a/pkg/compiler/lib/src/js/size_estimator.dart b/pkg/compiler/lib/src/js/size_estimator.dart index 660a177d409..24787f12738 100644 --- a/pkg/compiler/lib/src/js/size_estimator.dart +++ b/pkg/compiler/lib/src/js/size_estimator.dart @@ -13,7 +13,7 @@ import '../js_backend/string_reference.dart'; import '../js_backend/type_reference.dart'; import '../js_emitter/metadata_collector.dart'; -/// Estimates the size of the Javascript AST represented by the provided [Node]. +/// Estimates the size of the JavaScript AST represented by the provided [Node]. int estimateSize(Node node) { var estimator = SizeEstimator(); estimator.visit(node); 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 4102ce1a8c5..6f54165ba78 100644 --- a/pkg/compiler/lib/src/js_backend/custom_elements_analysis.dart +++ b/pkg/compiler/lib/src/js_backend/custom_elements_analysis.dart @@ -91,9 +91,9 @@ class CustomElementsResolutionAnalysis extends CustomElementsAnalysisBase { : join = CustomElementsAnalysisJoin( elementEnvironment, commonElements, nativeData, backendUsageBuilder: backendUsageBuilder) { - // TODO(sra): Remove this work-around. We should mark allClassesSelected in + // TODO(sra): Remove this workaround. We should mark allClassesSelected in // both joins only when we see a construct generating an unknown [Type] but - // we can't currently recognize all cases. In particular, the work-around + // we can't currently recognize all cases. In particular, the workaround // for the unimplemented `ClassMirror.reflectedType` is not recognizable. // TODO(12607): Match on [ClassMirror.reflectedType] join.allClassesSelected = true; @@ -124,9 +124,9 @@ class CustomElementsCodegenAnalysis extends CustomElementsAnalysisBase { : join = CustomElementsAnalysisJoin( elementEnvironment, commonElements, nativeData), super(elementEnvironment, commonElements, nativeData) { - // TODO(sra): Remove this work-around. We should mark allClassesSelected in + // TODO(sra): Remove this workaround. We should mark allClassesSelected in // both joins only when we see a construct generating an unknown [Type] but - // we can't currently recognize all cases. In particular, the work-around + // we can't currently recognize all cases. In particular, the workaround // for the unimplemented `ClassMirror.reflectedType` is not recognizable. // TODO(12607): Match on [ClassMirror.reflectedType] join.allClassesSelected = true; diff --git a/pkg/compiler/lib/src/js_emitter/startup_emitter/fragment_merger.dart b/pkg/compiler/lib/src/js_emitter/startup_emitter/fragment_merger.dart index 0c86374a245..42c8ca83b49 100644 --- a/pkg/compiler/lib/src/js_emitter/startup_emitter/fragment_merger.dart +++ b/pkg/compiler/lib/src/js_emitter/startup_emitter/fragment_merger.dart @@ -56,7 +56,7 @@ import '../model.dart'; /// cleanly, we use various abstractions to merge [OutputUnits]. /// /// First, we emit the code for each [OutputUnit] into an [EmittedOutputUnit]. -/// An [EmittedOutputUnit] is the Javascript representation of an [OutputUnit]. +/// An [EmittedOutputUnit] is the JavaScript representation of an [OutputUnit]. /// [EmittedOutputUnits] map 1:1 to [OutputUnits]. /// /// We wrap each [EmittedOutputUnit] in a [PreFragment], which is just a wrapper @@ -65,7 +65,7 @@ import '../model.dart'; /// threshold. /// /// Once we are finished merging [PreFragments], we must now decide on their -/// final representation in Javascript. +/// final representation in JavaScript. /// /// Depending on the results of the merge, we chose one of two representations. /// For example, say we merge {a, b} and {a} into {a, b}+{a}. In this case our diff --git a/pkg/compiler/lib/src/native/behavior.dart b/pkg/compiler/lib/src/native/behavior.dart index 34faf54fe54..04e743ada8d 100644 --- a/pkg/compiler/lib/src/native/behavior.dart +++ b/pkg/compiler/lib/src/native/behavior.dart @@ -21,7 +21,7 @@ export 'native_throw_behavior.dart'; typedef TypeLookup = Object? /*DartType|SpecialType*/ Function(String typeString, {bool required}); -/// This class is a temporary work-around until we get a more powerful DartType. +/// This class is a temporary workaround until we get a more powerful DartType. class SpecialType { final String name; const SpecialType._(this.name); diff --git a/pkg/compiler/lib/src/ssa/optimize.dart b/pkg/compiler/lib/src/ssa/optimize.dart index 8c07053e280..9bfab716248 100644 --- a/pkg/compiler/lib/src/ssa/optimize.dart +++ b/pkg/compiler/lib/src/ssa/optimize.dart @@ -1929,7 +1929,7 @@ class SsaInstructionSimplifier extends HBaseVisitor if (value is IntConstantValue) { // Only constant-fold int.toString() when Dart and JS results the // same. - // TODO(18103): We should be able to remove this work-around when + // TODO(18103): We should be able to remove this workaround when // issue 18103 is resolved by providing the correct string. if (!value.isUInt32()) return null; return asString('${value.intValue}'); diff --git a/pkg/compiler/test/codesize/swarm/swarm_ui_lib/touch/TouchHandler.dart b/pkg/compiler/test/codesize/swarm/swarm_ui_lib/touch/TouchHandler.dart index 60a0a2a1e52..d82dc997be5 100644 --- a/pkg/compiler/test/codesize/swarm/swarm_ui_lib/touch/TouchHandler.dart +++ b/pkg/compiler/test/codesize/swarm/swarm_ui_lib/touch/TouchHandler.dart @@ -25,7 +25,7 @@ part of touch; /// properties of the drag to you while the touch is happening and at the /// end of the drag sequence. This behavior will NOT perform the actual /// dragging (redrawing the element) for you, this responsibility is left to -/// the client code. This behavior contains a work around for a mobile +/// the client code. This behavior contains a workaround for a mobile /// safari bug where the 'touchend' event is not dispatched when the touch /// goes past the bottom of the browser window. /// This is intended to work well in iframes. diff --git a/pkg/dart2js_info/bin/src/live_code_size_analysis.dart b/pkg/dart2js_info/bin/src/live_code_size_analysis.dart index 8927b0565b2..7f2a7437bbf 100644 --- a/pkg/dart2js_info/bin/src/live_code_size_analysis.dart +++ b/pkg/dart2js_info/bin/src/live_code_size_analysis.dart @@ -21,7 +21,7 @@ /// environment flag. The flag only works dart2js version 1.13.0 or newer. /// /// * Launch the coverage server tool (in this package) to serve up the -/// Javascript code in your app: +/// JavaScript code in your app: /// /// dart tool/coverage_log_server.dart main.dart.js /// diff --git a/pkg/dev_compiler/lib/src/js_ast/printer.dart b/pkg/dev_compiler/lib/src/js_ast/printer.dart index 911327ca956..4b268126a3c 100644 --- a/pkg/dev_compiler/lib/src/js_ast/printer.dart +++ b/pkg/dev_compiler/lib/src/js_ast/printer.dart @@ -319,7 +319,7 @@ class Printer implements NodeVisitor { var elsePart = node.otherwise; bool hasElse = node.hasElse; - // Handle dangling elses and a work-around for Android 4.0 stock browser. + // Handle dangling elses and a workaround for Android 4.0 stock browser. // Android 4.0 requires braces for a single do-while in the `then` branch. // See issue 10923. if (hasElse) { diff --git a/pkg/dev_compiler/lib/src/kernel/command.dart b/pkg/dev_compiler/lib/src/kernel/command.dart index 5548ce22ddf..eba1b20a748 100644 --- a/pkg/dev_compiler/lib/src/kernel/command.dart +++ b/pkg/dev_compiler/lib/src/kernel/command.dart @@ -736,7 +736,7 @@ JSCode jsProgramToCode(js_ast.Program moduleTree, ModuleFormat format, /// names used when outputting the JavaScript. ModuleSymbols _emitSymbols(ProgramCompiler compiler, String moduleName, Map identifierNames, Component component) { - /// Returns the name selected in the final Javascript for [id]. + /// Returns the name selected in the final JavaScript for [id]. String lookupName(js_ast.Identifier id) { var name = identifierNames[id]; if (name == null) { diff --git a/pkg/dev_compiler/lib/src/kernel/expression_compiler.dart b/pkg/dev_compiler/lib/src/kernel/expression_compiler.dart index be7c3783425..6a179c7c0c5 100644 --- a/pkg/dev_compiler/lib/src/kernel/expression_compiler.dart +++ b/pkg/dev_compiler/lib/src/kernel/expression_compiler.dart @@ -220,7 +220,7 @@ class FileEndOffsetCalculator extends Visitor with VisitorNullMixin { /// can give such information for a given [node], i.e. satisfies one /// of the following conditions: /// - /// - a node with with a greater start offset that is a child of the + /// - a node with a greater start offset that is a child of the /// closest ancestor. The start offset of this child is used as a /// file end offset of the [node]. /// diff --git a/pkg/dev_compiler/lib/src/kernel/module_symbols_collector.dart b/pkg/dev_compiler/lib/src/kernel/module_symbols_collector.dart index f893bee063f..a936a06460b 100644 --- a/pkg/dev_compiler/lib/src/kernel/module_symbols_collector.dart +++ b/pkg/dev_compiler/lib/src/kernel/module_symbols_collector.dart @@ -67,7 +67,7 @@ class ModuleSymbolsCollector extends RecursiveVisitor { @override void visitClass(Class node) { - // Some class names are not emitted, i.e. mixin aplications. + // Some class names are not emitted, i.e. mixin applications. if (_classJsNames[node] != null) { var classSymbol = ClassSymbol( name: node.name, diff --git a/pkg/dev_compiler/lib/src/kernel/type_table.dart b/pkg/dev_compiler/lib/src/kernel/type_table.dart index 0a8596baa17..87ee2dff4ab 100644 --- a/pkg/dev_compiler/lib/src/kernel/type_table.dart +++ b/pkg/dev_compiler/lib/src/kernel/type_table.dart @@ -226,7 +226,7 @@ class TypeTable { // This is only reached when [type] is itself a bound that depends on a // free type parameter. // TODO(markzipan): Bounds are locally hoisted to their own JS identifiers, - // but we don't do this this for other types that depend on free variables, + // but we don't do this for other types that depend on free variables, // resulting in some duplicated runtime code. We may get some performance // wins if we just locally hoist everything. if (freeVariables.isNotEmpty) { diff --git a/pkg/dev_compiler/tool/compile_dartdevc_sdk.dart b/pkg/dev_compiler/tool/compile_dartdevc_sdk.dart index f24c12e39c6..e55e97e4551 100644 --- a/pkg/dev_compiler/tool/compile_dartdevc_sdk.dart +++ b/pkg/dev_compiler/tool/compile_dartdevc_sdk.dart @@ -4,7 +4,7 @@ // BSD-style license that can be found in the LICENSE file. /// Tool that consumes the .dill file of an entire dart-sdk and produces the -/// corresponding Javascript module. +/// corresponding JavaScript module. import 'dart:io'; import 'package:dev_compiler/src/kernel/command.dart'; diff --git a/pkg/front_end/lib/src/fasta/README.md b/pkg/front_end/lib/src/fasta/README.md index 953abaf1bc8..abb91f12acd 100644 --- a/pkg/front_end/lib/src/fasta/README.md +++ b/pkg/front_end/lib/src/fasta/README.md @@ -62,7 +62,7 @@ See [How to test Fasta](TESTING.md) ./sdk/bin/dart pkg/compiler/lib/src/dart2js.dart.dill pkg/front_end/test/fasta/hello.dart ``` -The output of dart2js will be `out.js`, and it can be run on any Javascript engine, for example, d8 which is included with the Dart SDK sources: +The output of dart2js will be `out.js`, and it can be run on any JavaScript engine, for example, d8 which is included with the Dart SDK sources: ``` ./third_party/d8//d8 out.js diff --git a/pkg/front_end/lib/src/fasta/kernel/redirecting_factory_body.dart b/pkg/front_end/lib/src/fasta/kernel/redirecting_factory_body.dart index 17d5d776d25..a2b0a532ac8 100644 --- a/pkg/front_end/lib/src/fasta/kernel/redirecting_factory_body.dart +++ b/pkg/front_end/lib/src/fasta/kernel/redirecting_factory_body.dart @@ -114,7 +114,7 @@ class RedirectingFactoryBody extends ReturnStatement { } static void restoreFromDill(Procedure factory) { - // This is a hack / work around for storing redirecting constructors in + // This is a hack / workaround for storing redirecting constructors in // dill files. See `ClassBuilder.addRedirectingConstructor` in // [kernel_class_builder.dart](kernel_class_builder.dart). FunctionNode function = factory.function; diff --git a/pkg/front_end/messages.yaml b/pkg/front_end/messages.yaml index 208ec9ac573..f36b3ac40de 100644 --- a/pkg/front_end/messages.yaml +++ b/pkg/front_end/messages.yaml @@ -4228,7 +4228,7 @@ InitializeFromDillUnknownProblemNoDump: WebLiteralCannotBeRepresentedExactly: problemMessage: "The integer literal #string can't be represented exactly in JavaScript." - correctionMessage: "Try changing the literal to something that can be represented in Javascript. In Javascript #string2 is the nearest value that can be represented exactly." + correctionMessage: "Try changing the literal to something that can be represented in JavaScript. In JavaScript #string2 is the nearest value that can be represented exactly." BoundIssueViaRawTypeWithNonSimpleBounds: problemMessage: "Generic type '#name' can't be used without type arguments in a type variable bound." diff --git a/pkg/frontend_server/lib/frontend_server.dart b/pkg/frontend_server/lib/frontend_server.dart index 3aef3802c0f..10f444af927 100644 --- a/pkg/frontend_server/lib/frontend_server.dart +++ b/pkg/frontend_server/lib/frontend_server.dart @@ -395,7 +395,7 @@ class FrontendCompiler implements CompilerInterface { late bool _printIncrementalDependencies; late ProcessedOptions _processedOptions; - /// Initialized in [writeJavascriptBundle] + /// Initialized in [writeJavaScriptBundle] IncrementalJavaScriptBundler? _bundler; /// Nullable fields @@ -605,7 +605,7 @@ class FrontendCompiler implements CompilerInterface { transformer?.transform(results.component!); if (_compilerOptions.target!.name == 'dartdevc') { - await writeJavascriptBundle(results, _kernelBinaryFilename, + await writeJavaScriptBundle(results, _kernelBinaryFilename, options['filesystem-scheme'], options['dartdevc-module-format'], fullComponent: true); } @@ -666,7 +666,7 @@ class FrontendCompiler implements CompilerInterface { } /// Write a JavaScript bundle containing the provided component. - Future writeJavascriptBundle(KernelCompilationResults results, + Future writeJavaScriptBundle(KernelCompilationResults results, String filename, String fileSystemScheme, String moduleFormat, {required bool fullComponent}) async { // ignore: unnecessary_null_comparison @@ -851,7 +851,7 @@ class FrontendCompiler implements CompilerInterface { deltaProgram.uriToSource.keys); if (_compilerOptions.target!.name == 'dartdevc') { - await writeJavascriptBundle(results, _kernelBinaryFilename, + await writeJavaScriptBundle(results, _kernelBinaryFilename, _options['filesystem-scheme'], _options['dartdevc-module-format'], fullComponent: false); } else { diff --git a/pkg/frontend_server/lib/src/strong_components.dart b/pkg/frontend_server/lib/src/strong_components.dart index 8955df66c27..4ea410a2553 100644 --- a/pkg/frontend_server/lib/src/strong_components.dart +++ b/pkg/frontend_server/lib/src/strong_components.dart @@ -40,7 +40,7 @@ class StrongComponents { /// The libraries loaded from a dill file that should not be processed. final Set loadedLibraries; - /// The main URI for thiis application. + /// The main URI for this application. final Uri mainUri; /// The filesystem instance for resolving files. diff --git a/pkg/frontend_server/test/frontend_server_test.dart b/pkg/frontend_server/test/frontend_server_test.dart index 2cb96be14ec..edb14a4964c 100644 --- a/pkg/frontend_server/test/frontend_server_test.dart +++ b/pkg/frontend_server/test/frontend_server_test.dart @@ -2488,7 +2488,7 @@ e() { frontendServer.close(); }); - test('compile expression to Javascript', () async { + test('compile expression to JavaScript', () async { var file = File('${tempDir.path}/foo.dart')..createSync(); file.writeAsStringSync("main() {\n}\n"); var packageConfig = File('${tempDir.path}/.dart_tool/package_config.json') @@ -2576,7 +2576,7 @@ e() { expect(count, 3); }); - test('compiled Javascript includes web library environment defines', + test('compiled JavaScript includes web library environment defines', () async { var file = File('${tempDir.path}/foo.dart')..createSync(); file.writeAsStringSync( diff --git a/pkg/js_ast/lib/src/printer.dart b/pkg/js_ast/lib/src/printer.dart index 02268941e81..eda51d7d6f2 100644 --- a/pkg/js_ast/lib/src/printer.dart +++ b/pkg/js_ast/lib/src/printer.dart @@ -376,7 +376,7 @@ class Printer implements NodeVisitor { Statement elsePart = node.otherwise; bool hasElse = node.hasElse; - // Handle dangling elses and a work-around for Android 4.0 stock browser. + // Handle dangling elses and a workaround for Android 4.0 stock browser. // Android 4.0 requires braces for a single do-while in the `then` branch. // See issue 10923. if (hasElse) { diff --git a/pkg/kernel/lib/ast.dart b/pkg/kernel/lib/ast.dart index 222cb5647a9..7036e9afc54 100644 --- a/pkg/kernel/lib/ast.dart +++ b/pkg/kernel/lib/ast.dart @@ -8305,7 +8305,7 @@ class StringLiteral extends BasicLiteral { class IntLiteral extends BasicLiteral { /// Note that this value holds a uint64 value. /// E.g. "0x8000000000000000" will be saved as "-9223372036854775808" despite - /// technically (on some platforms, particularly Javascript) being positive. + /// technically (on some platforms, particularly JavaScript) being positive. /// If the number is meant to be negative it will be wrapped in a "unary-". @override int value; diff --git a/pkg/kernel/lib/target/targets.dart b/pkg/kernel/lib/target/targets.dart index b4758f7a724..4dfbd571cb7 100644 --- a/pkg/kernel/lib/target/targets.dart +++ b/pkg/kernel/lib/target/targets.dart @@ -389,8 +389,8 @@ abstract class Target { bool get nativeExtensionExpectsString => false; /// Whether integer literals that cannot be represented exactly on the web - /// (i.e. in Javascript) should cause an error to be issued. - /// An example of such a number is `2^53 + 1` where in Javascript - because + /// (i.e. in JavaScript) should cause an error to be issued. + /// An example of such a number is `2^53 + 1` where in JavaScript - because /// integers are represented as doubles /// `Math.pow(2, 53) = Math.pow(2, 53) + 1`. bool get errorOnUnexactWebIntLiterals => false; diff --git a/pkg/status_file/test/data/co19-dart2js.status b/pkg/status_file/test/data/co19-dart2js.status index c711a03c40e..8074b97230d 100644 --- a/pkg/status_file/test/data/co19-dart2js.status +++ b/pkg/status_file/test/data/co19-dart2js.status @@ -1020,7 +1020,7 @@ LayoutTests/fast/dom/DOMException/dispatch-event-exception_t01: RuntimeError # h LayoutTests/fast/dom/DOMImplementation/createDocument-namespace-err_t01: RuntimeError # Please triage this failure LayoutTests/fast/dom/DOMImplementation/createDocumentType-err_t01: RuntimeError # Please triage this failure LayoutTests/fast/dom/Document/CaretRangeFromPoint/basic_t01: RuntimeError # Please triage this failure -LayoutTests/fast/dom/Document/CaretRangeFromPoint/caretRangeFromPoint-in-strict-mode-wtih-checkbox_t01: Pass, RuntimeError # Please triage this failure +LayoutTests/fast/dom/Document/CaretRangeFromPoint/caretRangeFromPoint-in-strict-mode-with-checkbox_t01: Pass, RuntimeError # Please triage this failure LayoutTests/fast/dom/Document/CaretRangeFromPoint/caretRangeFromPoint-in-zoom-and-scroll_t01: RuntimeError # Please triage this failure LayoutTests/fast/dom/Document/CaretRangeFromPoint/hittest-relative-to-viewport_t01: RuntimeError # Please triage this failure LayoutTests/fast/dom/Document/CaretRangeFromPoint/replace-element_t01: RuntimeError # Please triage this failure. @@ -2117,7 +2117,7 @@ LayoutTests/fast/dom/DOMException/dispatch-event-exception_t01: RuntimeError # P LayoutTests/fast/dom/DOMImplementation/createDocument-namespace-err_t01: RuntimeError # Please triage this failure LayoutTests/fast/dom/DOMImplementation/createDocumentType-err_t01: RuntimeError # Please triage this failure LayoutTests/fast/dom/Document/CaretRangeFromPoint/basic_t01: RuntimeError # Please triage this failure -LayoutTests/fast/dom/Document/CaretRangeFromPoint/caretRangeFromPoint-in-strict-mode-wtih-checkbox_t01: RuntimeError # Please triage this failure +LayoutTests/fast/dom/Document/CaretRangeFromPoint/caretRangeFromPoint-in-strict-mode-with-checkbox_t01: RuntimeError # Please triage this failure LayoutTests/fast/dom/Document/CaretRangeFromPoint/caretRangeFromPoint-in-user-select-none_t01: RuntimeError # Please triage this failure LayoutTests/fast/dom/Document/CaretRangeFromPoint/caretRangeFromPoint-in-zoom-and-scroll_t01: RuntimeError # Please triage this failure LayoutTests/fast/dom/Document/CaretRangeFromPoint/caretRangeFromPoint-with-first-letter-style_t01: RuntimeError # Please triage this failure @@ -3455,7 +3455,7 @@ LayoutTests/fast/dom/DOMException/XPathException_t01: RuntimeError # Please tria LayoutTests/fast/dom/DOMException/dispatch-event-exception_t01: RuntimeError # Please triage this failure LayoutTests/fast/dom/DOMImplementation/createDocument-namespace-err_t01: RuntimeError # Please triage this failure LayoutTests/fast/dom/Document/CaretRangeFromPoint/basic_t01: RuntimeError # Please triage this failure -LayoutTests/fast/dom/Document/CaretRangeFromPoint/caretRangeFromPoint-in-strict-mode-wtih-checkbox_t01: RuntimeError # Please triage this failure +LayoutTests/fast/dom/Document/CaretRangeFromPoint/caretRangeFromPoint-in-strict-mode-with-checkbox_t01: RuntimeError # Please triage this failure LayoutTests/fast/dom/Document/CaretRangeFromPoint/caretRangeFromPoint-in-user-select-none_t01: RuntimeError # Please triage this failure LayoutTests/fast/dom/Document/CaretRangeFromPoint/caretRangeFromPoint-in-zoom-and-scroll_t01: RuntimeError # Please triage this failure LayoutTests/fast/dom/Document/CaretRangeFromPoint/caretRangeFromPoint-with-first-letter-style_t01: RuntimeError # Please triage this failure @@ -4812,7 +4812,7 @@ LayoutTests/fast/dom/DOMException/XPathException_t01: RuntimeError # Please tria LayoutTests/fast/dom/DOMException/dispatch-event-exception_t01: RuntimeError # Please triage this failure LayoutTests/fast/dom/DOMImplementation/createDocument-namespace-err_t01: RuntimeError # Please triage this failure LayoutTests/fast/dom/Document/CaretRangeFromPoint/basic_t01: RuntimeError # Please triage this failure -LayoutTests/fast/dom/Document/CaretRangeFromPoint/caretRangeFromPoint-in-strict-mode-wtih-checkbox_t01: RuntimeError # Please triage this failure +LayoutTests/fast/dom/Document/CaretRangeFromPoint/caretRangeFromPoint-in-strict-mode-with-checkbox_t01: RuntimeError # Please triage this failure LayoutTests/fast/dom/Document/CaretRangeFromPoint/caretRangeFromPoint-in-user-select-none_t01: RuntimeError # Please triage this failure LayoutTests/fast/dom/Document/CaretRangeFromPoint/caretRangeFromPoint-in-zoom-and-scroll_t01: RuntimeError # Please triage this failure LayoutTests/fast/dom/Document/CaretRangeFromPoint/caretRangeFromPoint-with-first-letter-style_t01: RuntimeError # Please triage this failure diff --git a/pkg/testing/README.md b/pkg/testing/README.md index b0e5474913b..f682c77979a 100644 --- a/pkg/testing/README.md +++ b/pkg/testing/README.md @@ -21,9 +21,9 @@ This package is not: We want to test tool chains, for example, a Dart compiler. Depending on the tool chain, it may comprise several individual steps. For example, to test dart2js, you have these steps: - 1. Run dart2js on a Dart source file to produce a Javascript output file. + 1. Run dart2js on a Dart source file to produce a JavaScript output file. - 2. Run the Javascript file from step 1 on a Javascript interpreter and report if the program threw an exception. + 2. Run the JavaScript file from step 1 on a JavaScript interpreter and report if the program threw an exception. On the other hand, to test a Dart VM, there's only one step: diff --git a/runtime/lib/array.cc b/runtime/lib/array.cc index 4c446ce798c..2f573b01386 100644 --- a/runtime/lib/array.cc +++ b/runtime/lib/array.cc @@ -65,7 +65,7 @@ DEFINE_NATIVE_ENTRY(List_slice, 0, 4) { // Private factory, expects correct arguments. DEFINE_NATIVE_ENTRY(ImmutableList_from, 0, 4) { - // Ignore first argument of a thsi factory (type argument). + // Ignore first argument of this factory (type argument). const Array& from_array = Array::CheckedHandle(zone, arguments->NativeArgAt(1)); const Smi& smi_offset = Smi::CheckedHandle(zone, arguments->NativeArgAt(2)); diff --git a/runtime/observatory/tests/service/service_test_common.dart b/runtime/observatory/tests/service/service_test_common.dart index 50afe399ebf..bd4bebe551c 100644 --- a/runtime/observatory/tests/service/service_test_common.dart +++ b/runtime/observatory/tests/service/service_test_common.dart @@ -83,7 +83,7 @@ Future asyncStepOver(Isolate isolate) async { } } - // Complete futures with with error. + // Complete futures with error. completeError(error) { if (!pausedAtSyntheticBreakpoint.isCompleted) { pausedAtSyntheticBreakpoint.completeError(error); diff --git a/runtime/observatory_2/tests/service_2/service_test_common.dart b/runtime/observatory_2/tests/service_2/service_test_common.dart index a8530b0f68e..ffa60125140 100644 --- a/runtime/observatory_2/tests/service_2/service_test_common.dart +++ b/runtime/observatory_2/tests/service_2/service_test_common.dart @@ -85,7 +85,7 @@ Future asyncStepOver(Isolate isolate) async { } } - // Complete futures with with error. + // Complete futures with error. completeError(error) { if (!pausedAtSyntheticBreakpoint.isCompleted) { pausedAtSyntheticBreakpoint.completeError(error); diff --git a/runtime/platform/utils.h b/runtime/platform/utils.h index a4caafda349..dd3966f18f3 100644 --- a/runtime/platform/utils.h +++ b/runtime/platform/utils.h @@ -461,7 +461,7 @@ class Utils { // dart2js represents integers as double precision floats, which can // represent anything in the range -2^53 ... 2^53. - static bool IsJavascriptInt(int64_t value) { + static bool IsJavaScriptInt(int64_t value) { return ((-0x20000000000000LL <= value) && (value <= 0x20000000000000LL)); } diff --git a/runtime/vm/compiler/stub_code_compiler_arm64.cc b/runtime/vm/compiler/stub_code_compiler_arm64.cc index c2d980ff7f0..4e6e37a7350 100644 --- a/runtime/vm/compiler/stub_code_compiler_arm64.cc +++ b/runtime/vm/compiler/stub_code_compiler_arm64.cc @@ -3393,7 +3393,7 @@ static void GenerateIdenticalWithNumberCheckStub(Assembler* assembler, __ CompareObjectRegisters(left, right); // None of the branches above go directly here to avoid generating a // conditional branch to a ret instruction. - // This is an attempt to work-around a possible CPU on Exynos 2100 SoC. + // This is an attempt to workaround a possible CPU on Exynos 2100 SoC. // See https://github.com/flutter/flutter/issues/88261 __ ret(); } diff --git a/runtime/vm/dart.cc b/runtime/vm/dart.cc index 8df7a2ae403..7995adb0c54 100644 --- a/runtime/vm/dart.cc +++ b/runtime/vm/dart.cc @@ -539,10 +539,10 @@ char* Dart::Init(const Dart_InitializeParams* params) { } static void DumpAliveIsolates(intptr_t num_attempts, - bool only_aplication_isolates) { + bool only_application_isolates) { IsolateGroup::ForEach([&](IsolateGroup* group) { group->ForEachIsolate([&](Isolate* isolate) { - if (!only_aplication_isolates || !Isolate::IsSystemIsolate(isolate)) { + if (!only_application_isolates || !Isolate::IsSystemIsolate(isolate)) { OS::PrintErr("Attempt:%" Pd " waiting for isolate %s to check in\n", num_attempts, isolate->name()); } diff --git a/runtime/vm/json_writer.cc b/runtime/vm/json_writer.cc index b0358f3e89a..5b7ca3ade95 100644 --- a/runtime/vm/json_writer.cc +++ b/runtime/vm/json_writer.cc @@ -326,7 +326,7 @@ bool JSONWriter::NeedComma() { void JSONWriter::EnsureIntegerIsRepresentableInJavaScript(int64_t i) { #ifdef DEBUG - if (!Utils::IsJavascriptInt(i)) { + if (!Utils::IsJavaScriptInt(i)) { OS::PrintErr( "JSONWriter::EnsureIntegerIsRepresentableInJavaScript failed on " "%" Pd64 "\n", diff --git a/sdk/lib/_internal/js_dev_runtime/private/preambles/d8.js b/sdk/lib/_internal/js_dev_runtime/private/preambles/d8.js index 0c432f514d0..b47d4709bd2 100644 --- a/sdk/lib/_internal/js_dev_runtime/private/preambles/d8.js +++ b/sdk/lib/_internal/js_dev_runtime/private/preambles/d8.js @@ -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. -// Javascript preamble, that lets the output of dart2js run on V8's d8 shell. +// JavaScript preamble, that lets the output of dart2js run on V8's d8 shell. // Node wraps files and provides them with a different `this`. The global // `this` can be accessed through `global`. diff --git a/sdk/lib/_internal/js_dev_runtime/private/preambles/jsshell.js b/sdk/lib/_internal/js_dev_runtime/private/preambles/jsshell.js index 8f13bcc8f28..ab0c67454d2 100644 --- a/sdk/lib/_internal/js_dev_runtime/private/preambles/jsshell.js +++ b/sdk/lib/_internal/js_dev_runtime/private/preambles/jsshell.js @@ -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. -// Javascript preamble, that lets the output of dart2js run on JSShell. +// JavaScript preamble, that lets the output of dart2js run on JSShell. (function(self) { // Using strict mode to avoid accidentally defining global variables. diff --git a/sdk/lib/_internal/js_runtime/lib/js_patch.dart b/sdk/lib/_internal/js_runtime/lib/js_patch.dart index 2c9ebf9d1c0..ede166822ac 100644 --- a/sdk/lib/_internal/js_runtime/lib/js_patch.dart +++ b/sdk/lib/_internal/js_runtime/lib/js_patch.dart @@ -414,7 +414,7 @@ final _dartProxyCtor = JS('', 'function DartObject(o) { this.o = o; }'); Object? _convertToJS(Object? o) { // Note: we don't write `if (o == null) return null;` to make sure dart2js // doesn't convert `return null;` into `return;` (which would make `null` be - // `undefined` in Javascprit). See dartbug.com/20305 for details. + // `undefined` in JavaScript). See dartbug.com/20305 for details. if (o == null || o is String || o is num || o is bool) { return o; } diff --git a/sdk/lib/_internal/js_runtime/lib/preambles/d8.js b/sdk/lib/_internal/js_runtime/lib/preambles/d8.js index 6604c8a5e57..f29be3e232f 100644 --- a/sdk/lib/_internal/js_runtime/lib/preambles/d8.js +++ b/sdk/lib/_internal/js_runtime/lib/preambles/d8.js @@ -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. -// Javascript preamble, that lets the output of dart2js run on V8's d8 shell. +// JavaScript preamble, that lets the output of dart2js run on V8's d8 shell. // Node wraps files and provides them with a different `this`. The global // `this` can be accessed through `global`. diff --git a/sdk/lib/_internal/js_runtime/lib/preambles/jsshell.js b/sdk/lib/_internal/js_runtime/lib/preambles/jsshell.js index 48f60cd49b3..45ffacdb373 100644 --- a/sdk/lib/_internal/js_runtime/lib/preambles/jsshell.js +++ b/sdk/lib/_internal/js_runtime/lib/preambles/jsshell.js @@ -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. -// Javascript preamble, that lets the output of dart2js run on JSShell. +// JavaScript preamble, that lets the output of dart2js run on JSShell. (function(self, scriptArguments) { // Using strict mode to avoid accidentally defining global variables. diff --git a/sdk/lib/_internal/vm/lib/growable_array.dart b/sdk/lib/_internal/vm/lib/growable_array.dart index 669bc65f331..849f975d3a2 100644 --- a/sdk/lib/_internal/vm/lib/growable_array.dart +++ b/sdk/lib/_internal/vm/lib/growable_array.dart @@ -374,7 +374,7 @@ class _GrowableList extends ListBase { void _grow(int new_capacity) { var newData = _allocateData(new_capacity); - // This is a work-around for dartbug.com/30090: array-bound-check + // This is a workaround for dartbug.com/30090: array-bound-check // generalization causes excessive deoptimizations because it // hoists CheckArrayBound(i, ...) out of the loop below and turns it // into CheckArrayBound(length - 1, ...). Which deoptimizes @@ -398,7 +398,7 @@ class _GrowableList extends ListBase { void _shrink(int new_capacity, int new_length) { var newData = _allocateData(new_capacity); - // This is a work-around for dartbug.com/30090. See the comment in _grow. + // This is a workaround for dartbug.com/30090. See the comment in _grow. if (new_length > 0) { for (int i = 0; i < new_length; i++) { newData[i] = this[i]; diff --git a/sdk/lib/js/js.dart b/sdk/lib/js/js.dart index c97d96897d7..7f2921e1299 100644 --- a/sdk/lib/js/js.dart +++ b/sdk/lib/js/js.dart @@ -47,7 +47,7 @@ /// /// ## Proxying and automatic conversion /// -/// When setting properties on a JsObject or passing arguments to a Javascript +/// When setting properties on a JsObject or passing arguments to a JavaScript /// method or function, Dart objects are automatically converted or proxied to /// JavaScript objects. When accessing JavaScript properties, or when a Dart /// closure is invoked from JavaScript, the JavaScript objects are also diff --git a/tests/language/inference_update_2/no_such_method_restriction_stack_trace_test.dart b/tests/language/inference_update_2/no_such_method_restriction_stack_trace_test.dart index 6642e77f981..71af643d57a 100644 --- a/tests/language/inference_update_2/no_such_method_restriction_stack_trace_test.dart +++ b/tests/language/inference_update_2/no_such_method_restriction_stack_trace_test.dart @@ -22,7 +22,7 @@ main() { // files from this stack trace, so just let the test pass. // // Note: it's not sufficient to check for the absence of `.dart` in the - // stacktrace, because obfuscated Javascript stacktraces often contain + // stacktrace, because obfuscated JavaScript stacktraces often contain // `self.dartMainRunner`. } else { Expect.contains( diff --git a/tests/language/method/binding_test.dart b/tests/language/method/binding_test.dart index b728d156311..7755d1c6fa6 100644 --- a/tests/language/method/binding_test.dart +++ b/tests/language/method/binding_test.dart @@ -151,7 +151,7 @@ class MethodBindingTest { A.func = A.foo; Expect.equals(4, A.func()); - // bind a function that is possibly native in Javascript. + // bind a function that is possibly native in JavaScript. String o15 = 'hithere'; var f15 = o15.substring; Expect.equals('i', f15(1, 2)); diff --git a/tests/language/mixin_declaration/mixin_declaration_syntax_test.dart b/tests/language/mixin_declaration/mixin_declaration_syntax_test.dart index e7334db539b..bc64ae14b4d 100644 --- a/tests/language/mixin_declaration/mixin_declaration_syntax_test.dart +++ b/tests/language/mixin_declaration/mixin_declaration_syntax_test.dart @@ -189,7 +189,7 @@ class CAaMAiBCaMBCiIJ_2 extends CAaMAiBC with MBCiIJ {} // Abstract mixin application does not implement I and J. abstract class OaMiIJ = O with MiIJ; -// Concrete subclass of abstract mixin appliction +// Concrete subclass of abstract mixin application class COaMiIJ extends OaMiIJ { String toString() => "${super.toString()}:COaMiIJ"; String methodI() => "COaMiIJ:${this}.I"; @@ -199,7 +199,7 @@ class COaMiIJ extends OaMiIJ { // Abstract class with mixin application and does not implement I and J. abstract class OaMiIJ_2 extends O with MiIJ {} -// Concrete subclass of abstract mixin appliction +// Concrete subclass of abstract mixin application class COaMiIJ_2 extends OaMiIJ_2 { String toString() => "${super.toString()}:COaMiIJ"; String methodI() => "COaMiIJ:${this}.I"; diff --git a/tests/language_2/inference_update_2/no_such_method_restriction_stack_trace_test.dart b/tests/language_2/inference_update_2/no_such_method_restriction_stack_trace_test.dart index e1fb5a3687f..e693e8170f5 100644 --- a/tests/language_2/inference_update_2/no_such_method_restriction_stack_trace_test.dart +++ b/tests/language_2/inference_update_2/no_such_method_restriction_stack_trace_test.dart @@ -24,7 +24,7 @@ main() { // files from this stack trace, so just let the test pass. // // Note: it's not sufficient to check for the absence of `.dart` in the - // stacktrace, because obfuscated Javascript stacktraces often contain + // stacktrace, because obfuscated JavaScript stacktraces often contain // `self.dartMainRunner`. } else { Expect.contains( diff --git a/tests/language_2/method/binding_test.dart b/tests/language_2/method/binding_test.dart index bb15cf171db..6f708de15a1 100644 --- a/tests/language_2/method/binding_test.dart +++ b/tests/language_2/method/binding_test.dart @@ -153,7 +153,7 @@ class MethodBindingTest { A.func = A.foo; Expect.equals(4, A.func()); - // bind a function that is possibly native in Javascript. + // bind a function that is possibly native in JavaScript. String o15 = 'hithere'; var f15 = o15.substring; Expect.equals('i', f15(1, 2)); diff --git a/tests/language_2/mixin_declaration/mixin_declaration_syntax_test.dart b/tests/language_2/mixin_declaration/mixin_declaration_syntax_test.dart index 0fb96be503f..41ce938ba9f 100644 --- a/tests/language_2/mixin_declaration/mixin_declaration_syntax_test.dart +++ b/tests/language_2/mixin_declaration/mixin_declaration_syntax_test.dart @@ -191,7 +191,7 @@ class CAaMAiBCaMBCiIJ_2 extends CAaMAiBC with MBCiIJ {} // Abstract mixin application does not implement I and J. abstract class OaMiIJ = O with MiIJ; -// Concrete subclass of abstract mixin appliction +// Concrete subclass of abstract mixin application class COaMiIJ extends OaMiIJ { String toString() => "${super.toString()}:COaMiIJ"; String methodI() => "COaMiIJ:${this}.I"; @@ -201,7 +201,7 @@ class COaMiIJ extends OaMiIJ { // Abstract class with mixin application and does not implement I and J. abstract class OaMiIJ_2 extends O with MiIJ {} -// Concrete subclass of abstract mixin appliction +// Concrete subclass of abstract mixin application class COaMiIJ_2 extends OaMiIJ_2 { String toString() => "${super.toString()}:COaMiIJ"; String methodI() => "COaMiIJ:${this}.I"; diff --git a/tests/web/weak_reference_test.dart b/tests/web/weak_reference_test.dart index 3bbaa212360..6fcd75beaa2 100644 --- a/tests/web/weak_reference_test.dart +++ b/tests/web/weak_reference_test.dart @@ -23,8 +23,8 @@ main() { var weakRef = WeakReference>(list); expect(weakRef.target, equals(list)); - // Javascript API throws when the representation of target is not 'object' - // in the compiled Javascript. + // JavaScript API throws when the representation of target is not 'object' + // in the compiled JavaScript. expect(() => WeakReference("foo"), throws); expect(() => WeakReference(1), throws); }); diff --git a/tests/web_2/weak_reference_test.dart b/tests/web_2/weak_reference_test.dart index 3bbaa212360..6fcd75beaa2 100644 --- a/tests/web_2/weak_reference_test.dart +++ b/tests/web_2/weak_reference_test.dart @@ -23,8 +23,8 @@ main() { var weakRef = WeakReference>(list); expect(weakRef.target, equals(list)); - // Javascript API throws when the representation of target is not 'object' - // in the compiled Javascript. + // JavaScript API throws when the representation of target is not 'object' + // in the compiled JavaScript. expect(() => WeakReference("foo"), throws); expect(() => WeakReference(1), throws); }); diff --git a/tools/dom/scripts/dartdomgenerator.py b/tools/dom/scripts/dartdomgenerator.py index 132f6c22968..bf0ea0152ee 100755 --- a/tools/dom/scripts/dartdomgenerator.py +++ b/tools/dom/scripts/dartdomgenerator.py @@ -307,7 +307,7 @@ def main(): dest='dart_js_interop', action='store_true', default=False, - help='Use Javascript objects (dart:js) accessing the DOM in _blink') + help='Use JavaScript objects (dart:js) accessing the DOM in _blink') parser.add_option( '--no-cached-patches', dest='no_cached_patches', diff --git a/tools/dom/scripts/generate_blink_file.py b/tools/dom/scripts/generate_blink_file.py index 48a46126c5d..323bb3fe9fc 100644 --- a/tools/dom/scripts/generate_blink_file.py +++ b/tools/dom/scripts/generate_blink_file.py @@ -563,7 +563,7 @@ def _Process_Operations(blink_file, # List of DartName operations to not emit (e.g., For now only WebGL2RenderingContextBase # has readPixels in both WebGLRenderingContextBase and WebGL2RenderingContextBase. -# Furthermore, readPixels has the exact same number of arguments - in Javascript +# Furthermore, readPixels has the exact same number of arguments - in JavaScript # there is no typing so they're the same. suppressed_operations = { 'WebGL2RenderingContextBase': ['readPixels2', 'texImage2D2'], diff --git a/tools/dom/src/dart2js_CssClassSet.dart b/tools/dom/src/dart2js_CssClassSet.dart index 00d80bc708b..d0f747d4ae7 100644 --- a/tools/dom/src/dart2js_CssClassSet.dart +++ b/tools/dom/src/dart2js_CssClassSet.dart @@ -215,7 +215,7 @@ class _ElementCssClassSet extends CssClassSetImpl { } // A collection of static methods for DomTokenList. These methods are a - // work-around for the lack of annotations to express the full behaviour of + // workaround for the lack of annotations to express the full behaviour of // the DomTokenList methods. static DomTokenList _classListOf(Element e) => JS( diff --git a/utils/aot_snapshot.gni b/utils/aot_snapshot.gni index c93fe836d24..86de3ba4fa5 100644 --- a/utils/aot_snapshot.gni +++ b/utils/aot_snapshot.gni @@ -86,7 +86,7 @@ template("aot_snapshot") { "--output=" + rebase_path(output, root_build_dir), "--depfile=" + rebase_path(depfile), - # Ensure the compiled appliation (e.g. kernel-service, frontend-server, + # Ensure the compiled application (e.g. kernel-service, frontend-server, # ...) will use this SDK hash when consuming/producing kernel. # # (Instead of ensuring every user of the "application_snapshot" / diff --git a/utils/application_snapshot.gni b/utils/application_snapshot.gni index bf8b0c85191..336645fbb68 100644 --- a/utils/application_snapshot.gni +++ b/utils/application_snapshot.gni @@ -128,7 +128,7 @@ template("_application_snapshot") { "--output=" + rebase_path(output, root_build_dir), "--depfile=" + rebase_path(depfile), - # Ensure the compiled appliation (e.g. kernel-service, frontend-server, + # Ensure the compiled application (e.g. kernel-service, frontend-server, # ...) will use this SDK hash when consuming/producing kernel. # # (Instead of ensuring every user of the "application_snapshot" / diff --git a/utils/dartdevc/BUILD.gn b/utils/dartdevc/BUILD.gn index 79bb12baf8c..05418a6054e 100644 --- a/utils/dartdevc/BUILD.gn +++ b/utils/dartdevc/BUILD.gn @@ -9,7 +9,7 @@ import("../application_snapshot.gni") import("../create_timestamp.gni") declare_args() { - # Enables DDC canary features during compilation to Javascript. + # Enables DDC canary features during compilation to JavaScript. ddc_canary = false }