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

Side by Side Diff: pkg/compiler/lib/src/resolution/semantic_visitor_mixins.dart

Issue 1161823004: Handle .fromEnvironment and incompatible constructor invocations (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Change handling of incompatible redirecting factories. Created 5 years, 6 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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 dart2js.semantics_visitor; 5 part of dart2js.semantics_visitor;
6 6
7 /// Interface for bulk handling of a [Node] in a semantic visitor. 7 /// Interface for bulk handling of a [Node] in a semantic visitor.
8 abstract class BulkHandle<R, A> { 8 abstract class BulkHandle<R, A> {
9 /// Handle [node] either regardless of semantics or to report that [node] is 9 /// Handle [node] either regardless of semantics or to report that [node] is
10 /// unhandled. [message] contains a message template for the latter case: 10 /// unhandled. [message] contains a message template for the latter case:
(...skipping 2852 matching lines...) Expand 10 before | Expand all | Expand 10 after
2863 2863
2864 @override 2864 @override
2865 R visitConstConstructorInvoke( 2865 R visitConstConstructorInvoke(
2866 NewExpression node, 2866 NewExpression node,
2867 ConstructedConstantExpression constant, 2867 ConstructedConstantExpression constant,
2868 A arg) { 2868 A arg) {
2869 return bulkHandleNew(node, arg); 2869 return bulkHandleNew(node, arg);
2870 } 2870 }
2871 2871
2872 @override 2872 @override
2873 R visitBoolFromEnvironmentConstructorInvoke(
2874 NewExpression node,
2875 BoolFromEnvironmentConstantExpression constant,
2876 A arg) {
2877 return bulkHandleNew(node, arg);
2878 }
2879
2880 @override
2881 R visitIntFromEnvironmentConstructorInvoke(
2882 NewExpression node,
2883 IntFromEnvironmentConstantExpression constant,
2884 A arg) {
2885 return bulkHandleNew(node, arg);
2886 }
2887
2888 @override
2889 R visitStringFromEnvironmentConstructorInvoke(
2890 NewExpression node,
2891 StringFromEnvironmentConstantExpression constant,
2892 A arg) {
2893 return bulkHandleNew(node, arg);
2894 }
2895
2896 @override
2897 R visitConstructorIncompatibleInvoke(
2898 NewExpression node,
2899 ConstructorElement constructor,
2900 InterfaceType type,
2901 NodeList arguments,
2902 CallStructure callStructure,
2903 A arg) {
2904 return bulkHandleNew(node, arg);
2905 }
2906
2907 @override
2873 R visitGenerativeConstructorInvoke( 2908 R visitGenerativeConstructorInvoke(
2874 NewExpression node, 2909 NewExpression node,
2875 ConstructorElement constructor, 2910 ConstructorElement constructor,
2876 InterfaceType type, 2911 InterfaceType type,
2877 NodeList arguments, 2912 NodeList arguments,
2878 CallStructure callStructure, 2913 CallStructure callStructure,
2879 A arg) { 2914 A arg) {
2880 return bulkHandleNew(node, arg); 2915 return bulkHandleNew(node, arg);
2881 } 2916 }
2882 2917
(...skipping 2623 matching lines...) Expand 10 before | Expand all | Expand 10 after
5506 5541
5507 @override 5542 @override
5508 R visitConstConstructorInvoke( 5543 R visitConstConstructorInvoke(
5509 NewExpression node, 5544 NewExpression node,
5510 ConstructedConstantExpression constant, 5545 ConstructedConstantExpression constant,
5511 A arg) { 5546 A arg) {
5512 return null; 5547 return null;
5513 } 5548 }
5514 5549
5515 @override 5550 @override
5551 R visitBoolFromEnvironmentConstructorInvoke(
5552 NewExpression node,
5553 BoolFromEnvironmentConstantExpression constant,
5554 A arg) {
5555 return null;
5556 }
5557
5558 @override
5559 R visitIntFromEnvironmentConstructorInvoke(
5560 NewExpression node,
5561 IntFromEnvironmentConstantExpression constant,
5562 A arg) {
5563 return null;
5564 }
5565
5566 @override
5567 R visitStringFromEnvironmentConstructorInvoke(
5568 NewExpression node,
5569 StringFromEnvironmentConstantExpression constant,
5570 A arg) {
5571 return null;
5572 }
5573
5574 @override
5575 R visitConstructorIncompatibleInvoke(
5576 NewExpression node,
5577 ConstructorElement constructor,
5578 InterfaceType type,
5579 NodeList arguments,
5580 CallStructure callStructure,
5581 A arg) {
5582 apply(arguments, arg);
5583 return null;
5584 }
5585
5586 @override
5516 R visitUnresolvedClassConstructorInvoke( 5587 R visitUnresolvedClassConstructorInvoke(
5517 NewExpression node, 5588 NewExpression node,
5518 Element constructor, 5589 Element constructor,
5519 DartType type, 5590 DartType type,
5520 NodeList arguments, 5591 NodeList arguments,
5521 Selector selector, 5592 Selector selector,
5522 A arg) { 5593 A arg) {
5523 apply(arguments, arg); 5594 apply(arguments, arg);
5524 return null; 5595 return null;
5525 } 5596 }
(...skipping 2043 matching lines...) Expand 10 before | Expand all | Expand 10 after
7569 7640
7570 @override 7641 @override
7571 R visitConstConstructorInvoke( 7642 R visitConstConstructorInvoke(
7572 NewExpression node, 7643 NewExpression node,
7573 ConstructedConstantExpression constant, 7644 ConstructedConstantExpression constant,
7574 A arg) { 7645 A arg) {
7575 return handleConstantGet(node, constant, arg); 7646 return handleConstantGet(node, constant, arg);
7576 } 7647 }
7577 7648
7578 @override 7649 @override
7650 R visitBoolFromEnvironmentConstructorInvoke(
7651 NewExpression node,
7652 BoolFromEnvironmentConstantExpression constant,
7653 A arg) {
7654 return handleConstantGet(node, constant, arg);
7655 }
7656
7657 @override
7658 R visitIntFromEnvironmentConstructorInvoke(
7659 NewExpression node,
7660 IntFromEnvironmentConstantExpression constant,
7661 A arg) {
7662 return handleConstantGet(node, constant, arg);
7663 }
7664
7665 @override
7666 R visitStringFromEnvironmentConstructorInvoke(
7667 NewExpression node,
7668 StringFromEnvironmentConstantExpression constant,
7669 A arg) {
7670 return handleConstantGet(node, constant, arg);
7671 }
7672
7673 @override
7579 R visitConstantGet( 7674 R visitConstantGet(
7580 Send node, 7675 Send node,
7581 ConstantExpression constant, 7676 ConstantExpression constant,
7582 A arg) { 7677 A arg) {
7583 return handleConstantGet(node, constant, arg); 7678 return handleConstantGet(node, constant, arg);
7584 } 7679 }
7585 7680
7586 @override 7681 @override
7587 R visitConstantInvoke( 7682 R visitConstantInvoke(
7588 Send node, 7683 Send node,
(...skipping 3021 matching lines...) Expand 10 before | Expand all | Expand 10 after
10610 NewExpression node, 10705 NewExpression node,
10611 ConstructorElement constructor, 10706 ConstructorElement constructor,
10612 InterfaceType type, 10707 InterfaceType type,
10613 NodeList arguments, 10708 NodeList arguments,
10614 CallStructure callStructure, 10709 CallStructure callStructure,
10615 A arg) { 10710 A arg) {
10616 return handleConstructorInvoke( 10711 return handleConstructorInvoke(
10617 node, constructor, type, arguments, callStructure, arg); 10712 node, constructor, type, arguments, callStructure, arg);
10618 } 10713 }
10619 } 10714 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/resolution/semantic_visitor.dart ('k') | pkg/compiler/lib/src/resolution/send_resolver.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698