Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(321)

Side by Side Diff: pkg/compiler/lib/src/resolution/enum_creator.dart

Issue 2944843002: All strong mode cleaning of dart2js. (Closed)
Patch Set: More issues discovered during testing. Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library dart2js.resolution.enum_creator; 5 library dart2js.resolution.enum_creator;
6 6
7 import '../common.dart'; 7 import '../common.dart';
8 import '../common_elements.dart' show CommonElements; 8 import '../common_elements.dart' show CommonElements;
9 import '../elements/resolution_types.dart'; 9 import '../elements/resolution_types.dart';
10 import '../elements/elements.dart'; 10 import '../elements/elements.dart';
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 builder.emptyStatement()); 250 builder.emptyStatement());
251 251
252 EnumConstructorElementX constructor = new EnumConstructorElementX( 252 EnumConstructorElementX constructor = new EnumConstructorElementX(
253 enumClass, builder.modifiers(isConst: true), constructorNode); 253 enumClass, builder.modifiers(isConst: true), constructorNode);
254 254
255 EnumFormalElementX indexFormal = new EnumFormalElementX(constructor, 255 EnumFormalElementX indexFormal = new EnumFormalElementX(constructor,
256 indexDefinition, builder.identifier('index'), indexVariable); 256 indexDefinition, builder.identifier('index'), indexVariable);
257 257
258 EnumFormalElementX nameFormal; 258 EnumFormalElementX nameFormal;
259 259
260 List<Element> parameters = <Element>[indexFormal]; 260 List<FormalElement> parameters = <FormalElement>[indexFormal];
261 List<ResolutionDartType> parameterTypes = <ResolutionDartType>[intType]; 261 List<ResolutionDartType> parameterTypes = <ResolutionDartType>[intType];
262 if (!matchKernelRepresentationForTesting) { 262 if (!matchKernelRepresentationForTesting) {
263 nameFormal = new EnumFormalElementX(constructor, nameDefinition, 263 nameFormal = new EnumFormalElementX(constructor, nameDefinition,
264 builder.identifier('_name'), nameVariable); 264 builder.identifier('_name'), nameVariable);
265 parameters.add(nameFormal); 265 parameters.add(nameFormal);
266 parameterTypes.add(stringType); 266 parameterTypes.add(stringType);
267 } 267 }
268 FunctionSignatureX constructorSignature = new FunctionSignatureX( 268 FunctionSignatureX constructorSignature = new FunctionSignatureX(
269 requiredParameters: parameters, 269 requiredParameters: parameters,
270 requiredParameterCount: parameters.length, 270 requiredParameterCount: parameters.length,
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 EnumMethodElementX toString = new EnumMethodElementX( 350 EnumMethodElementX toString = new EnumMethodElementX(
351 'toString', enumClass, Modifiers.EMPTY, toStringNode); 351 'toString', enumClass, Modifiers.EMPTY, toStringNode);
352 FunctionSignatureX toStringSignature = new FunctionSignatureX( 352 FunctionSignatureX toStringSignature = new FunctionSignatureX(
353 type: new ResolutionFunctionType(toString, stringType)); 353 type: new ResolutionFunctionType(toString, stringType));
354 toString.functionSignature = toStringSignature; 354 toString.functionSignature = toStringSignature;
355 enumClass.addMember(toString, reporter); 355 enumClass.addMember(toString, reporter);
356 356
357 enumClass.enumValues = enumValues; 357 enumClass.enumValues = enumValues;
358 } 358 }
359 } 359 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/resolution/class_members.dart ('k') | pkg/compiler/lib/src/resolution/member_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698