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

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

Issue 1525423002: Handle malformed elements in onElementResolved. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 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 part of js_backend; 5 part of js_backend;
6 6
7 const VERBOSE_OPTIMIZER_HINTS = false; 7 const VERBOSE_OPTIMIZER_HINTS = false;
8 8
9 class JavaScriptItemCompilationContext extends ItemCompilationContext { 9 class JavaScriptItemCompilationContext extends ItemCompilationContext {
10 final Set<HInstruction> boundsChecked = new Set<HInstruction>(); 10 final Set<HInstruction> boundsChecked = new Set<HInstruction>();
(...skipping 2407 matching lines...) Expand 10 before | Expand all | Expand 10 after
2418 void onQueueClosed() { 2418 void onQueueClosed() {
2419 lookupMapAnalysis.onQueueClosed(); 2419 lookupMapAnalysis.onQueueClosed();
2420 jsInteropAnalysis.onQueueClosed(); 2420 jsInteropAnalysis.onQueueClosed();
2421 } 2421 }
2422 2422
2423 void onCodegenStart() { 2423 void onCodegenStart() {
2424 lookupMapAnalysis.onCodegenStart(); 2424 lookupMapAnalysis.onCodegenStart();
2425 } 2425 }
2426 2426
2427 void onElementResolved(Element element, TreeElements elements) { 2427 void onElementResolved(Element element, TreeElements elements) {
2428 if (element.isMalformed) return;
sigurdm 2015/12/16 13:20:38 Add comment when this can happen
Johnni Winther 2015/12/18 13:28:17 Done.
2429
2428 if ((element.isFunction || element.isConstructor) && 2430 if ((element.isFunction || element.isConstructor) &&
2429 annotations.noInline(element)) { 2431 annotations.noInline(element)) {
2430 inlineCache.markAsNonInlinable(element); 2432 inlineCache.markAsNonInlinable(element);
2431 } 2433 }
2432 2434
2433 LibraryElement library = element.library; 2435 LibraryElement library = element.library;
2434 if (!library.isPlatformLibrary && !canLibraryUseNative(library)) return; 2436 if (!library.isPlatformLibrary && !canLibraryUseNative(library)) return;
2435 bool hasNoInline = false; 2437 bool hasNoInline = false;
2436 bool hasForceInline = false; 2438 bool hasForceInline = false;
2437 bool hasNoThrows = false; 2439 bool hasNoThrows = false;
(...skipping 720 matching lines...) Expand 10 before | Expand all | Expand 10 after
3158 } 3160 }
3159 } 3161 }
3160 3162
3161 @override 3163 @override
3162 void onImpactUsed(ImpactUseCase impactUse) { 3164 void onImpactUsed(ImpactUseCase impactUse) {
3163 if (impactUse == DeferredLoadTask.IMPACT_USE) { 3165 if (impactUse == DeferredLoadTask.IMPACT_USE) {
3164 resolution.emptyCache(); 3166 resolution.emptyCache();
3165 } 3167 }
3166 } 3168 }
3167 } 3169 }
OLDNEW
« no previous file with comments | « no previous file | tests/compiler/dart2js/analyze_all_test.dart » ('j') | tests/compiler/dart2js/analyze_all_test.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698