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

Unified Diff: lib/compiler/implementation/compile_time_constants.dart

Issue 10356053: Prettify !(x rel-op y) into (x "!rel-op" y) when possible. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: lib/compiler/implementation/compile_time_constants.dart
diff --git a/lib/compiler/implementation/compile_time_constants.dart b/lib/compiler/implementation/compile_time_constants.dart
index c035a937b1c8aa508ef51281d1735a71360dc21a..012b236f00b6bc4ad6634782c19e823dec497e47 100644
--- a/lib/compiler/implementation/compile_time_constants.dart
+++ b/lib/compiler/implementation/compile_time_constants.dart
@@ -79,7 +79,7 @@ class NumConstant extends PrimitiveConstant {
class IntConstant extends NumConstant {
final int value;
factory IntConstant(int value) {
- switch(value) {
+ switch (value) {
case 0: return const IntConstant._internal(0);
case 1: return const IntConstant._internal(1);
case 2: return const IntConstant._internal(2);
@@ -677,16 +677,15 @@ class ConstantHandler extends CompilerTask {
} else if (code >= 0x80) {
if (code < 0x100) {
buffer.add(@'\x');
- buffer.add(code.toRadixString(16));
} else {
buffer.add(@'\u');
if (code < 0x1000) {
buffer.add('0');
}
- buffer.add(code.toRadixString(16));
}
+ buffer.add(code.toRadixString(16));
} else {
- buffer.add(new String.fromCharCodes(<int>[code]));
+ buffer.addCharCode(code);
}
}
}
« no previous file with comments | « no previous file | lib/compiler/implementation/operations.dart » ('j') | lib/compiler/implementation/ssa/codegen.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698