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

Side by Side Diff: pkg/analyzer/lib/src/summary/resynthesize.dart

Issue 1533563003: Fix resynthesis of operator[]= from summary. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years 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/analyzer/test/src/summary/resynthesize_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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 summary_resynthesizer; 5 library summary_resynthesizer;
6 6
7 import 'package:analyzer/analyzer.dart'; 7 import 'package:analyzer/analyzer.dart';
8 import 'package:analyzer/src/generated/element.dart'; 8 import 'package:analyzer/src/generated/element.dart';
9 import 'package:analyzer/src/generated/element_handle.dart'; 9 import 'package:analyzer/src/generated/element_handle.dart';
10 import 'package:analyzer/src/generated/engine.dart'; 10 import 'package:analyzer/src/generated/engine.dart';
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after
385 /** 385 /**
386 * Resynthesize an [ExecutableElement] and place it in the given [holder]. 386 * Resynthesize an [ExecutableElement] and place it in the given [holder].
387 */ 387 */
388 void buildExecutable(UnlinkedExecutable serializedExecutable, 388 void buildExecutable(UnlinkedExecutable serializedExecutable,
389 [ElementHolder holder]) { 389 [ElementHolder holder]) {
390 bool isTopLevel = holder == null; 390 bool isTopLevel = holder == null;
391 if (holder == null) { 391 if (holder == null) {
392 holder = unitHolder; 392 holder = unitHolder;
393 } 393 }
394 String name = serializedExecutable.name; 394 String name = serializedExecutable.name;
395 if (name.endsWith('=')) { 395 if (name.endsWith('=') && name != '[]=') {
396 name = name.substring(0, name.length - 1); 396 name = name.substring(0, name.length - 1);
397 } 397 }
398 UnlinkedExecutableKind kind = serializedExecutable.kind; 398 UnlinkedExecutableKind kind = serializedExecutable.kind;
399 switch (kind) { 399 switch (kind) {
400 case UnlinkedExecutableKind.functionOrMethod: 400 case UnlinkedExecutableKind.functionOrMethod:
401 if (isTopLevel) { 401 if (isTopLevel) {
402 FunctionElementImpl executableElement = 402 FunctionElementImpl executableElement =
403 new FunctionElementImpl(name, -1); 403 new FunctionElementImpl(name, -1);
404 buildExecutableCommonParts(executableElement, serializedExecutable); 404 buildExecutableCommonParts(executableElement, serializedExecutable);
405 holder.addFunction(executableElement); 405 holder.addFunction(executableElement);
(...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after
933 elementMap[cls.name] = cls; 933 elementMap[cls.name] = cls;
934 } 934 }
935 for (FunctionTypeAliasElement typeAlias in unit.functionTypeAliases) { 935 for (FunctionTypeAliasElement typeAlias in unit.functionTypeAliases) {
936 elementMap[typeAlias.name] = typeAlias; 936 elementMap[typeAlias.name] = typeAlias;
937 } 937 }
938 resummarizedElements[absoluteUri] = elementMap; 938 resummarizedElements[absoluteUri] = elementMap;
939 unitHolder = null; 939 unitHolder = null;
940 prelinkedUnit = null; 940 prelinkedUnit = null;
941 } 941 }
942 } 942 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/test/src/summary/resynthesize_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698