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

Side by Side Diff: pkg/compiler/lib/src/constant_system_dart.dart

Issue 2595493002: Merge CoreTypes and CoreClasses into CommonElements. (Closed)
Patch Set: Updated cf. comment Created 4 years 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
« no previous file with comments | « pkg/compiler/lib/src/compiler.dart ('k') | pkg/compiler/lib/src/constants/evaluation.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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.constant_system.dart; 5 library dart2js.constant_system.dart;
6 6
7 import 'compiler.dart' show Compiler; 7 import 'compiler.dart' show Compiler;
8 import 'constants/constant_system.dart'; 8 import 'constants/constant_system.dart';
9 import 'constants/values.dart'; 9 import 'constants/values.dart';
10 import 'dart_types.dart'; 10 import 'dart_types.dart';
(...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after
439 439
440 @override 440 @override
441 MapConstantValue createMap(Compiler compiler, InterfaceType type, 441 MapConstantValue createMap(Compiler compiler, InterfaceType type,
442 List<ConstantValue> keys, List<ConstantValue> values) { 442 List<ConstantValue> keys, List<ConstantValue> values) {
443 return new MapConstantValue(type, keys, values); 443 return new MapConstantValue(type, keys, values);
444 } 444 }
445 445
446 @override 446 @override
447 ConstantValue createType(Compiler compiler, DartType type) { 447 ConstantValue createType(Compiler compiler, DartType type) {
448 // TODO(johnniwinther): Change the `Type` type to 448 // TODO(johnniwinther): Change the `Type` type to
449 // `compiler.coreTypes.typeType` and check the backend specific value in 449 // `compiler.commonElements.typeType` and check the backend specific value
450 // [checkConstMapKeysDontOverrideEquals] in 'members.dart'. 450 // in [checkConstMapKeysDontOverrideEquals] in 'members.dart'.
451 return new TypeConstantValue( 451 return new TypeConstantValue(
452 type, 452 type,
453 compiler.backend.backendClasses.typeImplementation 453 compiler.backend.backendClasses.typeImplementation
454 .computeType(compiler.resolution)); 454 .computeType(compiler.resolution));
455 } 455 }
456 456
457 @override 457 @override
458 ConstantValue createSymbol(Compiler compiler, String text) { 458 ConstantValue createSymbol(Compiler compiler, String text) {
459 throw new UnsupportedError('DartConstantSystem.evaluate'); 459 throw new UnsupportedError('DartConstantSystem.evaluate');
460 } 460 }
461 461
462 bool isInt(ConstantValue constant) => constant.isInt; 462 bool isInt(ConstantValue constant) => constant.isInt;
463 bool isDouble(ConstantValue constant) => constant.isDouble; 463 bool isDouble(ConstantValue constant) => constant.isDouble;
464 bool isString(ConstantValue constant) => constant.isString; 464 bool isString(ConstantValue constant) => constant.isString;
465 bool isBool(ConstantValue constant) => constant.isBool; 465 bool isBool(ConstantValue constant) => constant.isBool;
466 bool isNull(ConstantValue constant) => constant.isNull; 466 bool isNull(ConstantValue constant) => constant.isNull;
467 467
468 bool isSubtype(DartTypes types, DartType s, DartType t) { 468 bool isSubtype(DartTypes types, DartType s, DartType t) {
469 return types.isSubtype(s, t); 469 return types.isSubtype(s, t);
470 } 470 }
471 } 471 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/compiler.dart ('k') | pkg/compiler/lib/src/constants/evaluation.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698