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

Side by Side Diff: dart/lib/compiler/implementation/constant_system_dart.dart

Issue 11233061: Revert "Parts must start with 'part of'" and "Attempt to fix VM build" (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 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 | Annotate | Revision Log
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 part of dart2js;
6
7 const DART_CONSTANT_SYSTEM = const DartConstantSystem(); 5 const DART_CONSTANT_SYSTEM = const DartConstantSystem();
8 6
9 class BitNotOperation implements UnaryOperation { 7 class BitNotOperation implements UnaryOperation {
10 final SourceString name = const SourceString('~'); 8 final SourceString name = const SourceString('~');
11 bool isUserDefinable() => true; 9 bool isUserDefinable() => true;
12 const BitNotOperation(); 10 const BitNotOperation();
13 Constant fold(Constant constant) { 11 Constant fold(Constant constant) {
14 if (constant.isInt()) { 12 if (constant.isInt()) {
15 IntConstant intConstant = constant; 13 IntConstant intConstant = constant;
16 return DART_CONSTANT_SYSTEM.createInt(~intConstant.value); 14 return DART_CONSTANT_SYSTEM.createInt(~intConstant.value);
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 bool isInt(Constant constant) => constant.isInt(); 362 bool isInt(Constant constant) => constant.isInt();
365 bool isDouble(Constant constant) => constant.isDouble(); 363 bool isDouble(Constant constant) => constant.isDouble();
366 bool isString(Constant constant) => constant.isString(); 364 bool isString(Constant constant) => constant.isString();
367 bool isBool(Constant constant) => constant.isBool(); 365 bool isBool(Constant constant) => constant.isBool();
368 bool isNull(Constant constant) => constant.isNull(); 366 bool isNull(Constant constant) => constant.isNull();
369 367
370 bool isSubtype(Compiler compiler, DartType s, DartType t) { 368 bool isSubtype(Compiler compiler, DartType s, DartType t) {
371 return compiler.types.isSubtype(s, t); 369 return compiler.types.isSubtype(s, t);
372 } 370 }
373 } 371 }
OLDNEW
« no previous file with comments | « dart/lib/compiler/implementation/constant_system.dart ('k') | dart/lib/compiler/implementation/constants.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698