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

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

Issue 1052383003: Disable closure wrapping by default (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Created 5 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
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 /// Set of flags and options passed to the compiler 5 /// Set of flags and options passed to the compiler
6 library dev_compiler.src.options; 6 library dev_compiler.src.options;
7 7
8 import 'dart:io'; 8 import 'dart:io';
9 9
10 import 'package:args/args.dart'; 10 import 'package:args/args.dart';
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 static const inferDownwardsDefault = true; 72 static const inferDownwardsDefault = true;
73 73
74 /// Whether to inject casts between Dart assignable types. 74 /// Whether to inject casts between Dart assignable types.
75 final bool relaxedCasts; 75 final bool relaxedCasts;
76 76
77 /// Whether to use static types for code generation. 77 /// Whether to use static types for code generation.
78 final bool ignoreTypes; 78 final bool ignoreTypes;
79 79
80 /// Whether to wrap closures for compatibility. 80 /// Whether to wrap closures for compatibility.
81 final bool wrapClosures; 81 final bool wrapClosures;
82 static const wrapClosuresDefault = true; 82 static const wrapClosuresDefault = false;
83 83
84 RulesOptions({this.allowConstCasts: true, this.covariantGenerics: true, 84 RulesOptions({this.allowConstCasts: true, this.covariantGenerics: true,
85 this.inferDownwards: inferDownwardsDefault, this.relaxedCasts: true, 85 this.inferDownwards: inferDownwardsDefault, this.relaxedCasts: true,
86 this.ignoreTypes: false, this.wrapClosures: wrapClosuresDefault}); 86 this.ignoreTypes: false, this.wrapClosures: wrapClosuresDefault});
87 } 87 }
88 88
89 class JSCodeOptions { 89 class JSCodeOptions {
90 /// Whether to emit the source map files. 90 /// Whether to emit the source map files.
91 final bool emitSourceMaps; 91 final bool emitSourceMaps;
92 92
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 // The pub-cache directory is two levels up, but we verify that the layout 420 // The pub-cache directory is two levels up, but we verify that the layout
421 // looks correct. 421 // looks correct.
422 if (path.basename(dir) != 'dev_compiler') return null; 422 if (path.basename(dir) != 'dev_compiler') return null;
423 dir = path.dirname(dir); 423 dir = path.dirname(dir);
424 if (path.basename(dir) != 'global_packages') return null; 424 if (path.basename(dir) != 'global_packages') return null;
425 dir = path.dirname(dir); 425 dir = path.dirname(dir);
426 return path.join(dir, cacheDir, 'lib', 'runtime'); 426 return path.join(dir, cacheDir, 'lib', 'runtime');
427 } 427 }
428 return null; 428 return null;
429 } 429 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698