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

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

Issue 1284593003: Remove dart2jslib.dart (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 4 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
8 Compiler;
7 import 'constants/constant_system.dart'; 9 import 'constants/constant_system.dart';
8 import 'constants/values.dart'; 10 import 'constants/values.dart';
9 import 'dart2jslib.dart' show Compiler;
10 import 'dart_types.dart'; 11 import 'dart_types.dart';
11 import 'tree/tree.dart' show DartString; 12 import 'tree/tree.dart' show
13 DartString;
12 14
13 const DART_CONSTANT_SYSTEM = const DartConstantSystem(); 15 const DART_CONSTANT_SYSTEM = const DartConstantSystem();
14 16
15 class BitNotOperation implements UnaryOperation { 17 class BitNotOperation implements UnaryOperation {
16 final String name = '~'; 18 final String name = '~';
17 const BitNotOperation(); 19 const BitNotOperation();
18 ConstantValue fold(ConstantValue constant) { 20 ConstantValue fold(ConstantValue constant) {
19 if (constant.isInt) { 21 if (constant.isInt) {
20 IntConstantValue intConstant = constant; 22 IntConstantValue intConstant = constant;
21 return DART_CONSTANT_SYSTEM.createInt(~intConstant.primitiveValue); 23 return DART_CONSTANT_SYSTEM.createInt(~intConstant.primitiveValue);
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after
438 bool isInt(ConstantValue constant) => constant.isInt; 440 bool isInt(ConstantValue constant) => constant.isInt;
439 bool isDouble(ConstantValue constant) => constant.isDouble; 441 bool isDouble(ConstantValue constant) => constant.isDouble;
440 bool isString(ConstantValue constant) => constant.isString; 442 bool isString(ConstantValue constant) => constant.isString;
441 bool isBool(ConstantValue constant) => constant.isBool; 443 bool isBool(ConstantValue constant) => constant.isBool;
442 bool isNull(ConstantValue constant) => constant.isNull; 444 bool isNull(ConstantValue constant) => constant.isNull;
443 445
444 bool isSubtype(DartTypes types, DartType s, DartType t) { 446 bool isSubtype(DartTypes types, DartType s, DartType t) {
445 return types.isSubtype(s, t); 447 return types.isSubtype(s, t);
446 } 448 }
447 } 449 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/compiler.dart ('k') | pkg/compiler/lib/src/constants/constant_constructors.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698