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

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

Issue 2370833002: Replace ClosedWorld.backend with ClosedWorld.backendClasses (Closed)
Patch Set: Created 4 years, 2 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) 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 MapConstantValue createMap(Compiler compiler, InterfaceType type, 439 MapConstantValue createMap(Compiler compiler, InterfaceType type,
440 List<ConstantValue> keys, List<ConstantValue> values) { 440 List<ConstantValue> keys, List<ConstantValue> values) {
441 return new MapConstantValue(type, keys, values); 441 return new MapConstantValue(type, keys, values);
442 } 442 }
443 443
444 @override 444 @override
445 ConstantValue createType(Compiler compiler, DartType type) { 445 ConstantValue createType(Compiler compiler, DartType type) {
446 // TODO(johnniwinther): Change the `Type` type to 446 // TODO(johnniwinther): Change the `Type` type to
447 // `compiler.coreTypes.typeType` and check the backend specific value in 447 // `compiler.coreTypes.typeType` and check the backend specific value in
448 // [checkConstMapKeysDontOverrideEquals] in 'members.dart'. 448 // [checkConstMapKeysDontOverrideEquals] in 'members.dart'.
449 return new TypeConstantValue(type, 449 return new TypeConstantValue(
450 compiler.backend.typeImplementation.computeType(compiler.resolution)); 450 type,
451 compiler.backend.backendClasses.typeImplementation
452 .computeType(compiler.resolution));
451 } 453 }
452 454
453 @override 455 @override
454 ConstantValue createSymbol(Compiler compiler, String text) { 456 ConstantValue createSymbol(Compiler compiler, String text) {
455 throw new UnsupportedError('DartConstantSystem.evaluate'); 457 throw new UnsupportedError('DartConstantSystem.evaluate');
456 } 458 }
457 459
458 bool isInt(ConstantValue constant) => constant.isInt; 460 bool isInt(ConstantValue constant) => constant.isInt;
459 bool isDouble(ConstantValue constant) => constant.isDouble; 461 bool isDouble(ConstantValue constant) => constant.isDouble;
460 bool isString(ConstantValue constant) => constant.isString; 462 bool isString(ConstantValue constant) => constant.isString;
461 bool isBool(ConstantValue constant) => constant.isBool; 463 bool isBool(ConstantValue constant) => constant.isBool;
462 bool isNull(ConstantValue constant) => constant.isNull; 464 bool isNull(ConstantValue constant) => constant.isNull;
463 465
464 bool isSubtype(DartTypes types, DartType s, DartType t) { 466 bool isSubtype(DartTypes types, DartType s, DartType t) {
465 return types.isSubtype(s, t); 467 return types.isSubtype(s, t);
466 } 468 }
467 } 469 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698