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

Side by Side Diff: pkg/compiler/lib/src/js_backend/backend.dart

Issue 2545153002: Handle synthetic nodes use to throw exceptions (Closed)
Patch Set: Also handle malformed type Created 4 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
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 js_backend.backend; 5 library js_backend.backend;
6 6
7 import 'dart:async' show Future; 7 import 'dart:async' show Future;
8 8
9 import 'package:js_runtime/shared/embedded_names.dart' as embeddedNames; 9 import 'package:js_runtime/shared/embedded_names.dart' as embeddedNames;
10 10
(...skipping 730 matching lines...) Expand 10 before | Expand all | Expand 10 after
741 element.library == helpers.interceptorsLibrary || 741 element.library == helpers.interceptorsLibrary ||
742 element.library == helpers.isolateHelperLibrary) { 742 element.library == helpers.isolateHelperLibrary) {
743 // TODO(johnniwinther): We should be more precise about these. 743 // TODO(johnniwinther): We should be more precise about these.
744 return true; 744 return true;
745 } else if (element == coreClasses.listClass || 745 } else if (element == coreClasses.listClass ||
746 element == helpers.mapLiteralClass || 746 element == helpers.mapLiteralClass ||
747 element == coreClasses.functionClass || 747 element == coreClasses.functionClass ||
748 element == coreClasses.stringClass) { 748 element == coreClasses.stringClass) {
749 // TODO(johnniwinther): Avoid these. 749 // TODO(johnniwinther): Avoid these.
750 return true; 750 return true;
751 } else if (element == helpers.genericNoSuchMethod ||
752 element == helpers.unresolvedConstructorError ||
753 element == helpers.malformedTypeError) {
754 return true;
751 } 755 }
752 return false; 756 return false;
753 } 757 }
754 758
755 bool usedByBackend(Element element) { 759 bool usedByBackend(Element element) {
756 if (element.isRegularParameter || 760 if (element.isRegularParameter ||
757 element.isInitializingFormal || 761 element.isInitializingFormal ||
758 element.isField) { 762 element.isField) {
759 if (usedByBackend(element.enclosingElement)) return true; 763 if (usedByBackend(element.enclosingElement)) return true;
760 } 764 }
(...skipping 2465 matching lines...) Expand 10 before | Expand all | Expand 10 after
3226 ClassElement get mapImplementation => helpers.mapLiteralClass; 3230 ClassElement get mapImplementation => helpers.mapLiteralClass;
3227 ClassElement get constMapImplementation => helpers.constMapLiteralClass; 3231 ClassElement get constMapImplementation => helpers.constMapLiteralClass;
3228 ClassElement get typeImplementation => helpers.typeLiteralClass; 3232 ClassElement get typeImplementation => helpers.typeLiteralClass;
3229 ClassElement get boolImplementation => helpers.jsBoolClass; 3233 ClassElement get boolImplementation => helpers.jsBoolClass;
3230 ClassElement get nullImplementation => helpers.jsNullClass; 3234 ClassElement get nullImplementation => helpers.jsNullClass;
3231 ClassElement get syncStarIterableImplementation => helpers.syncStarIterable; 3235 ClassElement get syncStarIterableImplementation => helpers.syncStarIterable;
3232 ClassElement get asyncFutureImplementation => helpers.futureImplementation; 3236 ClassElement get asyncFutureImplementation => helpers.futureImplementation;
3233 ClassElement get asyncStarStreamImplementation => helpers.controllerStream; 3237 ClassElement get asyncStarStreamImplementation => helpers.controllerStream;
3234 ClassElement get functionImplementation => helpers.coreClasses.functionClass; 3238 ClassElement get functionImplementation => helpers.coreClasses.functionClass;
3235 } 3239 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698