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

Side by Side Diff: dart/sdk/lib/_internal/compiler/implementation/ssa/builder.dart

Issue 11308347: Fix crash on factory redirection to an unresolved class. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 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 | Annotate | Revision Log
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 ssa; 5 part of ssa;
6 6
7 /** 7 /**
8 * A special element for the extra parameter taken by intercepted 8 * A special element for the extra parameter taken by intercepted
9 * methods. We need to override [Element.computeType] because our 9 * methods. We need to override [Element.computeType] because our
10 * optimizers may look at its declared type. 10 * optimizers may look at its declared type.
(...skipping 3259 matching lines...) Expand 10 before | Expand all | Expand 10 after
3270 // TODO(5347): Try to avoid the need for calling [implementation] before 3270 // TODO(5347): Try to avoid the need for calling [implementation] before
3271 // calling [addStaticSendArgumentsToList]. 3271 // calling [addStaticSendArgumentsToList].
3272 bool succeeded = addStaticSendArgumentsToList(selector, node.arguments, 3272 bool succeeded = addStaticSendArgumentsToList(selector, node.arguments,
3273 constructor.implementation, 3273 constructor.implementation,
3274 inputs); 3274 inputs);
3275 if (!succeeded) { 3275 if (!succeeded) {
3276 generateWrongArgumentCountError(node, constructor, node.arguments); 3276 generateWrongArgumentCountError(node, constructor, node.arguments);
3277 return; 3277 return;
3278 } 3278 }
3279 3279
3280 if (constructor.getEnclosingClass().isAbstract(compiler) && 3280 ClassElement cls = constructor.getEnclosingClass();
3281 constructor.isGenerativeConstructor()) { 3281 if (cls.isAbstract(compiler) && constructor.isGenerativeConstructor()) {
3282 generateAbstractClassInstantiationError(node, type.name.slowToString()); 3282 generateAbstractClassInstantiationError(node, cls.name.slowToString());
3283 return; 3283 return;
3284 } 3284 }
3285 if (compiler.world.needsRti(constructor.enclosingElement)) { 3285 if (compiler.world.needsRti(constructor.enclosingElement)) {
3286 if (!type.isRaw) { 3286 if (!type.isRaw) {
3287 type.typeArguments.forEach((DartType argument) { 3287 type.typeArguments.forEach((DartType argument) {
3288 inputs.add(analyzeTypeArgument(argument, node)); 3288 inputs.add(analyzeTypeArgument(argument, node));
3289 }); 3289 });
3290 } 3290 }
3291 } 3291 }
3292 3292
(...skipping 1664 matching lines...) Expand 10 before | Expand all | Expand 10 after
4957 new HSubGraphBlockInformation(elseBranch.graph)); 4957 new HSubGraphBlockInformation(elseBranch.graph));
4958 4958
4959 HBasicBlock conditionStartBlock = conditionBranch.block; 4959 HBasicBlock conditionStartBlock = conditionBranch.block;
4960 conditionStartBlock.setBlockFlow(info, joinBlock); 4960 conditionStartBlock.setBlockFlow(info, joinBlock);
4961 SubGraph conditionGraph = conditionBranch.graph; 4961 SubGraph conditionGraph = conditionBranch.graph;
4962 HIf branch = conditionGraph.end.last; 4962 HIf branch = conditionGraph.end.last;
4963 assert(branch is HIf); 4963 assert(branch is HIf);
4964 branch.blockInformation = conditionStartBlock.blockFlow; 4964 branch.blockInformation = conditionStartBlock.blockFlow;
4965 } 4965 }
4966 } 4966 }
OLDNEW
« no previous file with comments | « dart/sdk/lib/_internal/compiler/implementation/resolution/members.dart ('k') | dart/tests/language/language_dart2js.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698