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

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

Issue 10826302: Fix bugs found in checked mode. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 4 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 | 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 class Interceptors { 5 class Interceptors {
6 Compiler compiler; 6 Compiler compiler;
7 Interceptors(Compiler this.compiler); 7 Interceptors(Compiler this.compiler);
8 8
9 SourceString mapOperatorToMethodName(Operator op) { 9 SourceString mapOperatorToMethodName(Operator op) {
10 String name = op.source.stringValue; 10 String name = op.source.stringValue;
(...skipping 1545 matching lines...) Expand 10 before | Expand all | Expand 10 after
1556 } 1556 }
1557 assert(nestedClosureData !== null); 1557 assert(nestedClosureData !== null);
1558 assert(nestedClosureData.closureClassElement !== null); 1558 assert(nestedClosureData.closureClassElement !== null);
1559 ClassElement closureClassElement = 1559 ClassElement closureClassElement =
1560 nestedClosureData.closureClassElement; 1560 nestedClosureData.closureClassElement;
1561 FunctionElement callElement = nestedClosureData.callElement; 1561 FunctionElement callElement = nestedClosureData.callElement;
1562 // TODO(ahe): This should be registered in codegen, not here. 1562 // TODO(ahe): This should be registered in codegen, not here.
1563 compiler.enqueuer.codegen.addToWorkList(callElement, elements); 1563 compiler.enqueuer.codegen.addToWorkList(callElement, elements);
1564 // TODO(ahe): This should be registered in codegen, not here. 1564 // TODO(ahe): This should be registered in codegen, not here.
1565 compiler.enqueuer.codegen.registerInstantiatedClass(closureClassElement); 1565 compiler.enqueuer.codegen.registerInstantiatedClass(closureClassElement);
1566 assert(closureClassElement.members.isEmpty()); 1566 assert(closureClassElement.localScope.isEmpty());
1567 1567
1568 List<HInstruction> capturedVariables = <HInstruction>[]; 1568 List<HInstruction> capturedVariables = <HInstruction>[];
1569 for (Element member in closureClassElement.backendMembers) { 1569 for (Element member in closureClassElement.backendMembers) {
1570 // The backendMembers also contains the call method(s). We are only 1570 // The backendMembers also contains the call method(s). We are only
1571 // interested in the fields. 1571 // interested in the fields.
1572 if (member.kind == ElementKind.FIELD) { 1572 if (member.kind == ElementKind.FIELD) {
1573 Element capturedLocal = nestedClosureData.capturedFieldMapping[member]; 1573 Element capturedLocal = nestedClosureData.capturedFieldMapping[member];
1574 assert(capturedLocal != null); 1574 assert(capturedLocal != null);
1575 capturedVariables.add(localsHandler.readLocal(capturedLocal)); 1575 capturedVariables.add(localsHandler.readLocal(capturedLocal));
1576 } 1576 }
(...skipping 2037 matching lines...) Expand 10 before | Expand all | Expand 10 after
3614 new HSubGraphBlockInformation(elseBranch.graph)); 3614 new HSubGraphBlockInformation(elseBranch.graph));
3615 3615
3616 HBasicBlock conditionStartBlock = conditionBranch.block; 3616 HBasicBlock conditionStartBlock = conditionBranch.block;
3617 conditionStartBlock.setBlockFlow(info, joinBlock); 3617 conditionStartBlock.setBlockFlow(info, joinBlock);
3618 SubGraph conditionGraph = conditionBranch.graph; 3618 SubGraph conditionGraph = conditionBranch.graph;
3619 HIf branch = conditionGraph.end.last; 3619 HIf branch = conditionGraph.end.last;
3620 assert(branch is HIf); 3620 assert(branch is HIf);
3621 branch.blockInformation = conditionStartBlock.blockFlow; 3621 branch.blockInformation = conditionStartBlock.blockFlow;
3622 } 3622 }
3623 } 3623 }
OLDNEW
« no previous file with comments | « lib/compiler/implementation/elements/elements.dart ('k') | lib/compiler/implementation/unparse_validator.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698