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

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

Issue 2827283002: Implement subtype relation for kernel based elements. (Closed)
Patch Set: Add remaining checks of BackendUsage Created 3 years, 8 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 'constants/constant_system.dart'; 7 import 'constants/constant_system.dart';
8 import 'constants/values.dart'; 8 import 'constants/values.dart';
9 import 'common_elements.dart' show CommonElements; 9 import 'common_elements.dart' show CommonElements;
10 import 'elements/types.dart'; 10 import 'elements/types.dart';
11 import 'elements/resolution_types.dart' show DartTypes;
12 import 'tree/dartstring.dart' show DartString; 11 import 'tree/dartstring.dart' show DartString;
13 12
14 const DART_CONSTANT_SYSTEM = const DartConstantSystem(); 13 const DART_CONSTANT_SYSTEM = const DartConstantSystem();
15 14
16 class BitNotOperation implements UnaryOperation { 15 class BitNotOperation implements UnaryOperation {
17 final String name = '~'; 16 final String name = '~';
18 const BitNotOperation(); 17 const BitNotOperation();
19 ConstantValue fold(ConstantValue constant) { 18 ConstantValue fold(ConstantValue constant) {
20 if (constant.isInt) { 19 if (constant.isInt) {
21 IntConstantValue intConstant = constant; 20 IntConstantValue intConstant = constant;
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 bool isInt(ConstantValue constant) => constant.isInt; 466 bool isInt(ConstantValue constant) => constant.isInt;
468 bool isDouble(ConstantValue constant) => constant.isDouble; 467 bool isDouble(ConstantValue constant) => constant.isDouble;
469 bool isString(ConstantValue constant) => constant.isString; 468 bool isString(ConstantValue constant) => constant.isString;
470 bool isBool(ConstantValue constant) => constant.isBool; 469 bool isBool(ConstantValue constant) => constant.isBool;
471 bool isNull(ConstantValue constant) => constant.isNull; 470 bool isNull(ConstantValue constant) => constant.isNull;
472 471
473 bool isSubtype(DartTypes types, DartType s, DartType t) { 472 bool isSubtype(DartTypes types, DartType s, DartType t) {
474 return types.isSubtype(s, t); 473 return types.isSubtype(s, t);
475 } 474 }
476 } 475 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698