Spelling fixes e to i.

R=kevmoo@google.com
BUG=

Review-Url: https://codereview.chromium.org/2957593002 .
This commit is contained in:
Erik Corry 2017-06-24 13:41:35 +02:00
parent b683e47c1a
commit 029b1cb948
164 changed files with 217 additions and 214 deletions

View file

@ -164,7 +164,7 @@ config("compiler") {
ldflags += common_mac_flags ldflags += common_mac_flags
} else if (is_posix) { } else if (is_posix) {
# CPU architecture. We may or may not be doing a cross compile now, so for # 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") { if (current_cpu == "x64") {
cflags += [ cflags += [
"-m64", "-m64",

View file

@ -269,7 +269,7 @@ abstract class CommonInputConverter extends Converter<String, Operation> {
/** /**
* [InputConverter] converts an input stream * [InputConverter] converts an input stream
* into a series of operations to be sent to the analysis server. * 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<String, Operation> { class InputConverter extends Converter<String, Operation> {
final Logger logger = new Logger('InputConverter'); final Logger logger = new Logger('InputConverter');

View file

@ -2054,7 +2054,7 @@ int myFunc() {}
} }
test_FieldFormalParameter_in_non_constructor() async { test_FieldFormalParameter_in_non_constructor() async {
// SimpleIdentifer FieldFormalParameter FormalParameterList // SimpleIdentifier FieldFormalParameter FormalParameterList
addTestSource('class A {B(this.^foo) {}}'); addTestSource('class A {B(this.^foo) {}}');
await computeSuggestions(); await computeSuggestions();
expect(replacementOffset, completionOffset); expect(replacementOffset, completionOffset);

View file

@ -1882,7 +1882,7 @@ class C {foo(){^} void bar() {}}''');
} }
test_FieldFormalParameter_in_non_constructor() async { test_FieldFormalParameter_in_non_constructor() async {
// SimpleIdentifer FieldFormalParameter FormalParameterList // SimpleIdentifier FieldFormalParameter FormalParameterList
addTestSource('class A {B(this.^foo) {}}'); addTestSource('class A {B(this.^foo) {}}');
await computeSuggestions(); await computeSuggestions();

View file

@ -2370,7 +2370,7 @@ class C {foo(){^} void bar() {}}''');
} }
test_FieldFormalParameter_in_non_constructor() async { test_FieldFormalParameter_in_non_constructor() async {
// SimpleIdentifer FieldFormalParameter FormalParameterList // SimpleIdentifier FieldFormalParameter FormalParameterList
addTestSource('class A {B(this.^foo) {}}'); addTestSource('class A {B(this.^foo) {}}');
await computeSuggestions(); await computeSuggestions();

View file

@ -1891,7 +1891,7 @@ void main() {new A().f^}''');
} }
test_FieldFormalParameter_in_non_constructor() async { test_FieldFormalParameter_in_non_constructor() async {
// SimpleIdentifer FieldFormalParameter FormalParameterList // SimpleIdentifier FieldFormalParameter FormalParameterList
addTestSource('class A {B(this.^foo) {}}'); addTestSource('class A {B(this.^foo) {}}');
await computeSuggestions(); await computeSuggestions();
expect(replacementOffset, completionOffset); expect(replacementOffset, completionOffset);

View file

@ -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. * Clients may not extend, implement or mix-in this class.
*/ */

View file

@ -12,7 +12,7 @@ import 'package:yaml/yaml.dart';
/// Validates options as defined in an analysis options file. /// Validates options as defined in an analysis options file.
/// ///
/// The options file format is intentionally very open-ended, giving clients /// 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 /// expectation is that options files will contain a mapping from Strings
/// (identifying 'scopes') to associated options. For example, the given /// (identifying 'scopes') to associated options. For example, the given
/// content /// content

View file

@ -2151,7 +2151,7 @@ class InterfaceTypeImpl extends TypeImpl implements InterfaceType {
_computeSuperinterfaceSet(type, new HashSet<InterfaceType>()); _computeSuperinterfaceSet(type, new HashSet<InterfaceType>());
/** /**
* 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. * to Object of unique length.
*/ */
static InterfaceType computeTypeAtMaxUniqueDepth(List<InterfaceType> types) { static InterfaceType computeTypeAtMaxUniqueDepth(List<InterfaceType> types) {

View file

@ -800,12 +800,12 @@ class InheritanceManager {
// we create a warning, and have this class inherit nothing. // we create a warning, and have this class inherit nothing.
// //
if (!classHasMember) { if (!classHasMember) {
String firstTwoFuntionTypesStr = String firstTwoFunctionTypesStr =
"${executableElementTypes[0]}, ${executableElementTypes[1]}"; "${executableElementTypes[0]}, ${executableElementTypes[1]}";
_reportError( _reportError(
classElt, classElt,
StaticTypeWarningCode.INCONSISTENT_METHOD_INHERITANCE, StaticTypeWarningCode.INCONSISTENT_METHOD_INHERITANCE,
[key, firstTwoFuntionTypesStr]); [key, firstTwoFunctionTypesStr]);
} }
} else { } else {
// //

View file

@ -2948,7 +2948,7 @@ class StaticTypeWarningCode extends ErrorCode {
"The function '{0}' isn't defined.", "The function '{0}' isn't defined.",
"Try importing the library that defines '{0}', " "Try importing the library that defines '{0}', "
"correcting the name to the name of an existing function, or " "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 <i>T</i> be the static type of <i>e</i>. It is * 12.17 Getter Invocation: Let <i>T</i> be the static type of <i>e</i>. It is

View file

@ -2223,7 +2223,7 @@ class ElementResolver extends SimpleAstVisitor<Object> {
* invoked with the arguments. The [target] is the target of the invocation * 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 * ('e'). The [targetType] is the type of the target. The [methodName] is th
* name of the method being invoked ('m'). [isConditional] indicates * 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, Element _resolveInvokedElementWithTarget(Expression target,
DartType targetType, SimpleIdentifier methodName, bool isConditional) { DartType targetType, SimpleIdentifier methodName, bool isConditional) {

View file

@ -1857,7 +1857,7 @@ class ConstantVerifier extends RecursiveAstVisitor<Object> {
Expression initializer = variableDeclaration.initializer; Expression initializer = variableDeclaration.initializer;
if (initializer != null) { if (initializer != null) {
// Ignore any errors produced during validation--if the constant // 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 errorListener =
AnalysisErrorListener.NULL_LISTENER; AnalysisErrorListener.NULL_LISTENER;
ErrorReporter subErrorReporter = ErrorReporter subErrorReporter =

View file

@ -182,7 +182,7 @@ class ConstExpressionBuilder extends ExpressionListener {
// bit-masks to encode async modifiers as bits on an int. // 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 /// The parser produces different trees depending on whether it is used for
/// constants or initializers, so subclasses specialize the logic accordingly. /// 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. /// Whether this listener is used to build const expressions.
bool get forConst => false; 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). /// that are either invalid (in constants) or unnecessary (for initializers).
bool get ignore => _withinFunction > 0 || _withinCascades > 0; bool get ignore => _withinFunction > 0 || _withinCascades > 0;

View file

@ -229,7 +229,7 @@ class AnalysisDriver {
*/ */
bool performAnalysisTask() { 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 // 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 // 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. // files to be analyzed. There are a couple of ways to do this.

View file

@ -4155,7 +4155,7 @@ main() {
parseExpression("f()++", [ParserErrorCode.UNEXPECTED_TOKEN]); parseExpression("f()++", [ParserErrorCode.UNEXPECTED_TOKEN]);
} }
void test_unexpectedToken_returnInExpressionFuntionBody() { void test_unexpectedToken_returnInExpressionFunctionBody() {
parseCompilationUnit( parseCompilationUnit(
"f() => return null;", [ParserErrorCode.UNEXPECTED_TOKEN]); "f() => return null;", [ParserErrorCode.UNEXPECTED_TOKEN]);
} }

View file

@ -349,7 +349,7 @@ test() {
'''); ''');
} }
test_constantGenericTypeArg_explict() async { test_constantGenericTypeArg_explicit() async {
// Regression test for https://github.com/dart-lang/sdk/issues/26141 // Regression test for https://github.com/dart-lang/sdk/issues/26141
await checkFile(''' await checkFile('''
abstract class Equality<R> {} abstract class Equality<R> {}

View file

@ -242,7 +242,7 @@ revisited
AI: change how we build the SDK to launch dart2js from here, most logic might AI: change how we build the SDK to launch dart2js from here, most logic might
remain inside `lib/src/dart2js.dart` for testing purposes. 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 serializer. As we are moving to work on top of kernel this is deprecated and
should be deleted. should be deleted.
@ -268,7 +268,7 @@ library during `pub-build` and `pub-serve`.
is another), and delete the legacy API. is another), and delete the legacy API.
**lib/src folder**: most of the compiler lives here, as very little of its **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 * `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 expressions may be folded. Different implementations of the constant system
are used to target Dart or JavaScript. 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. created from a parsed AST.
* `lib/src/constant_system_dart.dart`: defines an implementation of a constant * `lib/src/constant_system_dart.dart`: defines an implementation of a constant

View file

@ -1072,7 +1072,7 @@ class ClosureTranslator extends Visitor {
// In checked mode, using a type variable in a type annotation may lead // 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 // 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 // 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. // the type arguments are available in locals.
registerNeedsThis(); registerNeedsThis();
} }

View file

@ -557,7 +557,7 @@ class Elements {
* For non-operator names, this method just returns its input. * For non-operator names, this method just returns its input.
* *
* The results returned from this method are guaranteed to be valid * 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. * non-operator names.
*/ */
static String operatorNameToIdentifier(String name) { static String operatorNameToIdentifier(String name) {
@ -1823,11 +1823,11 @@ abstract class MemberSignature {
/// parameters. /// parameters.
ResolutionFunctionType get functionType; 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. /// field declaration.
bool get isGetter; 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. /// field declaration.
bool get isSetter; bool get isSetter;

View file

@ -96,7 +96,7 @@ abstract class ResolutionDartType implements DartType {
*/ */
ResolutionDartType get userProvidedBadType => null; 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; bool get isRaw => true;
/// Returns the raw version of this type. /// Returns the raw version of this type.

View file

@ -18,7 +18,7 @@ import 'entities.dart';
/// ///
/// Current only 'resolution_types.dart' implement this hierarchy but when the /// Current only 'resolution_types.dart' implement this hierarchy but when the
/// compiler moves to use [Entity] instead of [Element] this hierarchy can be /// 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]. /// on kernel ir without the need for [Element].
abstract class DartType { abstract class DartType {

View file

@ -40,7 +40,7 @@ _DebugIndentation _indentation = new _DebugIndentation();
/// Function signature of [debugPrint]. /// Function signature of [debugPrint].
typedef DebugPrint(s); 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 { DebugPrint get debugPrint {
enableDebugMode(); enableDebugMode();
// TODO(johnniwinther): Maybe disable debug mode after the call. // TODO(johnniwinther): Maybe disable debug mode after the call.

View file

@ -383,7 +383,7 @@ class MemberTypeInformation extends ElementTypeInformation
/** /**
* If [element] is a function, [closurizedCount] is the number of * 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; int closurizedCount = 0;
@ -456,7 +456,7 @@ class MemberTypeInformation extends ElementTypeInformation
// Closurized methods never become stable to ensure that the information in // Closurized methods never become stable to ensure that the information in
// [users] is accurate. The inference stops tracking users for stable types. // [users] is accurate. The inference stops tracking users for stable types.
// Note that we only override the getter, the setter will still modify the // 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; bool get isStable => super.isStable && !isClosurized;
TypeMask handleSpecialCases(InferrerEngine inferrer) { TypeMask handleSpecialCases(InferrerEngine inferrer) {

View file

@ -205,7 +205,7 @@ class CustomElementsAnalysisJoin {
escapingConstructors escapingConstructors
.forEach(_backendUsageBuilder.registerGlobalFunctionDependency); .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. // in the generated table.
ConstantValue constant = _makeTypeConstant(cls); ConstantValue constant = _makeTypeConstant(cls);
impactBuilder impactBuilder

View file

@ -1919,7 +1919,7 @@ class ConstantNamingVisitor implements ConstantValueVisitor {
if (name == 'index') { if (name == 'index') {
indexField = field; indexField = field;
} else if (name == '_name') { } else if (name == '_name') {
// Ingore _name field. // Ignore _name field.
} else { } else {
indexField = null; indexField = null;
break; break;

View file

@ -108,7 +108,7 @@ abstract class RuntimeTypesSubstitutions {
Substitution getSubstitution(ClassEntity cls, ClassEntity other); Substitution getSubstitution(ClassEntity cls, ClassEntity other);
/// Compute the required type checks and substitutions for the given /// Compute the required type checks and substitutions for the given
/// instantitated and checked classes. /// instantiated and checked classes.
TypeChecks computeChecks( TypeChecks computeChecks(
Set<ClassEntity> instantiated, Set<ClassEntity> checked); Set<ClassEntity> instantiated, Set<ClassEntity> checked);
@ -944,7 +944,7 @@ class RuntimeTypesEncoderImpl implements RuntimeTypesEncoder {
// adding ground-term type parameters, as they would just be 'dynamic'. // adding ground-term type parameters, as they would just be 'dynamic'.
// TODO(sra): Since the result string is used only in constructing constant // 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 // 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; if (interface.typeArguments.isEmpty) return name;
String arguments = String arguments =
new List.filled(interface.typeArguments.length, 'dynamic').join(', '); new List.filled(interface.typeArguments.length, 'dynamic').join(', ');

View file

@ -87,7 +87,7 @@ class ClassStubGenerator {
Map<jsAst.Name, jsAst.Expression> generateCallStubsForGetter( Map<jsAst.Name, jsAst.Expression> generateCallStubsForGetter(
MemberEntity member, Map<Selector, SelectorConstraints> selectors) { MemberEntity member, Map<Selector, SelectorConstraints> selectors) {
// If the method is intercepted, the stub gets the // 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 isInterceptedMethod = _interceptorData.isInterceptedMethod(member);
bool isInterceptedClass = bool isInterceptedClass =
_interceptorData.isInterceptedClass(member.enclosingClass); _interceptorData.isInterceptedClass(member.enclosingClass);

View file

@ -19,7 +19,7 @@ class NativeGenerator {
/// Generates the code for isolate affinity tags. /// 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. /// this code sets up the variables needed to guarantee that behavior.
static jsAst.Statement generateIsolateAffinityTagInitialization( static jsAst.Statement generateIsolateAffinityTagInitialization(
BackendUsage backendUsage, BackendUsage backendUsage,

View file

@ -298,7 +298,7 @@ class RuntimeTypeGenerator {
if (call != null && call.isFunction) { if (call != null && call.isFunction) {
FunctionElement callFunction = call; FunctionElement callFunction = call;
// A superclass might already implement the Function interface. In such // 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)) { if (!cls.superclass.implementsFunction(_commonElements)) {
_generateInterfacesIsTests(_commonElements.functionClass, _generateInterfacesIsTests(_commonElements.functionClass,
generateIsTest, generateSubstitution, generated); generateIsTest, generateSubstitution, generated);

View file

@ -34,7 +34,7 @@ class TypeTestRegistry {
Set<ClassEntity> checkedClasses; Set<ClassEntity> 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. * typedefs and implicitly through type annotations in checked mode.
*/ */
Set<FunctionType> checkedFunctionTypes; Set<FunctionType> checkedFunctionTypes;

View file

@ -907,7 +907,7 @@ abstract class BehaviorBuilder {
return types; 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. /// into native code.
void _escape(DartType type) { void _escape(DartType type) {
if (type is ResolutionDartType) { if (type is ResolutionDartType) {

View file

@ -389,7 +389,7 @@ class ResolvedAstDeserializer {
int charOffset = objectDecoder.getInt(Key.OFFSET); int charOffset = objectDecoder.getInt(Key.OFFSET);
Token beginToken = getBeginToken(uri, charOffset); Token beginToken = getBeginToken(uri, charOffset);
if (beginToken == null) { if (beginToken == null) {
// TODO(johnniwinther): Handle unfound tokens by adding an erronous // TODO(johnniwinther): Handle unfound tokens by adding an erroneous
// resolved ast kind. // resolved ast kind.
reporter.internalError( reporter.internalError(
element, "No token found for $element in $uri @ $charOffset"); element, "No token found for $element in $uri @ $charOffset");

View file

@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a // 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. // 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; library dart2js.serialization.values;
@ -32,7 +32,7 @@ import 'keys.dart';
/// The distinction between map and object values is chosen to provide a more /// 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 /// robust and checkable implementation of the latter; since the keys are drawn
/// from a fixed typed set of values, consistency between serialization and /// from a fixed typed set of values, consistency between serialization and
/// deserialization is easierly maintained. /// deserialization is more easily maintained.
abstract class Value { abstract class Value {
accept(ValueVisitor visitor, arg); accept(ValueVisitor visitor, arg);
} }

View file

@ -6229,7 +6229,7 @@ class SsaAstGraphBuilder extends ast.Visitor
endFinallyBlock.addSuccessor(exitBlock); endFinallyBlock.addSuccessor(exitBlock);
// If a block inside try/catch aborts (eg with a return statement), // 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. // block and the finally block.
addExitTrySuccessor(startFinallyBlock); addExitTrySuccessor(startFinallyBlock);
@ -6437,7 +6437,7 @@ class SsaAstGraphBuilder extends ast.Visitor
} }
// If a block inside try/catch aborts (eg with a return statement), // 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. // block and the finally block.
addExitTrySuccessor(startCatchBlock); addExitTrySuccessor(startCatchBlock);
addExitTrySuccessor(startFinallyBlock); addExitTrySuccessor(startFinallyBlock);

View file

@ -3360,7 +3360,7 @@ class TryCatchFinallyBuilder {
endFinallyBlock?.addSuccessor(exitBlock); endFinallyBlock?.addSuccessor(exitBlock);
// If a block inside try/catch aborts (eg with a return statement), // 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. // block and the finally block.
_addExitTrySuccessor(startCatchBlock); _addExitTrySuccessor(startCatchBlock);
_addExitTrySuccessor(startFinallyBlock); _addExitTrySuccessor(startFinallyBlock);

View file

@ -370,7 +370,7 @@ class SsaTypePropagator extends HBaseVisitor implements OptimizationPhase {
TypeMask receiverType = receiver.instructionType; TypeMask receiverType = receiver.instructionType;
instruction.mask = receiverType; 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 // node (HTypeKnown). There are two potentially expensive tests - are there
// any uses of the receiver dominated by and following this call?, and what // 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 // is the refined type? The first is expensive if the receiver has many

View file

@ -1284,7 +1284,7 @@ class StringQuoting {
const StringQuoting($SQ, raw: true, leftQuoteLength: 3), const StringQuoting($SQ, raw: true, leftQuoteLength: 3),
const StringQuoting($DQ, raw: false, leftQuoteLength: 3), const StringQuoting($DQ, raw: false, leftQuoteLength: 3),
const StringQuoting($DQ, raw: true, 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: false, leftQuoteLength: 4),
const StringQuoting($SQ, raw: true, leftQuoteLength: 4), const StringQuoting($SQ, raw: true, leftQuoteLength: 4),
const StringQuoting($DQ, raw: false, leftQuoteLength: 4), const StringQuoting($DQ, raw: false, leftQuoteLength: 4),

View file

@ -421,7 +421,7 @@ class MiniJsParserError {
/// * brackets. /// * brackets.
/// * var declarations. /// * var declarations.
/// * operator precedence. /// * 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: /// Notable things it can't do yet include:
/// * some statements are still missing (do-while, while, switch). /// * some statements are still missing (do-while, while, switch).
/// ///

View file

@ -38,7 +38,7 @@ class BenchmarkBase {
run(); run();
} }
// Exercices the benchmark. By default invokes [run] 10 times. // Exercises the benchmark. By default invokes [run] 10 times.
void exercise() { void exercise() {
for (int i = 0; i < 10; i++) { for (int i = 0; i < 10; i++) {
run(); run();

View file

@ -44845,7 +44845,7 @@ class _KeyboardEventHandler extends EventStreamProvider<KeyEvent> {
// Opera reports the character code in the keyCode field. // Opera reports the character code in the keyCode field.
e._shadowCharCode = KeyCode.isCharacterKey(e.keyCode) ? e.keyCode : 0; 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. // pressed, given previous keydown information.
e._shadowKeyCode = _determineKeyCodeForKeypress(e); e._shadowKeyCode = _determineKeyCodeForKeypress(e);

View file

@ -58,7 +58,7 @@ _convertJsonToDart(json, reviver(key, value)) {
return e; 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 // TODO(sra): Replace this test with cheaper '#.constructor === Array' when
// bug 621 below is fixed. // bug 621 below is fixed.
if (JS('bool', 'Object.getPrototypeOf(#) === Array.prototype', e)) { if (JS('bool', 'Object.getPrototypeOf(#) === Array.prototype', e)) {
@ -103,7 +103,7 @@ _convertJsonToDartLazy(object) {
return 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 // TODO(sra): Replace this test with cheaper '#.constructor === Array' when
// bug https://code.google.com/p/v8/issues/detail?id=621 is fixed. // bug https://code.google.com/p/v8/issues/detail?id=621 is fixed.
if (JS('bool', 'Object.getPrototypeOf(#) !== Array.prototype', object)) { if (JS('bool', 'Object.getPrototypeOf(#) !== Array.prototype', object)) {

View file

@ -334,7 +334,7 @@ _setStaticTypes(f, names) => JS(
/// methods: A function returning an object mapping method names /// methods: A function returning an object mapping method names
/// to method types. The function is evaluated lazily and cached. /// to method types. The function is evaluated lazily and cached.
/// statics: A function returning an object mapping static method /// 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 /// names: An array of the names of the static methods. Used to
/// permit eagerly setting the runtimeType field on the methods /// permit eagerly setting the runtimeType field on the methods
/// while still lazily computing the type descriptor object. /// while still lazily computing the type descriptor object.

View file

@ -1885,7 +1885,7 @@ bool _isInvalidArrayIndex(int index) {
/// Checks that [index] is a valid index into [list] which has length [length]. /// 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) { void _checkValidIndex(int index, List list, int length) {
if (_isInvalidArrayIndex(index) || JS('int', '#', index) >= length) { if (_isInvalidArrayIndex(index) || JS('int', '#', index) >= length) {
throw diagnoseIndexError(list, index); throw diagnoseIndexError(list, index);

View file

@ -178,7 +178,7 @@ String stringReplaceAllFuncUnchecked(String receiver, Pattern pattern,
return stringReplaceAllStringFuncUnchecked( return stringReplaceAllStringFuncUnchecked(
receiver, pattern, onMatch, onNonMatch); 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` // top of the method but it saves an extra check on the `pattern is String`
// path. // path.
if (pattern is! Pattern) { if (pattern is! Pattern) {

View file

@ -440,7 +440,7 @@ class Expect {
[_CheckExceptionFn check = null, String reason = null]) { [_CheckExceptionFn check = null, String reason = null]) {
String msg = reason == null ? "" : "($reason)"; String msg = reason == null ? "" : "($reason)";
if (f is! _Nullary) { 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. // The failure to even call `f` should throw outside the try/catch.
_fail("Expect.throws$msg: Function f not callable with zero arguments"); _fail("Expect.throws$msg: Function f not callable with zero arguments");
} }

View file

@ -122,7 +122,7 @@ class CompilerOptions {
/// are covered by summary files. /// are covered by summary files.
/// ///
/// When this option is true, these APIs will treat any dependency that is /// 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; bool chaseDependencies = false;
/// Whether to interpret Dart sources in strong-mode. /// Whether to interpret Dart sources in strong-mode.

View file

@ -36,7 +36,7 @@ enum Category {
/// Indicates that a library can be used in a browser context. /// Indicates that a library can be used in a browser context.
client, 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, server,
/// Indicates that a library can be used from embedded devices. /// Indicates that a library can be used from embedded devices.

View file

@ -152,7 +152,7 @@ Token defaultRecoveryStrategy(
recoverUnmatched() { recoverUnmatched() {
// TODO(ahe): Try to use top-level keywords (such as `class`, `typedef`, // 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; return errorTail.next;
} }

View file

@ -125,7 +125,7 @@ class MethodNode {
} }
/// Keeps track of the global state for the type inference that occurs outside /// 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 /// This class describes the interface for use by clients of type inference
/// (e.g. DietListener). Derived classes should derive from /// (e.g. DietListener). Derived classes should derive from

View file

@ -133,7 +133,7 @@ abstract class TokenStreamRewriterTest {
/// Concrete implementation of [TokenStreamRewriterTest] in which /// Concrete implementation of [TokenStreamRewriterTest] in which
/// [Token.previous] values are set to null. /// [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. /// finding previous tokens.
@reflectiveTest @reflectiveTest
class TokenStreamRewriterTest_NoPrevious extends TokenStreamRewriterTest { class TokenStreamRewriterTest_NoPrevious extends TokenStreamRewriterTest {

View file

@ -568,7 +568,7 @@ class MiniJsParserError {
/// * brackets. /// * brackets.
/// * var declarations. /// * var declarations.
/// * operator precedence. /// * 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: /// Notable things it can't do yet include:
/// * some statements are still missing (do-while, while, switch). /// * some statements are still missing (do-while, while, switch).
/// ///

View file

@ -984,7 +984,7 @@ abstract class DeferredToken extends Expression {
DeferredToken _clone() => this; 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. /// a value via the [value] getter the latest when the ast is printed.
abstract class DeferredNumber extends DeferredToken implements Literal { abstract class DeferredNumber extends DeferredToken implements Literal {
accept(NodeVisitor visitor) => visitor.visitDeferredNumber(this); accept(NodeVisitor visitor) => visitor.visitDeferredNumber(this);
@ -994,7 +994,7 @@ abstract class DeferredNumber extends DeferredToken implements Literal {
int get precedenceLevel => value.isNegative ? UNARY : PRIMARY; 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. /// a value via the [value] getter the latest when the ast is printed.
abstract class DeferredString extends DeferredToken implements Literal { abstract class DeferredString extends DeferredToken implements Literal {
accept(NodeVisitor visitor) => visitor.visitDeferredString(this); accept(NodeVisitor visitor) => visitor.visitDeferredString(this);
@ -1004,7 +1004,7 @@ abstract class DeferredString extends DeferredToken implements Literal {
int get precedenceLevel => PRIMARY; 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. /// a value via the [value] getter the latest when the ast is printed.
/// Also, [precedenceLevel] has to return the same value that /// Also, [precedenceLevel] has to return the same value that
/// [value.precedenceLevel] returns once [value] is bound to an [Expression]. /// [value.precedenceLevel] returns once [value] is bound to an [Expression].

View file

@ -180,15 +180,15 @@ class InstantiatorGeneratorVisitor implements NodeVisitor<Instantiator> {
throw 'Unimplemented InstantiatorGeneratorVisitor for $node'; 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) { static Expression convertStringToVariableUse(String value) {
assert(identiferRE.hasMatch(value)); assert(identifierRE.hasMatch(value));
return new VariableUse(value); return new VariableUse(value);
} }
static Expression convertStringToVariableDeclaration(String value) { static Expression convertStringToVariableDeclaration(String value) {
assert(identiferRE.hasMatch(value)); assert(identifierRE.hasMatch(value));
return new VariableDeclaration(value); return new VariableDeclaration(value);
} }

View file

@ -1551,7 +1551,7 @@ abstract class Expression extends TreeNode {
/// Should only be used on code compiled in strong mode, as this method /// Should only be used on code compiled in strong mode, as this method
/// assumes the IR is strongly typed. /// 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]. /// 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 /// If this is not the case, either an exception is thrown or the raw type of
/// [superclass] is returned. /// [superclass] is returned.

View file

@ -48,7 +48,7 @@ class ExpressionLifter extends Transformer {
/// ///
/// If an expression should be named it is named before visiting its children /// If an expression should be named it is named before visiting its children
/// so the naming assignment appears in the list before all statements /// 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 /// Children that are conditionally evaluated, such as some parts of logical
/// and conditional expressions, must be delimited so that they do not emit /// and conditional expressions, must be delimited so that they do not emit

View file

@ -127,7 +127,7 @@ class TreeShaker {
/// Map from used members (regardless of host) to a summary object describing /// Map from used members (regardless of host) to a summary object describing
/// how the member invokes other members on `this`. /// 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`. /// are invoked using `super` and the [Name]s that are dispatched on `this`.
/// ///
/// Names that are dispatched as a setter are preceded by the /// Names that are dispatched as a setter are preceded by the

View file

@ -34,7 +34,7 @@ class Path {
static String _cleanWindows(String source) { static String _cleanWindows(String source) {
// Change \ to /. // Change \ to /.
var clean = source.replaceAll('\\', '/'); var clean = source.replaceAll('\\', '/');
// Add / before intial [Drive letter]: // Add / before initial [Drive letter]:
if (clean.length >= 2 && clean[1] == ':') { if (clean.length >= 2 && clean[1] == ':') {
clean = '/$clean'; clean = '/$clean';
} }

View file

@ -240,7 +240,7 @@ class Verifier {
times(0); times(0);
} }
/// Verifies that there was excatly one martching interaction. /// Verifies that there was exactly one matching interaction.
void once() { void once() {
times(1); times(1);
} }

View file

@ -492,7 +492,7 @@ bool Directory::Rename(const char* path, const char* new_path) {
return false; return false;
} }
ExistsResult new_exists = ExistsHelper(system_new_path.wide()); 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 // if the new_path is currently a directory we need to delete it
// first. // first.
if (new_exists == EXISTS) { if (new_exists == EXISTS) {

View file

@ -148,8 +148,8 @@ static const char* GetPreferredLanguageName() {
const char* Platform::LocaleName() { const char* Platform::LocaleName() {
// First see if there is a preferred language. If not, return the // First see if there is a preferred language. If not, return the
// current locale name. // current locale name.
const char* preferred_langauge = GetPreferredLanguageName(); const char* preferred_language = GetPreferredLanguageName();
return (preferred_langauge != NULL) ? preferred_langauge : GetLocaleName(); return (preferred_language != NULL) ? preferred_language : GetLocaleName();
} }

View file

@ -59,7 +59,7 @@ class PlatformWin {
// See: https://msdn.microsoft.com/en-us/library/windows/desktop/ms680621(v=vs.85).aspx // See: https://msdn.microsoft.com/en-us/library/windows/desktop/ms680621(v=vs.85).aspx
SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOOPENFILEERRORBOX); SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOOPENFILEERRORBOX);
// Set up a signal handler that restores the console state on a // 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. // registered for the CTRL_C_EVENT from Dart code.
SetConsoleCtrlHandler(SignalHandler, TRUE); SetConsoleCtrlHandler(SignalHandler, TRUE);
} }

View file

@ -519,12 +519,12 @@ class ProcessStarter {
execvp(path_, const_cast<char* const*>(program_arguments_))); execvp(path_, const_cast<char* const*>(program_arguments_)));
ReportChildError(); ReportChildError();
} else { } else {
// Exit the intermeiate process. // Exit the intermediate process.
exit(0); exit(0);
} }
} }
} else { } else {
// Exit the intermeiate process. // Exit the intermediate process.
exit(0); exit(0);
} }
} }

View file

@ -1053,7 +1053,7 @@ class _NativeSocket extends _NativeSocketNativeWrapper with _ServiceObject {
"The network interface does not have an address " "The network interface does not have an address "
"of the same family as the multicast address"); "of the same family as the multicast address");
} else { } 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; return InternetAddress.ANY_IP_V4;
} }
} else { } else {

View file

@ -784,7 +784,7 @@ _loadPackagesFile(SendPort sp, bool traceLoading, Uri packagesFile) async {
_findPackagesFile(SendPort sp, bool traceLoading, Uri base) async { _findPackagesFile(SendPort sp, bool traceLoading, Uri base) async {
try { try {
// Walk up the directory hierarchy to check for the existence of // 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. // packages/ directory on the first iteration.
var dir = new File.fromUri(base).parent; var dir = new File.fromUri(base).parent;
var prev = null; var prev = null;

View file

@ -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 * an uncommonly used values. Most instances types can have a peer
* field allocated. The exceptions are subtypes of Null, num, and * field allocated. The exceptions are subtypes of Null, num, and
* bool. * bool.

View file

@ -16,7 +16,7 @@ class Object {
// bit). A new hashCode value is calculated using a random number generator. // bit). A new hashCode value is calculated using a random number generator.
static final _hashCodeRnd = new Random(); static final _hashCodeRnd = new Random();
// Shared static implentation for hashCode and _identityHashCode. // Shared static implementation for hashCode and _identityHashCode.
static int _objectHashCode(obj) { static int _objectHashCode(obj) {
var result = _getHash(obj); var result = _getHash(obj);
if (result == 0) { if (result == 0) {

View file

@ -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. // EventHandler messages we send a _ZERO_EVENT instead of a _TIMEOUT_EVENT.
static void _notifyZeroHandler() { static void _notifyZeroHandler() {
if (_sendPort == null) { if (_sendPort == null) {

View file

@ -654,7 +654,7 @@ class ScriptInsetElement extends HtmlElement implements Renderable {
for (int i = _startLine; i <= _endLine; i++) { for (int i = _startLine; i <= _endLine; i++) {
var line = script.getLine(i); var line = script.getLine(i);
if (line.isBlank) { 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. // blank lines.
blankLineCount++; blankLineCount++;
} else { } else {
@ -662,12 +662,12 @@ class ScriptInsetElement extends HtmlElement implements Renderable {
int firstBlank = i - blankLineCount; int firstBlank = i - blankLineCount;
int lastBlank = i - 1; int lastBlank = i - 1;
if (blankLineCount < 4) { if (blankLineCount < 4) {
// Too few blank lines for an elipsis. // Too few blank lines for an ellipsis.
for (int j = firstBlank; j <= lastBlank; j++) { for (int j = firstBlank; j <= lastBlank; j++) {
table.append(lineElement(script.getLine(j), lineNumPad)); table.append(lineElement(script.getLine(j), lineNumPad));
} }
} else { } 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(script.getLine(firstBlank), lineNumPad));
table.append(lineElement(null, lineNumPad)); table.append(lineElement(null, lineNumPad));
table.append(lineElement(script.getLine(lastBlank), lineNumPad)); table.append(lineElement(script.getLine(lastBlank), lineNumPad));
@ -964,7 +964,7 @@ void addInfoBox(Element content, Function infoBoxGenerator) {
infoBox.style.zIndex = '10'; infoBox.style.zIndex = '10';
infoBox.style.backgroundColor = 'white'; infoBox.style.backgroundColor = 'white';
infoBox.style.cursor = 'auto'; 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'; infoBox.style.whiteSpace = 'normal';
content.append(infoBox); content.append(infoBox);
} }

View file

@ -11,7 +11,7 @@ enum ErrorKind {
/// The isolate has encountered a Dart language error in the program. /// The isolate has encountered a Dart language error in the program.
languageError, 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. /// reported as bugs.
internalError, internalError,

View file

@ -4456,7 +4456,7 @@ class ServiceMetric extends ServiceObject implements M.Metric {
String description; String description;
double value = 0.0; 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 min;
double max; double max;

View file

@ -10,7 +10,7 @@ import 'package:unittest/unittest.dart';
import 'test_helper.dart'; import 'test_helper.dart';
/// Test that we correctly remove sockets that have been closed from the list /// 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 { Future setup() async {
var serverSocket = await io.ServerSocket.bind('127.0.0.1', 0); var serverSocket = await io.ServerSocket.bind('127.0.0.1', 0);

View file

@ -389,7 +389,7 @@ class _ServiceTesterRunner {
/// Runs [tests] in sequence, each of which should take an [Isolate] and /// 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 /// return a [Future]. Code for setting up state can run before and/or
/// concurrently with the tests. Uses [mainArgs] to determine whether /// 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<String> mainArgs, List<IsolateTest> tests, Future runIsolateTests(List<String> mainArgs, List<IsolateTest> tests,
{testeeBefore(), {testeeBefore(),
testeeConcurrent(), testeeConcurrent(),
@ -424,7 +424,7 @@ Future runIsolateTests(List<String> mainArgs, List<IsolateTest> tests,
/// Runs [tests] in sequence, each of which should take an [Isolate] and /// 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 /// return a [Future]. Code for setting up state can run before and/or
/// concurrently with the tests. Uses [mainArgs] to determine whether /// 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 /// This is a special version of this test harness specifically for the
/// pause_on_unhandled_exceptions_test, which cannot properly function /// pause_on_unhandled_exceptions_test, which cannot properly function
@ -460,7 +460,7 @@ void runIsolateTestsSynchronous(List<String> mainArgs, List<IsolateTest> tests,
/// Runs [tests] in sequence, each of which should take an [Isolate] and /// 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 /// return a [Future]. Code for setting up state can run before and/or
/// concurrently with the tests. Uses [mainArgs] to determine whether /// 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<String> mainArgs, List<VMTest> tests, Future runVMTests(List<String> mainArgs, List<VMTest> tests,
{testeeBefore(), {testeeBefore(),
testeeConcurrent(), testeeConcurrent(),

View file

@ -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. // big or little endian values.
static uint16_t HostToBigEndian16(uint16_t host_value); static uint16_t HostToBigEndian16(uint16_t host_value);
static uint32_t HostToBigEndian32(uint32_t host_value); static uint32_t HostToBigEndian32(uint32_t host_value);

View file

@ -1768,7 +1768,7 @@ ASSEMBLER_TEST_RUN(CheckSmiFail, test) {
// - CheckClassId rA, D // - 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. // skip the following instruction.
ASSEMBLER_TEST_GENERATE(CheckClassIdSmiPass, assembler) { ASSEMBLER_TEST_GENERATE(CheckClassIdSmiPass, assembler) {
__ Frame(2); __ Frame(2);
@ -1883,7 +1883,7 @@ ASSEMBLER_TEST_RUN(IfNeNullNotNull, test) {
// Cond is Le, Lt, Ge, Gt, unsigned variants ULe, ULt, UGe, UGt, and // Cond is Le, Lt, Ge, Gt, unsigned variants ULe, ULt, UGe, UGt, and
// unboxed double variants DEq, DNe, DLe, DLt, DGe, DGt. // unboxed double variants DEq, DNe, DLe, DLt, DGe, DGt.
// Skips the next instruction unless FP[rA] <Cond> FP[rD]. Assumes that // Skips the next instruction unless FP[rA] <Cond> FP[rD]. Assumes that
// FP[rA] and FP[rD] are Smis or unboxed doubles as inidcated by <Cond>. // FP[rA] and FP[rD] are Smis or unboxed doubles as indicated by <Cond>.
ASSEMBLER_TEST_GENERATE(IfLeTrue, assembler) { ASSEMBLER_TEST_GENERATE(IfLeTrue, assembler) {
__ Frame(3); __ Frame(3);
__ LoadConstant(0, Smi::Handle(Smi::New(-1))); __ LoadConstant(0, Smi::Handle(Smi::New(-1)));
@ -2588,7 +2588,7 @@ ASSEMBLER_TEST_RUN(CheckedUnboxFail, test) {
// - DAdd, DSub, DMul, DDiv rA, rB, rC // - 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) { ASSEMBLER_TEST_GENERATE(DAdd, assembler) {
__ Frame(3); __ Frame(3);
__ LoadConstant(0, Double::Handle(Double::New(41.0, Heap::kOld))); __ LoadConstant(0, Double::Handle(Double::New(41.0, Heap::kOld)));

View file

@ -233,8 +233,8 @@ void AwaitTransformer::VisitAwaitNode(AwaitNode* node) {
} }
// Transforms boolean expressions into a sequence of evaluatons that only lazily // Transforms boolean expressions into a sequence of evaluations that only
// evaluate subexpressions. // lazily evaluate subexpressions.
// //
// Example: // Example:
// //
@ -281,7 +281,7 @@ LocalScope* AwaitTransformer::ChainNewScope(LocalScope* parent) {
void AwaitTransformer::VisitBinaryOpNode(BinaryOpNode* node) { void AwaitTransformer::VisitBinaryOpNode(BinaryOpNode* node) {
AstNode* new_left = Transform(node->left()); AstNode* new_left = Transform(node->left());
AstNode* new_right = NULL; AstNode* new_right = NULL;
// Preserve lazy evaluaton. // Preserve lazy evaluation.
if ((node->kind() == Token::kAND) || (node->kind() == Token::kOR)) { if ((node->kind() == Token::kAND) || (node->kind() == Token::kOR)) {
new_right = LazyTransform(node->kind(), new_left, node->right()); new_right = LazyTransform(node->kind(), new_left, node->right());
} else { } else {

View file

@ -26,7 +26,7 @@ namespace dart {
// The Linux/Android ABI and the iOS ABI differ in their choice of frame // 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) // EABI (Linux, Android)
// See "Procedure Call Standard for the ARM Architecture". // See "Procedure Call Standard for the ARM Architecture".

View file

@ -86,7 +86,7 @@ namespace dart {
// //
// - Nop D // - 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. // pool that may be decoded by other instructions.
// //
// - Compile // - Compile
@ -225,7 +225,7 @@ namespace dart {
// //
// - DMin, DMax, DAdd, DSub, DMul, DDiv, DPow, DMod rA, rB, rC // - 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 // - 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 // Cond is Le, Lt, Ge, Gt, unsigned variants ULe, ULt, UGe, UGt, and
// unboxed double variants DEq, DNe, DLe, DLt, DGe, DGt. // unboxed double variants DEq, DNe, DLe, DLt, DGe, DGt.
// Skips the next instruction unless FP[rA] <Cond> FP[rD]. Assumes that // Skips the next instruction unless FP[rA] <Cond> FP[rD]. Assumes that
// FP[rA] and FP[rD] are Smis or unboxed doubles as inidcated by <Cond>. // FP[rA] and FP[rD] are Smis or unboxed doubles as indicated by <Cond>.
// //
// - CreateArrayTOS // - CreateArrayTOS
// //

View file

@ -1302,7 +1302,7 @@ static Dart_Isolate CreateIsolate(const char* script_uri,
// We exit the API scope entered above. // We exit the API scope entered above.
Dart_ExitScope(); Dart_ExitScope();
// A Thread structure has been associated to the thread, we do the // 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 // TransitionXXX scope objects as the reverse transition happens
// outside this scope in Dart_ShutdownIsolate/Dart_ExitIsolate. // outside this scope in Dart_ShutdownIsolate/Dart_ExitIsolate.
T->set_execution_state(Thread::kThreadInNative); T->set_execution_state(Thread::kThreadInNative);
@ -1353,7 +1353,7 @@ DART_EXPORT void Dart_ShutdownIsolate() {
HandleScope handle_scope(T); HandleScope handle_scope(T);
Dart::RunShutdownCallback(); Dart::RunShutdownCallback();
// The Thread structure is disassociated from the isolate, we do the // 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 // scope objects as the original transition happened outside this scope in
// Dart_EnterIsolate/Dart_CreateIsolate. // Dart_EnterIsolate/Dart_CreateIsolate.
T->ExitSafepoint(); T->ExitSafepoint();
@ -1405,7 +1405,7 @@ DART_EXPORT void Dart_EnterIsolate(Dart_Isolate isolate) {
"Dart VM is shutting down"); "Dart VM is shutting down");
} }
// A Thread structure has been associated to the thread, we do the // 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 // TransitionXXX scope objects as the reverse transition happens
// outside this scope in Dart_ExitIsolate/Dart_ShutdownIsolate. // outside this scope in Dart_ExitIsolate/Dart_ShutdownIsolate.
Thread* T = Thread::Current(); Thread* T = Thread::Current();
@ -1547,7 +1547,7 @@ DART_EXPORT void Dart_ExitIsolate() {
Thread* T = Thread::Current(); Thread* T = Thread::Current();
CHECK_ISOLATE(T->isolate()); CHECK_ISOLATE(T->isolate());
// The Thread structure is disassociated from the isolate, we do the // 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 // scope objects as the original transition happened outside this scope in
// Dart_EnterIsolate/Dart_CreateIsolate. // Dart_EnterIsolate/Dart_CreateIsolate.
ASSERT(T->execution_state() == Thread::kThreadInNative); ASSERT(T->execution_state() == Thread::kThreadInNative);
@ -5910,7 +5910,7 @@ DART_EXPORT Dart_Handle Dart_FinalizeLoading(bool complete_futures) {
I->DoneLoading(); I->DoneLoading();
// TODO(hausner): move the remaining code below (finalization and // 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. // Finalize all classes if needed.
Dart_Handle state = Api::CheckAndFinalizePendingClasses(T); Dart_Handle state = Api::CheckAndFinalizePendingClasses(T);

View file

@ -12,7 +12,7 @@
namespace dart { namespace dart {
// Froward declaration. // Forward declaration.
class MemoryRegion; class MemoryRegion;
class JSONArray; class JSONArray;

View file

@ -3755,7 +3755,7 @@ class StoreInstanceFieldInstr : public TemplateDefinition<2, NoThrow> {
intptr_t offset_in_bytes_; intptr_t offset_in_bytes_;
const StoreBarrierType emit_store_barrier_; const StoreBarrierType emit_store_barrier_;
const TokenPosition token_pos_; const TokenPosition token_pos_;
// Marks initialiing stores. E.g. in the constructor. // Marks initializing stores. E.g. in the constructor.
bool is_initialization_; bool is_initialization_;
DISALLOW_COPY_AND_ASSIGN(StoreInstanceFieldInstr); DISALLOW_COPY_AND_ASSIGN(StoreInstanceFieldInstr);

View file

@ -1615,7 +1615,7 @@ void JitOptimizer::VisitStoreInstanceField(StoreInstanceFieldInstr* instr) {
void JitOptimizer::VisitAllocateContext(AllocateContextInstr* instr) { void JitOptimizer::VisitAllocateContext(AllocateContextInstr* instr) {
// Replace generic allocation with a sequence of inlined allocation and // Replace generic allocation with a sequence of inlined allocation and
// explicit initalizing stores. // explicit initializing stores.
AllocateUninitializedContextInstr* replacement = AllocateUninitializedContextInstr* replacement =
new AllocateUninitializedContextInstr(instr->token_pos(), new AllocateUninitializedContextInstr(instr->token_pos(),
instr->num_context_variables()); instr->num_context_variables());

View file

@ -158,7 +158,7 @@ class NativeArguments {
// The closure object is hidden and not accessible from native code. // The closure object is hidden and not accessible from native code.
// However, if the function is an instance closure function, the captured // However, if the function is an instance closure function, the captured
// receiver located in the context is made accessible in native code at // 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--; count--;
} }
return count; return count;

View file

@ -4898,7 +4898,7 @@ class Code : public Object {
intptr_t pc_offset, intptr_t pc_offset,
GrowableArray<const Function*>* functions, GrowableArray<const Function*>* functions,
GrowableArray<TokenPosition>* token_positions) const; GrowableArray<TokenPosition>* 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). // for a stack trace or the bottom frames of a profiler sample).
void GetInlinedFunctionsAtReturnAddress( void GetInlinedFunctionsAtReturnAddress(
intptr_t pc_offset, intptr_t pc_offset,
@ -5652,7 +5652,7 @@ class Instance : public Object {
static intptr_t NextFieldOffset() { return sizeof(RawInstance); } 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. // They are needed due to the extraction of the class in IsValidFieldOffset.
RawObject** RawFieldAddrAtOffset(intptr_t offset) const { RawObject** RawFieldAddrAtOffset(intptr_t offset) const {
return reinterpret_cast<RawObject**>(raw_value() - kHeapObjectTag + offset); return reinterpret_cast<RawObject**>(raw_value() - kHeapObjectTag + offset);

View file

@ -1142,7 +1142,7 @@ ISOLATE_UNIT_TEST_CASE(StringConcat) {
EXPECT(str6.Equals(two_one_two, two_one_two_len)); 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("")); const String& str1 = String::Handle(String::New(""));
EXPECT(str1.IsOneByteString()); EXPECT(str1.IsOneByteString());

View file

@ -7375,7 +7375,7 @@ SequenceNode* Parser::CloseAsyncGeneratorFunction(const Function& closure_func,
ASSERT(!closure_func.IsNull()); ASSERT(!closure_func.IsNull());
ASSERT(closure_body != NULL); 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. // closure body in order to mark them as captured.
LocalVariable* existing_var = LocalVariable* existing_var =
closure_body->scope()->LookupVariable(Symbols::AwaitJumpVar(), false); 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. // The expression must not be able to refer to the variable.
if (!current_block_->scope->AddVariable(variable)) { if (!current_block_->scope->AddVariable(variable)) {
LocalVariable* existing_var = LocalVariable* existing_var =
@ -9836,7 +9836,7 @@ AstNode* Parser::ParseAssertStatement(bool is_const) {
if (parsed_function()->have_seen_await()) { if (parsed_function()->have_seen_await()) {
// The await transformation must be done manually because assertions // The await transformation must be done manually because assertions
// are parsed as statements, not expressions. Thus, we need to check // 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 // we must not parse the arguments with ParseAwaitableExpr(). In the
// corner case of assert(await a, await b), this would create two // corner case of assert(await a, await b), this would create two
// sibling scopes containing the temporary values for a and b. Both // 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 // There isn't a generic catch clause so create a clause body that
// rethrows the exception. This includes the case that there were no // rethrows the exception. This includes the case that there were no
// catch clauses. // 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 // therefore, it is safe to rethrow the stack-based :exception_var instead
// of the captured copy :saved_exception_var. // of the captured copy :saved_exception_var.
current = new (Z) SequenceNode(handler_pos, NULL); current = new (Z) SequenceNode(handler_pos, NULL);
@ -10838,7 +10838,7 @@ AstNode* Parser::ParseStatement() {
// Rethrow of current exception. // Rethrow of current exception.
ConsumeToken(); ConsumeToken();
ExpectSemicolon(); 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. // catch block.
TryStack* try_statement = try_stack_; TryStack* try_statement = try_stack_;
while ((try_statement != NULL) && !try_statement->inside_catch()) { while ((try_statement != NULL) && !try_statement->inside_catch()) {
@ -14754,7 +14754,7 @@ AstNode* Parser::ParsePrimary() {
? InvocationMirror::kMethod ? InvocationMirror::kMethod
: InvocationMirror::kGetter; : InvocationMirror::kGetter;
// Note: Adding a statement to current block is a hack, parsing an // 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( current_block_->statements->Add(ThrowNoSuchMethodError(
qual_ident_pos, current_class(), qualified_name, qual_ident_pos, current_class(), qualified_name,
NULL, // No arguments. NULL, // No arguments.

View file

@ -3182,7 +3182,7 @@ void AllocationSinking::ExitsCollector::CollectTransitively(Definition* alloc) {
// Note: worklist potentially will grow while we are iterating over it. // Note: worklist potentially will grow while we are iterating over it.
// We are not removing allocations from the worklist not to waste space on // We are not removing allocations from the worklist not to waste space on
// the side maintaining BitVector of already processed allocations: worklist // 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. // as a bitvector.
for (intptr_t i = 0; i < worklist_.length(); i++) { for (intptr_t i = 0; i < worklist_.length(); i++) {
Collect(worklist_[i]); Collect(worklist_[i]);

View file

@ -19,7 +19,7 @@ class AllocationSinking : public ZoneAllocated {
const GrowableArray<Definition*>& candidates() const { return candidates_; } const GrowableArray<Definition*>& candidates() const { return candidates_; }
// Find the materialization insterted for the given allocation // Find the materialization inserted for the given allocation
// at the given exit. // at the given exit.
MaterializeObjectInstr* MaterializationFor(Definition* alloc, MaterializeObjectInstr* MaterializationFor(Definition* alloc,
Instruction* exit); Instruction* exit);

View file

@ -2312,7 +2312,7 @@ END_LEAF_RUNTIME_ENTRY
double DartModulo(double left, double right) { double DartModulo(double left, double right) {
double remainder = fmod_ieee(left, right); double remainder = fmod_ieee(left, right);
if (remainder == 0.0) { 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; remainder = +0.0;
} else if (remainder < 0.0) { } else if (remainder < 0.0) {
if (right < 0) { if (right < 0) {

View file

@ -33,7 +33,7 @@ DEFINE_FLAG(int,
"Grow new gen when less than this percentage is garbage."); "Grow new gen when less than this percentage is garbage.");
DEFINE_FLAG(int, new_gen_growth_factor, 4, "Grow new gen by this factor."); 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 // objects. The kMarkBit does not intersect with the target address because of
// object alignment. // object alignment.
enum { enum {

View file

@ -56,7 +56,7 @@ class SemiSpace {
explicit SemiSpace(VirtualMemory* reserved); explicit SemiSpace(VirtualMemory* reserved);
~SemiSpace(); ~SemiSpace();
VirtualMemory* reserved_; // NULL for an emtpy space. VirtualMemory* reserved_; // NULL for an empty space.
MemoryRegion region_; MemoryRegion region_;
static SemiSpace* cache_; static SemiSpace* cache_;

View file

@ -1754,7 +1754,7 @@ RawObject* Simulator::Call(const Code& code,
// Invoke target function. // Invoke target function.
{ {
const uint16_t argc = rA; const uint16_t argc = rA;
// Lookup the funciton in the ICData. // Look up the function in the ICData.
RawObject* ic_data_obj = SP[0]; RawObject* ic_data_obj = SP[0];
RawICData* ic_data = RAW_CAST(ICData, ic_data_obj); RawICData* ic_data = RAW_CAST(ICData, ic_data_obj);
RawObject** data = ic_data->ptr()->ic_data_->ptr()->data(); RawObject** data = ic_data->ptr()->ic_data_->ptr()->data();

View file

@ -721,7 +721,7 @@ class BenchmarkBase {
run(); run();
} }
// Exercices the benchmark. By default invokes [run] 10 times. // Exercises the benchmark. By default invokes [run] 10 times.
void exercise() { void exercise() {
for (int i = 0; i < 10; i++) { for (int i = 0; i < 10; i++) {
run(); run();

View file

@ -2153,7 +2153,7 @@ void StubCode::GenerateMegamorphicCallStub(Assembler* assembler) {
__ tst(R6, Operand(R6)); __ tst(R6, Operand(R6));
__ b(&load_target, EQ); // branch if miss. __ b(&load_target, EQ); // branch if miss.
// Try next extry in the table. // Try next entry in the table.
__ AddImmediate(R3, Smi::RawValue(1)); __ AddImmediate(R3, Smi::RawValue(1));
__ b(&loop); __ b(&loop);
} }

View file

@ -668,7 +668,7 @@ void StubCode::GenerateAllocateArrayStub(Assembler* assembler) {
// ECX: array element type. // ECX: array element type.
// EDX: Array length as Smi (preserved). // EDX: Array length as Smi (preserved).
// Store the type argument field. // 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( __ StoreIntoObjectNoBarrier(
EAX, FieldAddress(EAX, Array::type_arguments_offset()), ECX); 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)); __ cmpl(FieldAddress(EDI, EDX, TIMES_4, base), Immediate(kIllegalCid));
__ j(ZERO, &load_target, Assembler::kNearJump); __ j(ZERO, &load_target, Assembler::kNearJump);
// Try next extry in the table. // Try next entry in the table.
__ AddImmediate(EDX, Immediate(Smi::RawValue(1))); __ AddImmediate(EDX, Immediate(Smi::RawValue(1)));
__ jmp(&loop); __ jmp(&loop);

View file

@ -706,7 +706,7 @@ void StubCode::GenerateAllocateArrayStub(Assembler* assembler) {
// RAX: new object start as a tagged pointer. // RAX: new object start as a tagged pointer.
// Store the type argument field. // 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( __ StoreIntoObjectNoBarrier(
RAX, FieldAddress(RAX, Array::type_arguments_offset()), RBX); 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)); __ cmpq(FieldAddress(RDI, RCX, TIMES_8, base), Immediate(kIllegalCid));
__ j(ZERO, &load_target, Assembler::kNearJump); __ j(ZERO, &load_target, Assembler::kNearJump);
// Try next extry in the table. // Try next entry in the table.
__ AddImmediate(RCX, Immediate(Smi::RawValue(1))); __ AddImmediate(RCX, Immediate(Smi::RawValue(1)));
__ jmp(&loop); __ jmp(&loop);

View file

@ -60,7 +60,7 @@ VM_UNIT_TEST_CASE(Monitor) {
// We expect to be timing out here. // We expect to be timing out here.
EXPECT_EQ(Monitor::kTimedOut, wait_result); 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; int64_t wakeup_time = (stop - start) / kMicrosecondsPerMillisecond;
OS::Print("wakeup_time: %" Pd64 "\n", wakeup_time); OS::Print("wakeup_time: %" Pd64 "\n", wakeup_time);
const int kAcceptableTimeJitter = 20; // Measured in milliseconds. const int kAcceptableTimeJitter = 20; // Measured in milliseconds.

View file

@ -131,7 +131,7 @@ class Scrollbar implements ScrollListener {
_frame.onMouseOver.listen((Event e) { _frame.onMouseOver.listen((Event e) {
final activeElement = document.activeElement; final activeElement = document.activeElement;
// TODO(jacobr): don't steal focus from a child element or a truly // 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. // element that was given fake focus.
if (activeElement is BodyElement || if (activeElement is BodyElement ||
(!_frame.contains(activeElement) && activeElement is DivElement)) { (!_frame.contains(activeElement) && activeElement is DivElement)) {
@ -148,7 +148,7 @@ class Scrollbar implements ScrollListener {
_hovering = false; _hovering = false;
// Start hiding immediately if we aren't // Start hiding immediately if we aren't
// scrolling or already in the process of // scrolling or already in the process of
// hidng the scrollbar // hiding the scrollbar
if (!_scrollInProgress && _timer == null) { if (!_scrollInProgress && _timer == null) {
_boundHideFn(); _boundHideFn();
} }

View file

@ -180,10 +180,10 @@ class View implements Positionable {
/** /**
* Registers the given listener callback to the given observable. Also * Registers the given listener callback to the given observable. Also
* immedially invokes the callback once as if a change has just come in. This * immediately invokes the callback once as if a change has just come in.
* lets you define a render() method that renders the skeleton of a view, then * This lets you define a render() method that renders the skeleton of a
* register a bunch of listeners which all fire to populate the view with * view, then register a bunch of listeners which all fire to populate the
* model data. * view with model data.
*/ */
void watch(Observable observable, void watcher(EventSummary summary)) { void watch(Observable observable, void watcher(EventSummary summary)) {
// Make a fake summary for the initial watch. // Make a fake summary for the initial watch.

View file

@ -58,7 +58,7 @@ _convertJsonToDart(json, reviver(key, value)) {
return e; 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 // TODO(sra): Replace this test with cheaper '#.constructor === Array' when
// bug 621 below is fixed. // bug 621 below is fixed.
if (JS('bool', 'Object.getPrototypeOf(#) === Array.prototype', e)) { if (JS('bool', 'Object.getPrototypeOf(#) === Array.prototype', e)) {
@ -103,7 +103,7 @@ _convertJsonToDartLazy(object) {
return 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 // TODO(sra): Replace this test with cheaper '#.constructor === Array' when
// bug https://code.google.com/p/v8/issues/detail?id=621 is fixed. // bug https://code.google.com/p/v8/issues/detail?id=621 is fixed.
if (JS('bool', 'Object.getPrototypeOf(#) !== Array.prototype', object)) { if (JS('bool', 'Object.getPrototypeOf(#) !== Array.prototype', object)) {

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