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

Side by Side Diff: pkg/compiler/lib/src/closure.dart

Issue 1935933002: Fix source information positions for deserialized patched elements. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Fixes Created 4 years, 7 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
« no previous file with comments | « no previous file | pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.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 'common.dart'; 7 import 'common.dart';
8 import 'common/names.dart' show Identifiers; 8 import 'common/names.dart' show Identifiers;
9 import 'common/resolution.dart' show ParsingContext, Resolution; 9 import 'common/resolution.dart' show ParsingContext, Resolution;
10 import 'common/tasks.dart' show CompilerTask; 10 import 'common/tasks.dart' show CompilerTask;
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 bool get hasNode => false; 124 bool get hasNode => false;
125 125
126 Node get node { 126 Node get node {
127 throw new SpannableAssertionFailure( 127 throw new SpannableAssertionFailure(
128 local, 'Should not access node of ClosureFieldElement.'); 128 local, 'Should not access node of ClosureFieldElement.');
129 } 129 }
130 130
131 bool get hasResolvedAst => hasTreeElements; 131 bool get hasResolvedAst => hasTreeElements;
132 132
133 ResolvedAst get resolvedAst { 133 ResolvedAst get resolvedAst {
134 return new ParsedResolvedAst(this, null, null, treeElements); 134 return new ParsedResolvedAst(this, null, null, treeElements,
135 memberContext.compilationUnit.script.resourceUri);
135 } 136 }
136 137
137 Expression get initializer { 138 Expression get initializer {
138 throw new SpannableAssertionFailure( 139 throw new SpannableAssertionFailure(
139 local, 'Should not access initializer of ClosureFieldElement.'); 140 local, 'Should not access initializer of ClosureFieldElement.');
140 } 141 }
141 142
142 bool get isInstanceMember => true; 143 bool get isInstanceMember => true;
143 bool get isAssignable => false; 144 bool get isAssignable => false;
144 145
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 return closureClass.methodElement.memberContext; 342 return closureClass.methodElement.memberContext;
342 } 343 }
343 344
344 bool get hasNode => node != null; 345 bool get hasNode => node != null;
345 346
346 FunctionExpression parseNode(ParsingContext parsing) => node; 347 FunctionExpression parseNode(ParsingContext parsing) => node;
347 348
348 Element get analyzableElement => closureClass.methodElement.analyzableElement; 349 Element get analyzableElement => closureClass.methodElement.analyzableElement;
349 350
350 ResolvedAst get resolvedAst { 351 ResolvedAst get resolvedAst {
351 return new ParsedResolvedAst(this, node, node.body, treeElements); 352 return new ParsedResolvedAst(this, node, node.body, treeElements,
353 expression.compilationUnit.script.resourceUri);
352 } 354 }
353 355
354 accept(ElementVisitor visitor, arg) { 356 accept(ElementVisitor visitor, arg) {
355 return visitor.visitMethodElement(this, arg); 357 return visitor.visitMethodElement(this, arg);
356 } 358 }
357 } 359 }
358 360
359 // The box-element for a scope, and the captured variables that need to be 361 // The box-element for a scope, and the captured variables that need to be
360 // stored in the box. 362 // stored in the box.
361 class ClosureScope { 363 class ClosureScope {
(...skipping 805 matching lines...) Expand 10 before | Expand all | Expand 10 after
1167 /// 1169 ///
1168 /// Move the below classes to a JS model eventually. 1170 /// Move the below classes to a JS model eventually.
1169 /// 1171 ///
1170 abstract class JSEntity implements Entity { 1172 abstract class JSEntity implements Entity {
1171 Entity get declaredEntity; 1173 Entity get declaredEntity;
1172 } 1174 }
1173 1175
1174 abstract class PrivatelyNamedJSEntity implements JSEntity { 1176 abstract class PrivatelyNamedJSEntity implements JSEntity {
1175 Entity get rootOfScope; 1177 Entity get rootOfScope;
1176 } 1178 }
OLDNEW
« no previous file with comments | « no previous file | pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698