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

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

Issue 2392943003: Handle const constructor invocation in kernel_impact. (Closed)
Patch Set: Updated cf. comments. Created 4 years, 2 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 | pkg/compiler/lib/src/js_backend/backend.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 dart2js.enqueue; 5 library dart2js.enqueue;
6 6
7 import 'dart:collection' show Queue; 7 import 'dart:collection' show Queue;
8 8
9 import 'common/names.dart' show Identifiers; 9 import 'common/names.dart' show Identifiers;
10 import 'common/resolution.dart' show Resolution; 10 import 'common/resolution.dart' show Resolution;
(...skipping 578 matching lines...) Expand 10 before | Expand all | Expand 10 after
589 // TODO(johnniwinther): Avoid this. Currently [FIELD_GET] and 589 // TODO(johnniwinther): Avoid this. Currently [FIELD_GET] and
590 // [FIELD_SET] contains [BoxFieldElement]s which we cannot enqueue. 590 // [FIELD_SET] contains [BoxFieldElement]s which we cannot enqueue.
591 // Also [CLOSURE] contains [LocalFunctionElement] which we cannot 591 // Also [CLOSURE] contains [LocalFunctionElement] which we cannot
592 // enqueue. 592 // enqueue.
593 addElement = false; 593 addElement = false;
594 break; 594 break;
595 case StaticUseKind.SUPER_FIELD_SET: 595 case StaticUseKind.SUPER_FIELD_SET:
596 case StaticUseKind.SUPER_TEAR_OFF: 596 case StaticUseKind.SUPER_TEAR_OFF:
597 case StaticUseKind.GENERAL: 597 case StaticUseKind.GENERAL:
598 break; 598 break;
599 case StaticUseKind.CONSTRUCTOR_INVOKE:
600 case StaticUseKind.CONST_CONSTRUCTOR_INVOKE:
601 registerTypeUse(new TypeUse.instantiation(staticUse.type));
602 break;
599 } 603 }
600 if (addElement) { 604 if (addElement) {
601 addToWorkList(element); 605 addToWorkList(element);
602 } 606 }
603 } 607 }
604 608
605 void registerTypeUse(TypeUse typeUse) { 609 void registerTypeUse(TypeUse typeUse) {
606 DartType type = typeUse.type; 610 DartType type = typeUse.type;
607 switch (typeUse.kind) { 611 switch (typeUse.kind) {
608 case TypeUseKind.INSTANTIATION: 612 case TypeUseKind.INSTANTIATION:
609 registerInstantiatedType(type); 613 registerInstantiatedType(type);
610 break; 614 break;
611 case TypeUseKind.INSTANTIATION:
612 case TypeUseKind.IS_CHECK: 615 case TypeUseKind.IS_CHECK:
613 case TypeUseKind.AS_CAST: 616 case TypeUseKind.AS_CAST:
614 case TypeUseKind.CATCH_TYPE: 617 case TypeUseKind.CATCH_TYPE:
615 _registerIsCheck(type); 618 _registerIsCheck(type);
616 break; 619 break;
617 case TypeUseKind.CHECKED_MODE_CHECK: 620 case TypeUseKind.CHECKED_MODE_CHECK:
618 if (compiler.options.enableTypeAssertions) { 621 if (compiler.options.enableTypeAssertions) {
619 _registerIsCheck(type); 622 _registerIsCheck(type);
620 } 623 }
621 break; 624 break;
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
908 } 911 }
909 912
910 typedef void _DeferredActionFunction(); 913 typedef void _DeferredActionFunction();
911 914
912 class _DeferredAction { 915 class _DeferredAction {
913 final Element element; 916 final Element element;
914 final _DeferredActionFunction action; 917 final _DeferredActionFunction action;
915 918
916 _DeferredAction(this.element, this.action); 919 _DeferredAction(this.element, this.action);
917 } 920 }
OLDNEW
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js_backend/backend.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698