| Index: sdk/lib/_internal/compiler/implementation/compile_time_constants.dart
|
| diff --git a/sdk/lib/_internal/compiler/implementation/compile_time_constants.dart b/sdk/lib/_internal/compiler/implementation/compile_time_constants.dart
|
| index 33576a4d100bff838babb9da78c5d39b3c6924e9..58a2624b366dc43e13e7ebdda4a3ad622456ff0a 100644
|
| --- a/sdk/lib/_internal/compiler/implementation/compile_time_constants.dart
|
| +++ b/sdk/lib/_internal/compiler/implementation/compile_time_constants.dart
|
| @@ -106,9 +106,9 @@ abstract class ConstantCompilerBase implements ConstantCompiler {
|
| return result;
|
| }
|
| Element currentElement = element;
|
| - if (element.isParameter() ||
|
| - element.isFieldParameter() ||
|
| - element.isVariable()) {
|
| + if (element.isParameter ||
|
| + element.isFieldParameter ||
|
| + element.isVariable) {
|
| currentElement = element.enclosingElement;
|
| }
|
| return compiler.withCurrentElement(currentElement, () {
|
| @@ -149,7 +149,7 @@ abstract class ConstantCompilerBase implements ConstantCompiler {
|
| initializer, definitions, isConst: isConst);
|
| if (compiler.enableTypeAssertions &&
|
| value != null &&
|
| - element.isField()) {
|
| + element.isField) {
|
| DartType elementType = element.type;
|
| if (elementType.kind == TypeKind.MALFORMED_TYPE && !value.isNull) {
|
| if (isConst) {
|
| @@ -280,7 +280,7 @@ class CompileTimeConstantEvaluator extends Visitor {
|
| }
|
|
|
| Constant visitLiteralList(LiteralList node) {
|
| - if (!node.isConst()) {
|
| + if (!node.isConst) {
|
| return signalNotCompileTimeConstant(node);
|
| }
|
| List<Constant> arguments = <Constant>[];
|
| @@ -294,7 +294,7 @@ class CompileTimeConstantEvaluator extends Visitor {
|
| }
|
|
|
| Constant visitLiteralMap(LiteralMap node) {
|
| - if (!node.isConst()) {
|
| + if (!node.isConst) {
|
| return signalNotCompileTimeConstant(node);
|
| }
|
| List<Constant> keys = <Constant>[];
|
| @@ -442,9 +442,9 @@ class CompileTimeConstantEvaluator extends Visitor {
|
| return new FunctionConstant(element);
|
| } else if (Elements.isStaticOrTopLevelField(element)) {
|
| Constant result;
|
| - if (element.modifiers.isConst()) {
|
| + if (element.modifiers.isConst) {
|
| result = handler.compileConstant(element);
|
| - } else if (element.modifiers.isFinal() && !isEvaluatingConstant) {
|
| + } else if (element.modifiers.isFinal && !isEvaluatingConstant) {
|
| result = handler.compileVariable(element);
|
| }
|
| if (result != null) return result;
|
| @@ -454,8 +454,8 @@ class CompileTimeConstantEvaluator extends Visitor {
|
| } else if (send.receiver != null) {
|
| // Fall through to error handling.
|
| } else if (!Elements.isUnresolved(element)
|
| - && element.isVariable()
|
| - && element.modifiers.isConst()) {
|
| + && element.isVariable
|
| + && element.modifiers.isConst) {
|
| Constant result = handler.compileConstant(element);
|
| if (result != null) return result;
|
| }
|
| @@ -636,7 +636,7 @@ class CompileTimeConstantEvaluator extends Visitor {
|
| }
|
|
|
| Constant visitNewExpression(NewExpression node) {
|
| - if (!node.isConst()) {
|
| + if (!node.isConst) {
|
| return signalNotCompileTimeConstant(node);
|
| }
|
|
|
| @@ -745,7 +745,7 @@ class CompileTimeConstantEvaluator extends Visitor {
|
| compiler.resolver.resolveRedirectionChain(constructor, node);
|
| InterfaceType constructedType = constructor.computeTargetType(type);
|
| constructor = constructor.redirectionTarget;
|
| - ClassElement classElement = constructor.getEnclosingClass();
|
| + ClassElement classElement = constructor.enclosingClass;
|
| // The constructor must be an implementation to ensure that field
|
| // initializers are handled correctly.
|
| constructor = constructor.implementation;
|
| @@ -864,7 +864,7 @@ class ConstructorEvaluator extends CompileTimeConstantEvaluator {
|
| void evaluateSuperOrRedirectSend(List<Constant> compiledArguments,
|
| FunctionElement targetConstructor) {
|
| ConstructorEvaluator evaluator = new ConstructorEvaluator(
|
| - constructedType.asInstanceOf(targetConstructor.getEnclosingClass()),
|
| + constructedType.asInstanceOf(targetConstructor.enclosingClass),
|
| targetConstructor, handler, compiler);
|
| evaluator.evaluateConstructorFieldValues(compiledArguments);
|
| // Copy over the fieldValues from the super/redirect-constructor.
|
| @@ -925,14 +925,14 @@ class ConstructorEvaluator extends CompileTimeConstantEvaluator {
|
| if (!foundSuperOrRedirect) {
|
| // No super initializer found. Try to find the default constructor if
|
| // the class is not Object.
|
| - ClassElement enclosingClass = constructor.getEnclosingClass();
|
| + ClassElement enclosingClass = constructor.enclosingClass;
|
| ClassElement superClass = enclosingClass.superclass;
|
| if (enclosingClass != compiler.objectClass) {
|
| assert(superClass != null);
|
| assert(superClass.resolutionState == STATE_DONE);
|
|
|
| Selector selector =
|
| - new Selector.callDefaultConstructor(enclosingClass.getLibrary());
|
| + new Selector.callDefaultConstructor(enclosingClass.library);
|
|
|
| FunctionElement targetConstructor =
|
| superClass.lookupConstructor(selector);
|
|
|