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

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

Issue 2296723003: Handle html+mirrors (Closed)
Patch Set: Created 4 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
« no previous file with comments | « no previous file | tests/compiler/dart2js/serialization/compilation_test_helper.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 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 2326 matching lines...) Expand 10 before | Expand all | Expand 10 after
2337 staticFields.add(target); 2337 staticFields.add(target);
2338 } else if (target.isLibrary || target.isClass) { 2338 } else if (target.isLibrary || target.isClass) {
2339 addFieldsInContainer(target); 2339 addFieldsInContainer(target);
2340 } 2340 }
2341 } 2341 }
2342 return staticFields; 2342 return staticFields;
2343 } 2343 }
2344 2344
2345 /// Called when [enqueuer] is empty, but before it is closed. 2345 /// Called when [enqueuer] is empty, but before it is closed.
2346 bool onQueueEmpty(Enqueuer enqueuer, Iterable<ClassElement> recentClasses) { 2346 bool onQueueEmpty(Enqueuer enqueuer, Iterable<ClassElement> recentClasses) {
2347 // Add elements referenced only via custom elements. Return early if any 2347 if (!compiler.options.resolveOnly) {
2348 // elements are added to avoid counting the elements as due to mirrors. 2348 // TODO(johnniwinther): The custom element analysis eagerly enqueues
2349 customElementsAnalysis.onQueueEmpty(enqueuer); 2349 // elements on the codegen queue. Change to compute the data needed
2350 // instead.
2351
2352 // Add elements referenced only via custom elements. Return early if any
2353 // elements are added to avoid counting the elements as due to mirrors.
2354 customElementsAnalysis.onQueueEmpty(enqueuer);
2355 }
2350 if (!enqueuer.queueIsEmpty) return false; 2356 if (!enqueuer.queueIsEmpty) return false;
2351 2357
2352 noSuchMethodRegistry.onQueueEmpty(); 2358 noSuchMethodRegistry.onQueueEmpty();
2353 if (!enabledNoSuchMethod && 2359 if (!enabledNoSuchMethod &&
2354 (noSuchMethodRegistry.hasThrowingNoSuchMethod || 2360 (noSuchMethodRegistry.hasThrowingNoSuchMethod ||
2355 noSuchMethodRegistry.hasComplexNoSuchMethod)) { 2361 noSuchMethodRegistry.hasComplexNoSuchMethod)) {
2356 enableNoSuchMethod(enqueuer); 2362 enableNoSuchMethod(enqueuer);
2357 enabledNoSuchMethod = true; 2363 enabledNoSuchMethod = true;
2358 } 2364 }
2359 2365
(...skipping 838 matching lines...) Expand 10 before | Expand all | Expand 10 after
3198 3204
3199 @override 3205 @override
3200 void onImpactUsed(ImpactUseCase impactUse) { 3206 void onImpactUsed(ImpactUseCase impactUse) {
3201 if (impactUse == DeferredLoadTask.IMPACT_USE && !supportSerialization) { 3207 if (impactUse == DeferredLoadTask.IMPACT_USE && !supportSerialization) {
3202 // TODO(johnniwinther): Allow emptying when serialization has been 3208 // TODO(johnniwinther): Allow emptying when serialization has been
3203 // performed. 3209 // performed.
3204 resolution.emptyCache(); 3210 resolution.emptyCache();
3205 } 3211 }
3206 } 3212 }
3207 } 3213 }
OLDNEW
« no previous file with comments | « no previous file | tests/compiler/dart2js/serialization/compilation_test_helper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698