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

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

Issue 12528008: Implement CHA through type mask and TypedSelector in the simple type inferrer. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 9 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 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 4092 matching lines...) Expand 10 before | Expand all | Expand 10 after
4103 List<HInstruction> inputs = <HInstruction>[]; 4103 List<HInstruction> inputs = <HInstruction>[];
4104 for (Link<Node> link = node.entries.nodes; 4104 for (Link<Node> link = node.entries.nodes;
4105 !link.isEmpty; 4105 !link.isEmpty;
4106 link = link.tail) { 4106 link = link.tail) {
4107 visit(link.head); 4107 visit(link.head);
4108 inputs.add(pop()); 4108 inputs.add(pop());
4109 inputs.add(pop()); 4109 inputs.add(pop());
4110 } 4110 }
4111 HLiteralList keyValuePairs = new HLiteralList(inputs); 4111 HLiteralList keyValuePairs = new HLiteralList(inputs);
4112 add(keyValuePairs); 4112 add(keyValuePairs);
4113 DartType mapType = compiler.mapLiteralClass.computeType(compiler); 4113 HType mapType = new HType.nonNullSubtype(
4114 // TODO(ngeoffray): Use the actual implementation type of a map 4114 backend.mapLiteralClass.computeType(compiler), compiler);
4115 // literal. 4115 pushInvokeHelper1(backend.getMapMaker(), keyValuePairs, mapType);
4116 pushInvokeHelper1(backend.getMapMaker(), keyValuePairs,
4117 new HType.nonNullSubtype(mapType, compiler));
4118 } 4116 }
4119 4117
4120 visitLiteralMapEntry(LiteralMapEntry node) { 4118 visitLiteralMapEntry(LiteralMapEntry node) {
4121 visit(node.value); 4119 visit(node.value);
4122 visit(node.key); 4120 visit(node.key);
4123 } 4121 }
4124 4122
4125 visitNamedArgument(NamedArgument node) { 4123 visitNamedArgument(NamedArgument node) {
4126 visit(node.expression); 4124 visit(node.expression);
4127 } 4125 }
(...skipping 970 matching lines...) Expand 10 before | Expand all | Expand 10 after
5098 new HSubGraphBlockInformation(elseBranch.graph)); 5096 new HSubGraphBlockInformation(elseBranch.graph));
5099 5097
5100 HBasicBlock conditionStartBlock = conditionBranch.block; 5098 HBasicBlock conditionStartBlock = conditionBranch.block;
5101 conditionStartBlock.setBlockFlow(info, joinBlock); 5099 conditionStartBlock.setBlockFlow(info, joinBlock);
5102 SubGraph conditionGraph = conditionBranch.graph; 5100 SubGraph conditionGraph = conditionBranch.graph;
5103 HIf branch = conditionGraph.end.last; 5101 HIf branch = conditionGraph.end.last;
5104 assert(branch is HIf); 5102 assert(branch is HIf);
5105 branch.blockInformation = conditionStartBlock.blockFlow; 5103 branch.blockInformation = conditionStartBlock.blockFlow;
5106 } 5104 }
5107 } 5105 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698