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

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

Issue 12390010: Make sure field initializers have access to the type variables. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 10 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 | sdk/lib/collection/splay_tree.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/compiler/implementation/ssa/builder.dart
===================================================================
--- sdk/lib/_internal/compiler/implementation/ssa/builder.dart (revision 19209)
+++ sdk/lib/_internal/compiler/implementation/ssa/builder.dart (working copy)
@@ -1124,6 +1124,7 @@
}
inlinedFrom(Element element, f()) {
+ assert(element is FunctionElement || element is VariableElement);
return compiler.withCurrentElement(element, () {
sourceElementStack.add(element);
var result = f();
@@ -1163,10 +1164,10 @@
element: constructor);
}
- sourceElementStack.add(constructor.enclosingElement);
- buildFieldInitializers(constructor.enclosingElement.implementation,
- fieldValues);
- sourceElementStack.removeLast();
+ inlinedFrom(constructor, () {
+ buildFieldInitializers(constructor.enclosingElement.implementation,
+ fieldValues);
+ });
int index = 0;
FunctionSignature params = constructor.computeSignature(compiler);
@@ -1252,9 +1253,9 @@
SendSet init = link.head;
Link<Node> arguments = init.arguments;
assert(!arguments.isEmpty && arguments.tail.isEmpty);
- sourceElementStack.add(constructor);
- visit(arguments.head);
- sourceElementStack.removeLast();
+ inlinedFrom(constructor, () {
+ visit(arguments.head);
+ });
fieldValues[elements[init]] = pop();
}
}
« no previous file with comments | « no previous file | sdk/lib/collection/splay_tree.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698