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

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

Issue 34963002: Fix another closure/type variable error by using analyzeTypeVariables. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 1 month 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 | sdk/lib/_internal/compiler/implementation/ssa/builder.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 "dart2jslib.dart"; 8 import "dart2jslib.dart";
9 import "dart_types.dart"; 9 import "dart_types.dart";
10 import "scanner/scannerlib.dart" show Token; 10 import "scanner/scannerlib.dart" show Token;
(...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after
548 && !compiler.enableUserAssertions) { 548 && !compiler.enableUserAssertions) {
549 return; 549 return;
550 } 550 }
551 node.visitChildren(this); 551 node.visitChildren(this);
552 } 552 }
553 553
554 visitSendSet(SendSet node) { 554 visitSendSet(SendSet node) {
555 Element element = elements[node]; 555 Element element = elements[node];
556 if (Elements.isLocal(element)) { 556 if (Elements.isLocal(element)) {
557 mutatedVariables.add(element); 557 mutatedVariables.add(element);
558 } 558 if (compiler.enableTypeAssertions) {
559 if (Elements.isLocal(element) && 559 analyzeTypeVariables(element.computeType(compiler));
560 element.computeType(compiler).containsTypeVariables) { 560 }
561 registerNeedsThis();
562 } 561 }
563 super.visitSendSet(node); 562 super.visitSendSet(node);
564 } 563 }
565 564
566 visitNewExpression(NewExpression node) { 565 visitNewExpression(NewExpression node) {
567 DartType type = elements.getType(node); 566 DartType type = elements.getType(node);
568 analyzeType(type); 567 analyzeType(type);
569 node.visitChildren(this); 568 node.visitChildren(this);
570 } 569 }
571 570
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
828 } 827 }
829 828
830 visitTryStatement(TryStatement node) { 829 visitTryStatement(TryStatement node) {
831 // TODO(ngeoffray): implement finer grain state. 830 // TODO(ngeoffray): implement finer grain state.
832 bool oldInTryStatement = inTryStatement; 831 bool oldInTryStatement = inTryStatement;
833 inTryStatement = true; 832 inTryStatement = true;
834 node.visitChildren(this); 833 node.visitChildren(this);
835 inTryStatement = oldInTryStatement; 834 inTryStatement = oldInTryStatement;
836 } 835 }
837 } 836 }
OLDNEW
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/ssa/builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698