Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 'dart:collection'; | 7 import 'dart:collection'; |
| 8 | 8 |
| 9 import 'package:analyzer/dart/ast/ast.dart'; | 9 import 'package:analyzer/dart/ast/ast.dart'; |
| 10 import 'package:analyzer/dart/ast/token.dart'; | 10 import 'package:analyzer/dart/ast/token.dart'; |
| (...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 452 case UnlinkedConstOperation.assignToRef: | 452 case UnlinkedConstOperation.assignToRef: |
| 453 case UnlinkedConstOperation.assignToProperty: | 453 case UnlinkedConstOperation.assignToProperty: |
| 454 case UnlinkedConstOperation.assignToIndex: | 454 case UnlinkedConstOperation.assignToIndex: |
| 455 case UnlinkedConstOperation.extractIndex: | 455 case UnlinkedConstOperation.extractIndex: |
| 456 case UnlinkedConstOperation.invokeMethod: | 456 case UnlinkedConstOperation.invokeMethod: |
| 457 case UnlinkedConstOperation.cascadeSectionBegin: | 457 case UnlinkedConstOperation.cascadeSectionBegin: |
| 458 case UnlinkedConstOperation.cascadeSectionEnd: | 458 case UnlinkedConstOperation.cascadeSectionEnd: |
| 459 case UnlinkedConstOperation.typeCast: | 459 case UnlinkedConstOperation.typeCast: |
| 460 case UnlinkedConstOperation.typeCheck: | 460 case UnlinkedConstOperation.typeCheck: |
| 461 case UnlinkedConstOperation.throwException: | 461 case UnlinkedConstOperation.throwException: |
| 462 throw new UnimplementedError('$operation'); | 462 _push(AstFactory.identifier3(r'$notConst$')); |
|
Paul Berry
2016/05/03 19:33:41
This seems dangerous to me, since it breaks the tr
scheglov
2016/05/03 20:02:44
Done.
| |
| 463 break; | |
| 463 } | 464 } |
| 464 } | 465 } |
| 465 return stack.single; | 466 return stack.single; |
| 466 } | 467 } |
| 467 | 468 |
| 468 List<Expression> _buildArguments() { | 469 List<Expression> _buildArguments() { |
| 469 List<Expression> arguments; | 470 List<Expression> arguments; |
| 470 { | 471 { |
| 471 int numNamedArgs = uc.ints[intPtr++]; | 472 int numNamedArgs = uc.ints[intPtr++]; |
| 472 int numPositionalArgs = uc.ints[intPtr++]; | 473 int numPositionalArgs = uc.ints[intPtr++]; |
| (...skipping 2173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2646 static String _getElementIdentifier(String name, ReferenceKind kind) { | 2647 static String _getElementIdentifier(String name, ReferenceKind kind) { |
| 2647 if (kind == ReferenceKind.topLevelPropertyAccessor || | 2648 if (kind == ReferenceKind.topLevelPropertyAccessor || |
| 2648 kind == ReferenceKind.propertyAccessor) { | 2649 kind == ReferenceKind.propertyAccessor) { |
| 2649 if (!name.endsWith('=')) { | 2650 if (!name.endsWith('=')) { |
| 2650 return name + '?'; | 2651 return name + '?'; |
| 2651 } | 2652 } |
| 2652 } | 2653 } |
| 2653 return name; | 2654 return name; |
| 2654 } | 2655 } |
| 2655 } | 2656 } |
| OLD | NEW |