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

Side by Side Diff: editor/util/plugins/com.google.dart.java2dart/resources/java_core.dart

Issue 221483002: Fix for translation of \!= to \!identical(), but use == and \!= for Enum. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | editor/util/plugins/com.google.dart.java2dart/src/com/google/dart/java2dart/SyntaxTranslator.java » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 library java.core; 1 library java.core;
2 2
3 import "dart:math" as math; 3 import "dart:math" as math;
4 4
5 final Stopwatch nanoTimeStopwatch = new Stopwatch(); 5 final Stopwatch nanoTimeStopwatch = new Stopwatch();
6 6
7 class JavaSystem { 7 class JavaSystem {
8 static int currentTimeMillis() { 8 static int currentTimeMillis() {
9 return (new DateTime.now()).millisecondsSinceEpoch; 9 return (new DateTime.now()).millisecondsSinceEpoch;
10 } 10 }
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 } 379 }
380 380
381 bool javaBooleanOr(bool a, bool b) { 381 bool javaBooleanOr(bool a, bool b) {
382 return a || b; 382 return a || b;
383 } 383 }
384 384
385 bool javaBooleanAnd(bool a, bool b) { 385 bool javaBooleanAnd(bool a, bool b) {
386 return a && b; 386 return a && b;
387 } 387 }
388 388
389 int javaByte(Object o) {
390 return (o as int) & 0xFF;
391 }
392
389 class JavaStringBuilder { 393 class JavaStringBuilder {
390 StringBuffer sb = new StringBuffer(); 394 StringBuffer sb = new StringBuffer();
391 String toString() => sb.toString(); 395 String toString() => sb.toString();
392 JavaStringBuilder append(x) { 396 JavaStringBuilder append(x) {
393 sb.write(x); 397 sb.write(x);
394 return this; 398 return this;
395 } 399 }
396 JavaStringBuilder appendChar(int c) { 400 JavaStringBuilder appendChar(int c) {
397 sb.writeCharCode(c); 401 sb.writeCharCode(c);
398 return this; 402 return this;
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
437 if (!_matches.moveNext()) { 441 if (!_matches.moveNext()) {
438 return false; 442 return false;
439 } 443 }
440 _match = _matches.current; 444 _match = _matches.current;
441 return true; 445 return true;
442 } 446 }
443 String group(int i) => _match[i]; 447 String group(int i) => _match[i];
444 int start() => _match.start; 448 int start() => _match.start;
445 int end() => _match.end; 449 int end() => _match.end;
446 } 450 }
OLDNEW
« no previous file with comments | « no previous file | editor/util/plugins/com.google.dart.java2dart/src/com/google/dart/java2dart/SyntaxTranslator.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698