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

Side by Side Diff: pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.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
« no previous file with comments | « no previous file | pkg/compiler/lib/src/resolution/access_semantics.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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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.ir_builder_task; 5 library dart2js.ir_builder_task;
6 6
7 import '../closure.dart' as closurelib; 7 import '../closure.dart' as closurelib;
8 import '../closure.dart' hide ClosureScope; 8 import '../closure.dart' hide ClosureScope;
9 import '../constants/expressions.dart'; 9 import '../constants/expressions.dart';
10 import '../dart_types.dart'; 10 import '../dart_types.dart';
(...skipping 1560 matching lines...) Expand 10 before | Expand all | Expand 10 after
1571 Element constructor, 1571 Element constructor,
1572 DartType type, 1572 DartType type,
1573 ast.NodeList arguments, 1573 ast.NodeList arguments,
1574 Selector selector, _) { 1574 Selector selector, _) {
1575 // If the class is there but the constructor is missing, it's an NSM error. 1575 // If the class is there but the constructor is missing, it's an NSM error.
1576 return buildStaticNoSuchMethod(selector, 1576 return buildStaticNoSuchMethod(selector,
1577 translateDynamicArguments(arguments, selector.callStructure)); 1577 translateDynamicArguments(arguments, selector.callStructure));
1578 } 1578 }
1579 1579
1580 @override 1580 @override
1581 ir.Primitive visitConstructorIncompatibleInvoke(
1582 ast.NewExpression node,
1583 Element constructor,
1584 DartType type,
1585 ast.NodeList arguments,
1586 CallStructure callStructure, _) {
1587 return buildStaticNoSuchMethod(elements.getSelector(node.send),
1588 translateDynamicArguments(arguments, callStructure));
1589 }
1590
1591 @override
1581 ir.Primitive errorNonConstantConstructorInvoke( 1592 ir.Primitive errorNonConstantConstructorInvoke(
1582 ast.NewExpression node, 1593 ast.NewExpression node,
1583 Element element, 1594 Element element,
1584 DartType type, 1595 DartType type,
1585 ast.NodeList arguments, 1596 ast.NodeList arguments,
1586 CallStructure callStructure, _) { 1597 CallStructure callStructure, _) {
1587 assert(compiler.compilationFailed); 1598 assert(compiler.compilationFailed);
1588 return irBuilder.buildNullConstant(); 1599 return irBuilder.buildNullConstant();
1589 } 1600 }
1590 1601
(...skipping 1277 matching lines...) Expand 10 before | Expand all | Expand 10 after
2868 node.body = replacementFor(node.body); 2879 node.body = replacementFor(node.body);
2869 } 2880 }
2870 } 2881 }
2871 2882
2872 /// Visit a just-deleted subterm and unlink all [Reference]s in it. 2883 /// Visit a just-deleted subterm and unlink all [Reference]s in it.
2873 class RemovalVisitor extends ir.RecursiveVisitor { 2884 class RemovalVisitor extends ir.RecursiveVisitor {
2874 processReference(ir.Reference reference) { 2885 processReference(ir.Reference reference) {
2875 reference.unlink(); 2886 reference.unlink();
2876 } 2887 }
2877 } 2888 }
OLDNEW
« no previous file with comments | « no previous file | pkg/compiler/lib/src/resolution/access_semantics.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698