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

Side by Side Diff: pkg/compiler/lib/src/world.dart

Issue 1325843003: Add optional message to assert in Dart2js. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Address comments Created 5 years, 3 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) 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 library dart2js.world; 5 library dart2js.world;
6 6
7 import 'closure.dart' show 7 import 'closure.dart' show
8 SynthesizedCallMethodElementX; 8 SynthesizedCallMethodElementX;
9 import 'common/backend_api.dart' show 9 import 'common/backend_api.dart' show
10 Backend; 10 Backend;
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 final Set<Element> elementsThatCannotThrow = new Set<Element>(); 346 final Set<Element> elementsThatCannotThrow = new Set<Element>();
347 347
348 final Set<Element> functionsThatMightBePassedToApply = 348 final Set<Element> functionsThatMightBePassedToApply =
349 new Set<FunctionElement>(); 349 new Set<FunctionElement>();
350 350
351 final Set<Element> alreadyPopulated; 351 final Set<Element> alreadyPopulated;
352 352
353 bool get isClosed => compiler.phase > Compiler.PHASE_RESOLVING; 353 bool get isClosed => compiler.phase > Compiler.PHASE_RESOLVING;
354 354
355 // Used by selectors. 355 // Used by selectors.
356 bool isAssertMethod(Element element) {
357 return compiler.backend.isAssertMethod(element);
358 }
359
360 // Used by selectors.
361 bool isForeign(Element element) { 356 bool isForeign(Element element) {
362 return compiler.backend.isForeign(element); 357 return compiler.backend.isForeign(element);
363 } 358 }
364 359
365 Set<ClassElement> typesImplementedBySubclassesOf(ClassElement cls) { 360 Set<ClassElement> typesImplementedBySubclassesOf(ClassElement cls) {
366 return _typesImplementedBySubclasses[cls.declaration]; 361 return _typesImplementedBySubclasses[cls.declaration];
367 } 362 }
368 363
369 World(Compiler compiler) 364 World(Compiler compiler)
370 : allFunctions = new FunctionSet(compiler), 365 : allFunctions = new FunctionSet(compiler),
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
583 // function expressions's element. 578 // function expressions's element.
584 // TODO(herhut): Generate classes for function expressions earlier. 579 // TODO(herhut): Generate classes for function expressions earlier.
585 if (element is SynthesizedCallMethodElementX) { 580 if (element is SynthesizedCallMethodElementX) {
586 return getMightBePassedToApply(element.expression); 581 return getMightBePassedToApply(element.expression);
587 } 582 }
588 return functionsThatMightBePassedToApply.contains(element); 583 return functionsThatMightBePassedToApply.contains(element);
589 } 584 }
590 585
591 bool get hasClosedWorldAssumption => !compiler.hasIncrementalSupport; 586 bool get hasClosedWorldAssumption => !compiler.hasIncrementalSupport;
592 } 587 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698