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

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

Issue 150693005: Fix ParameterMirror.hasDefaultValue/defaultValue in source mirrors. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix handling of external parameters Created 6 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 unified diff | Download patch | Annotate | Revision Log
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 part of resolution; 5 part of resolution;
6 6
7 abstract class TreeElements { 7 abstract class TreeElements {
8 Element get currentElement; 8 Element get currentElement;
9 Setlet<Node> get superUses; 9 Setlet<Node> get superUses;
10 10
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 redirection = redirection.patch; 319 redirection = redirection.patch;
320 } 320 }
321 redirection = resolver.visitor.resolveConstructorRedirection(redirection); 321 redirection = resolver.visitor.resolveConstructorRedirection(redirection);
322 } 322 }
323 } 323 }
324 324
325 void checkMatchingPatchParameters(FunctionElement origin, 325 void checkMatchingPatchParameters(FunctionElement origin,
326 Link<Element> originParameters, 326 Link<Element> originParameters,
327 Link<Element> patchParameters) { 327 Link<Element> patchParameters) {
328 while (!originParameters.isEmpty) { 328 while (!originParameters.isEmpty) {
329 Element originParameter = originParameters.head; 329 VariableElementX originParameter = originParameters.head;
330 Element patchParameter = patchParameters.head; 330 VariableElementX patchParameter = patchParameters.head;
331 assert(invariant(originParameter, originParameter.origin == null));
332 assert(invariant(originParameter, originParameter.patch == null));
333 originParameter.patch = patchParameter;
334 assert(invariant(patchParameter, patchParameter.origin == null));
335 assert(invariant(patchParameter, patchParameter.patch == null));
336 patchParameter.origin = originParameter;
331 // Hack: Use unparser to test parameter equality. This only works because 337 // Hack: Use unparser to test parameter equality. This only works because
332 // we are restricting patch uses and the approach cannot be used 338 // we are restricting patch uses and the approach cannot be used
333 // elsewhere. 339 // elsewhere.
334 String originParameterText = 340 String originParameterText =
335 originParameter.parseNode(compiler).toString(); 341 originParameter.parseNode(compiler).toString();
336 String patchParameterText = 342 String patchParameterText =
337 patchParameter.parseNode(compiler).toString(); 343 patchParameter.parseNode(compiler).toString();
338 if (originParameterText != patchParameterText 344 if (originParameterText != patchParameterText
339 // We special case the list constructor because of the 345 // We special case the list constructor because of the
340 // optional parameter. 346 // optional parameter.
(...skipping 4164 matching lines...) Expand 10 before | Expand all | Expand 10 after
4505 return finishConstructorReference(visit(expression), 4511 return finishConstructorReference(visit(expression),
4506 expression, expression); 4512 expression, expression);
4507 } 4513 }
4508 } 4514 }
4509 4515
4510 /// Looks up [name] in [scope] and unwraps the result. 4516 /// Looks up [name] in [scope] and unwraps the result.
4511 Element lookupInScope(Compiler compiler, Node node, 4517 Element lookupInScope(Compiler compiler, Node node,
4512 Scope scope, String name) { 4518 Scope scope, String name) {
4513 return Elements.unwrap(scope.lookup(name), compiler, node); 4519 return Elements.unwrap(scope.lookup(name), compiler, node);
4514 } 4520 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/mirrors/source_mirrors.dart ('k') | tests/compiler/dart2js/memory_compiler.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698