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

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

Issue 76223002: Fix http://code.google.com/p/dart/issues/detail?id=15017. (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/js_emitter/type_test_emitter.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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 } 85 }
86 86
87 Expression get cachedNode { 87 Expression get cachedNode {
88 throw new SpannableAssertionFailure( 88 throw new SpannableAssertionFailure(
89 variableElement, 89 variableElement,
90 'Should not access cachedNode of ClosureFieldElement.'); 90 'Should not access cachedNode of ClosureFieldElement.');
91 } 91 }
92 92
93 bool isInstanceMember() => true; 93 bool isInstanceMember() => true;
94 bool isAssignable() => false; 94 bool isAssignable() => false;
95 // The names of closure variables don't need renaming, since their use is very
96 // simple and they have 1-character names in the minified mode.
97 bool hasFixedBackendName() => true;
98 String fixedBackendName() => name;
99 95
100 DartType computeType(Compiler compiler) { 96 DartType computeType(Compiler compiler) {
101 return variableElement.computeType(compiler); 97 return variableElement.computeType(compiler);
102 } 98 }
103 99
104 String toString() => "ClosureFieldElement($name)"; 100 String toString() => "ClosureFieldElement($name)";
105 } 101 }
106 102
107 // TODO(ahe): These classes continuously cause problems. We need to 103 // TODO(ahe): These classes continuously cause problems. We need to
108 // move these classes to elements/modelx.dart or see if we can find a 104 // move these classes to elements/modelx.dart or see if we can find a
(...skipping 721 matching lines...) Expand 10 before | Expand all | Expand 10 after
830 } 826 }
831 827
832 visitTryStatement(TryStatement node) { 828 visitTryStatement(TryStatement node) {
833 // TODO(ngeoffray): implement finer grain state. 829 // TODO(ngeoffray): implement finer grain state.
834 bool oldInTryStatement = inTryStatement; 830 bool oldInTryStatement = inTryStatement;
835 inTryStatement = true; 831 inTryStatement = true;
836 node.visitChildren(this); 832 node.visitChildren(this);
837 inTryStatement = oldInTryStatement; 833 inTryStatement = oldInTryStatement;
838 } 834 }
839 } 835 }
OLDNEW
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/js_emitter/type_test_emitter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698