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

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

Issue 1783603009: simplify function coercions -- DDC can generate function types in place (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 4 years, 9 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) 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 6
7 import 'dart:io'; 7 import 'dart:io';
8 import 'package:path/path.dart' as path; 8 import 'package:path/path.dart' as path;
9 import 'package:analyzer/src/generated/ast.dart' 9 import 'package:analyzer/src/generated/ast.dart'
10 show 10 show
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 } 467 }
468 468
469 void writeAsStringSync(String file, String contents) { 469 void writeAsStringSync(String file, String contents) {
470 _ensureParentExists(file); 470 _ensureParentExists(file);
471 new File(file).writeAsStringSync(contents); 471 new File(file).writeAsStringSync(contents);
472 } 472 }
473 } 473 }
474 474
475 DartType getStaticType(Expression e) => 475 DartType getStaticType(Expression e) =>
476 e.staticType ?? DynamicTypeImpl.instance; 476 e.staticType ?? DynamicTypeImpl.instance;
477
478 // TODO(leafp) Factor this out or use an existing library
479 class Tuple2<T0, T1> {
480 final T0 e0;
481 final T1 e1;
482 Tuple2(this.e0, this.e1);
483 }
OLDNEW
« no previous file with comments | « lib/src/codegen/reify_coercions.dart ('k') | test/codegen/expect/collection/src/priority_queue.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698