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

Unified Diff: pkg/compiler/lib/src/ssa/builder.dart

Issue 1066303002: Fix order of parameters in intercepted generative constructor body. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/ssa/builder.dart
diff --git a/pkg/compiler/lib/src/ssa/builder.dart b/pkg/compiler/lib/src/ssa/builder.dart
index a3c8830caae00180b69b0f959743748fa54553b7..865683a36b2a5bbb3375da888f1de55d76ab6253 100644
--- a/pkg/compiler/lib/src/ssa/builder.dart
+++ b/pkg/compiler/lib/src/ssa/builder.dart
@@ -89,6 +89,8 @@ class SyntheticLocal extends Local {
final ExecutableElement executableContext;
SyntheticLocal(this.name, this.executableContext);
+
+ toString() => 'SyntheticLocal($name)';
Siggi Cherem (dart-lang) 2015/04/08 17:52:42 I assume this was just for debugging?
sra1 2015/04/09 04:37:09 Yes.
}
class SsaBuilderTask extends CompilerTask {
@@ -388,9 +390,12 @@ class LocalsHandler {
SyntheticLocal parameter = new SyntheticLocal(name, executableContext);
HParameterValue value =
new HParameterValue(parameter, builder.getTypeOfThis());
+ builder.graph.entry.addAfter(directLocals[closureData.thisLocal], value);
Siggi Cherem (dart-lang) 2015/04/08 17:52:42 any reason to move these above the explicitReceive
sra1 2015/04/09 04:37:09 No reason. I'll put them back in the original orde
+ if (builder.lastAddedParameter == null) {
+ // If this is the first parameter inserted, make sure it stays first.
+ builder.lastAddedParameter = value;
+ }
builder.graph.explicitReceiverParameter = value;
- builder.graph.entry.addAfter(
- directLocals[closureData.thisLocal], value);
if (isInterceptorClass) {
// Only use the extra parameter in intercepted classes.
directLocals[closureData.thisLocal] = value;
« 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