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

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

Issue 11361098: Add a check for issue 6530, so that we don't report errors in checked mode on a void return type. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 1 month 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
« no previous file with comments | « no previous file | no next file » | 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 part of ssa; 5 part of ssa;
6 6
7 class Interceptors { 7 class Interceptors {
8 Compiler compiler; 8 Compiler compiler;
9 Interceptors(Compiler this.compiler); 9 Interceptors(Compiler this.compiler);
10 10
(...skipping 3441 matching lines...) Expand 10 before | Expand all | Expand 10 after
3452 if (node.isRedirectingFactoryBody) { 3452 if (node.isRedirectingFactoryBody) {
3453 compiler.internalError("Unimplemented: Redirecting factory constructor", 3453 compiler.internalError("Unimplemented: Redirecting factory constructor",
3454 node: node); 3454 node: node);
3455 } 3455 }
3456 HInstruction value; 3456 HInstruction value;
3457 if (node.expression == null) { 3457 if (node.expression == null) {
3458 value = graph.addConstantNull(constantSystem); 3458 value = graph.addConstantNull(constantSystem);
3459 } else { 3459 } else {
3460 visit(node.expression); 3460 visit(node.expression);
3461 value = pop(); 3461 value = pop();
3462 value = potentiallyCheckType(value, returnType); 3462 if (returnType == compiler.types.voidType
3463 && value is HForeign) {
3464 // TODO(6530): remove this check.
3465 } else {
3466 value = potentiallyCheckType(value, returnType);
3467 }
3463 } 3468 }
3464 if (!inliningStack.isEmpty) { 3469 if (!inliningStack.isEmpty) {
3465 localsHandler.updateLocal(returnElement, value); 3470 localsHandler.updateLocal(returnElement, value);
3466 } else { 3471 } else {
3467 close(attachPosition(new HReturn(value), node)).addSuccessor(graph.exit); 3472 close(attachPosition(new HReturn(value), node)).addSuccessor(graph.exit);
3468 } 3473 }
3469 } 3474 }
3470 3475
3471 visitThrow(Throw node) { 3476 visitThrow(Throw node) {
3472 if (node.expression == null) { 3477 if (node.expression == null) {
(...skipping 1202 matching lines...) Expand 10 before | Expand all | Expand 10 after
4675 new HSubGraphBlockInformation(elseBranch.graph)); 4680 new HSubGraphBlockInformation(elseBranch.graph));
4676 4681
4677 HBasicBlock conditionStartBlock = conditionBranch.block; 4682 HBasicBlock conditionStartBlock = conditionBranch.block;
4678 conditionStartBlock.setBlockFlow(info, joinBlock); 4683 conditionStartBlock.setBlockFlow(info, joinBlock);
4679 SubGraph conditionGraph = conditionBranch.graph; 4684 SubGraph conditionGraph = conditionBranch.graph;
4680 HIf branch = conditionGraph.end.last; 4685 HIf branch = conditionGraph.end.last;
4681 assert(branch is HIf); 4686 assert(branch is HIf);
4682 branch.blockInformation = conditionStartBlock.blockFlow; 4687 branch.blockInformation = conditionStartBlock.blockFlow;
4683 } 4688 }
4684 } 4689 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698