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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/compiler.dart

Issue 11348297: Widen big concrete types to dynamic. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address Peter's comment Created 8 years 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 | sdk/lib/_internal/compiler/implementation/types/concrete_types_inferrer.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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 part of dart2js; 5 part of dart2js;
6 6
7 /** 7 /**
8 * If true, print a warning for each method that was resolved, but not 8 * If true, print a warning for each method that was resolved, but not
9 * compiled. 9 * compiled.
10 */ 10 */
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 final Stopwatch totalCompileTime = new Stopwatch(); 108 final Stopwatch totalCompileTime = new Stopwatch();
109 int nextFreeClassId = 0; 109 int nextFreeClassId = 0;
110 World world; 110 World world;
111 String assembledCode; 111 String assembledCode;
112 Types types; 112 Types types;
113 113
114 final bool enableMinification; 114 final bool enableMinification;
115 final bool enableTypeAssertions; 115 final bool enableTypeAssertions;
116 final bool enableUserAssertions; 116 final bool enableUserAssertions;
117 final bool enableConcreteTypeInference; 117 final bool enableConcreteTypeInference;
118 /**
119 * The maximum size of a concrete type before it widens to dynamic during
120 * concrete type inference.
121 */
122 final int maxConcreteTypeSize;
118 final bool analyzeAll; 123 final bool analyzeAll;
119 final bool enableNativeLiveTypeAnalysis; 124 final bool enableNativeLiveTypeAnalysis;
120 final bool rejectDeprecatedFeatures; 125 final bool rejectDeprecatedFeatures;
121 final bool checkDeprecationInSdk; 126 final bool checkDeprecationInSdk;
122 127
123 bool disableInlining = false; 128 bool disableInlining = false;
124 129
125 final Tracer tracer; 130 final Tracer tracer;
126 131
127 CompilerTask measuredTask; 132 CompilerTask measuredTask;
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 int phase; 231 int phase;
227 232
228 bool compilationFailed = false; 233 bool compilationFailed = false;
229 234
230 bool hasCrashed = false; 235 bool hasCrashed = false;
231 236
232 Compiler({this.tracer: const Tracer(), 237 Compiler({this.tracer: const Tracer(),
233 this.enableTypeAssertions: false, 238 this.enableTypeAssertions: false,
234 this.enableUserAssertions: false, 239 this.enableUserAssertions: false,
235 this.enableConcreteTypeInference: false, 240 this.enableConcreteTypeInference: false,
241 this.maxConcreteTypeSize: 5,
236 this.enableMinification: false, 242 this.enableMinification: false,
237 this.enableNativeLiveTypeAnalysis: false, 243 this.enableNativeLiveTypeAnalysis: false,
238 bool emitJavaScript: true, 244 bool emitJavaScript: true,
239 bool generateSourceMap: true, 245 bool generateSourceMap: true,
240 bool disallowUnsafeEval: false, 246 bool disallowUnsafeEval: false,
241 this.analyzeAll: false, 247 this.analyzeAll: false,
242 this.rejectDeprecatedFeatures: false, 248 this.rejectDeprecatedFeatures: false,
243 this.checkDeprecationInSdk: false, 249 this.checkDeprecationInSdk: false,
244 List<String> strips: const []}) 250 List<String> strips: const []})
245 : libraries = new Map<String, LibraryElement>(), 251 : libraries = new Map<String, LibraryElement>(),
(...skipping 18 matching lines...) Expand all
264 tasks = [ 270 tasks = [
265 fileReadingTask = new ReadingFilesTask(this), 271 fileReadingTask = new ReadingFilesTask(this),
266 libraryLoader = new LibraryLoaderTask(this), 272 libraryLoader = new LibraryLoaderTask(this),
267 scanner = new ScannerTask(this), 273 scanner = new ScannerTask(this),
268 dietParser = new DietParserTask(this), 274 dietParser = new DietParserTask(this),
269 parser = new ParserTask(this), 275 parser = new ParserTask(this),
270 patchParser = new PatchParserTask(this), 276 patchParser = new PatchParserTask(this),
271 resolver = new ResolverTask(this), 277 resolver = new ResolverTask(this),
272 closureToClassMapper = new closureMapping.ClosureTask(this, closureNamer), 278 closureToClassMapper = new closureMapping.ClosureTask(this, closureNamer),
273 checker = new TypeCheckerTask(this), 279 checker = new TypeCheckerTask(this),
274 typesTask = new ti.TypesTask(this, enableConcreteTypeInference), 280 typesTask = new ti.TypesTask(this),
275 constantHandler = new ConstantHandler(this, backend.constantSystem), 281 constantHandler = new ConstantHandler(this, backend.constantSystem),
276 enqueuer = new EnqueueTask(this)]; 282 enqueuer = new EnqueueTask(this)];
277 283
278 tasks.addAll(backend.tasks); 284 tasks.addAll(backend.tasks);
279 metadataHandler = new ConstantHandler( 285 metadataHandler = new ConstantHandler(
280 this, backend.constantSystem, isMetadata: true); 286 this, backend.constantSystem, isMetadata: true);
281 } 287 }
282 288
283 Universe get resolverWorld => enqueuer.resolution.universe; 289 Universe get resolverWorld => enqueuer.resolution.universe;
284 Universe get codegenWorld => enqueuer.codegen.universe; 290 Universe get codegenWorld => enqueuer.codegen.universe;
(...skipping 691 matching lines...) Expand 10 before | Expand all | Expand 10 after
976 // TODO(johnniwinther): Use [spannable] and [message] to provide better 982 // TODO(johnniwinther): Use [spannable] and [message] to provide better
977 // information on assertion errors. 983 // information on assertion errors.
978 if (condition is Function){ 984 if (condition is Function){
979 condition = condition(); 985 condition = condition();
980 } 986 }
981 if (spannable == null || !condition) { 987 if (spannable == null || !condition) {
982 throw new SpannableAssertionFailure(spannable, message); 988 throw new SpannableAssertionFailure(spannable, message);
983 } 989 }
984 return true; 990 return true;
985 } 991 }
OLDNEW
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/types/concrete_types_inferrer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698