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

Side by Side Diff: lib/compiler/implementation/closure.dart

Issue 11151015: Landing Peter's fix for function-typed field initializer arguments. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update status file. Created 8 years, 2 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
« no previous file with comments | « no previous file | tests/language/function_type_parameter_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #library("closureToClassMapper"); 5 #library("closureToClassMapper");
6 6
7 #import("elements/elements.dart"); 7 #import("elements/elements.dart");
8 #import("leg.dart"); 8 #import("leg.dart");
9 #import("scanner/scannerlib.dart"); 9 #import("scanner/scannerlib.dart");
10 #import("tree/tree.dart"); 10 #import("tree/tree.dart");
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 for (Link<Node> link = node.definitions.nodes; 305 for (Link<Node> link = node.definitions.nodes;
306 !link.isEmpty(); 306 !link.isEmpty();
307 link = link.tail) { 307 link = link.tail) {
308 Node definition = link.head; 308 Node definition = link.head;
309 Element element = elements[definition]; 309 Element element = elements[definition];
310 assert(element !== null); 310 assert(element !== null);
311 declareLocal(element); 311 declareLocal(element);
312 // We still need to visit the right-hand sides of the init-assignments. 312 // We still need to visit the right-hand sides of the init-assignments.
313 // For SendSets don't visit the left again. Otherwise it would be marked 313 // For SendSets don't visit the left again. Otherwise it would be marked
314 // as mutated. 314 // as mutated.
315 if (definition is SendSet) { 315 if (definition is Send) {
316 SendSet assignment = definition; 316 Send assignment = definition;
317 visit(assignment.argumentsNode); 317 Node arguments = assignment.argumentsNode;
318 if (arguments != null) {
319 visit(arguments);
320 }
318 } else { 321 } else {
319 visit(definition); 322 visit(definition);
320 } 323 }
321 } 324 }
322 } 325 }
323 326
324 visitIdentifier(Identifier node) { 327 visitIdentifier(Identifier node) {
325 if (node.isThis()) { 328 if (node.isThis()) {
326 useLocal(closureData.thisElement); 329 useLocal(closureData.thisElement);
327 } 330 }
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
622 } 625 }
623 626
624 visitTryStatement(TryStatement node) { 627 visitTryStatement(TryStatement node) {
625 // TODO(ngeoffray): implement finer grain state. 628 // TODO(ngeoffray): implement finer grain state.
626 bool oldInTryStatement = inTryStatement; 629 bool oldInTryStatement = inTryStatement;
627 inTryStatement = true; 630 inTryStatement = true;
628 node.visitChildren(this); 631 node.visitChildren(this);
629 inTryStatement = oldInTryStatement; 632 inTryStatement = oldInTryStatement;
630 } 633 }
631 } 634 }
OLDNEW
« no previous file with comments | « no previous file | tests/language/function_type_parameter_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698