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

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

Issue 16042014: Implement operator== and hashCode for bound closures. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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 | 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 defaultValueTypes = 60 defaultValueTypes =
61 new OptionalParameterTypes(signature.optionalParameterCount); 61 new OptionalParameterTypes(signature.optionalParameterCount);
62 int index = 0; 62 int index = 0;
63 signature.forEachOptionalParameter((Element parameter) { 63 signature.forEachOptionalParameter((Element parameter) {
64 Constant defaultValue = builder.compileVariable(parameter); 64 Constant defaultValue = builder.compileVariable(parameter);
65 HType type = HGraph.mapConstantTypeToSsaType(defaultValue); 65 HType type = HGraph.mapConstantTypeToSsaType(defaultValue);
66 defaultValueTypes.update(index, parameter.name, type); 66 defaultValueTypes.update(index, parameter.name, type);
67 index++; 67 index++;
68 }); 68 });
69 } else { 69 } else {
70 // TODO(ahe): I have disabled type optimizations for 70 // BUG(10938): the types are stored in the wrong order.
71 // optional arguments as the types are stored in the wrong
72 // order. 71 // order.
73 HTypeList parameterTypes = 72 HTypeList parameterTypes =
74 backend.optimisticParameterTypes(element.declaration, 73 backend.optimisticParameterTypes(element.declaration,
75 defaultValueTypes); 74 defaultValueTypes);
76 if (!parameterTypes.allUnknown) { 75 if (!parameterTypes.allUnknown) {
77 int i = 0; 76 int i = 0;
78 signature.forEachParameter((Element param) { 77 signature.forEachParameter((Element param) {
79 builder.parameters[param].instructionType = parameterTypes[i++]; 78 builder.parameters[param].instructionType = parameterTypes[i++];
80 }); 79 });
81 } 80 }
(...skipping 5290 matching lines...) Expand 10 before | Expand all | Expand 10 after
5372 new HSubGraphBlockInformation(elseBranch.graph)); 5371 new HSubGraphBlockInformation(elseBranch.graph));
5373 5372
5374 HBasicBlock conditionStartBlock = conditionBranch.block; 5373 HBasicBlock conditionStartBlock = conditionBranch.block;
5375 conditionStartBlock.setBlockFlow(info, joinBlock); 5374 conditionStartBlock.setBlockFlow(info, joinBlock);
5376 SubGraph conditionGraph = conditionBranch.graph; 5375 SubGraph conditionGraph = conditionBranch.graph;
5377 HIf branch = conditionGraph.end.last; 5376 HIf branch = conditionGraph.end.last;
5378 assert(branch is HIf); 5377 assert(branch is HIf);
5379 branch.blockInformation = conditionStartBlock.blockFlow; 5378 branch.blockInformation = conditionStartBlock.blockFlow;
5380 } 5379 }
5381 } 5380 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/lib/js_helper.dart ('k') | tests/language/bound_closure_equality_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698