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

Side by Side Diff: lib/src/utils.dart

Issue 1253903004: add special case for min/max, fixes #281 (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: small tweak for clarity 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
« no previous file with comments | « lib/src/dart_sdk.dart ('k') | test/checker/checker_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 /// Holds a couple utility functions used at various places in the system. 5 /// Holds a couple utility functions used at various places in the system.
6 library dev_compiler.src.utils; 6 library dev_compiler.src.utils;
7 7
8 import 'dart:io'; 8 import 'dart:io';
9 9
10 import 'package:path/path.dart' as path; 10 import 'package:path/path.dart' as path;
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 } else { 445 } else {
446 // TODO(jmesserly): this is for backwards compat, but not sure it's very 446 // TODO(jmesserly): this is for backwards compat, but not sure it's very
447 // useful to log this. 447 // useful to log this.
448 return 'AnalyzerMessage'; 448 return 'AnalyzerMessage';
449 } 449 }
450 } 450 }
451 451
452 bool isInlineJS(Element e) => e is FunctionElement && 452 bool isInlineJS(Element e) => e is FunctionElement &&
453 e.library.source.uri.toString() == 'dart:_foreign_helper' && 453 e.library.source.uri.toString() == 'dart:_foreign_helper' &&
454 e.name == 'JS'; 454 e.name == 'JS';
455
456 bool isDartMathMinMax(Element e) => e is FunctionElement &&
457 e.library.source.uri.toString() == 'dart:math' &&
458 (e.name == 'min' || e.name == 'max');
OLDNEW
« no previous file with comments | « lib/src/dart_sdk.dart ('k') | test/checker/checker_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698