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

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

Issue 2661803002: Issue 28491. Add support for UnlinkedExprOperation.pushSuper even though it is not allowed. (Closed)
Patch Set: Created 3 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
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 serialization.summarize_const_expr; 5 library serialization.summarize_const_expr;
6 6
7 import 'package:analyzer/dart/ast/ast.dart'; 7 import 'package:analyzer/dart/ast/ast.dart';
8 import 'package:analyzer/dart/ast/token.dart'; 8 import 'package:analyzer/dart/ast/token.dart';
9 import 'package:analyzer/dart/element/type.dart' show DartType; 9 import 'package:analyzer/dart/element/type.dart' show DartType;
10 import 'package:analyzer/src/summary/format.dart'; 10 import 'package:analyzer/src/summary/format.dart';
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 } else if (expr is AsExpression) { 381 } else if (expr is AsExpression) {
382 isValidConst = false; 382 isValidConst = false;
383 _serialize(expr.expression); 383 _serialize(expr.expression);
384 references.add(serializeTypeName(expr.type)); 384 references.add(serializeTypeName(expr.type));
385 operations.add(UnlinkedExprOperation.typeCast); 385 operations.add(UnlinkedExprOperation.typeCast);
386 } else if (expr is IsExpression) { 386 } else if (expr is IsExpression) {
387 isValidConst = false; 387 isValidConst = false;
388 _serialize(expr.expression); 388 _serialize(expr.expression);
389 references.add(serializeTypeName(expr.type)); 389 references.add(serializeTypeName(expr.type));
390 operations.add(UnlinkedExprOperation.typeCheck); 390 operations.add(UnlinkedExprOperation.typeCheck);
391 } else if (expr is SuperExpression) {
392 operations.add(UnlinkedExprOperation.pushSuper);
391 } else if (expr is ThisExpression) { 393 } else if (expr is ThisExpression) {
392 operations.add(UnlinkedExprOperation.pushThis); 394 operations.add(UnlinkedExprOperation.pushThis);
393 } else if (expr is ThrowExpression) { 395 } else if (expr is ThrowExpression) {
394 isValidConst = false; 396 isValidConst = false;
395 _serialize(expr.expression); 397 _serialize(expr.expression);
396 operations.add(UnlinkedExprOperation.throwException); 398 operations.add(UnlinkedExprOperation.throwException);
397 } else if (expr is AwaitExpression) { 399 } else if (expr is AwaitExpression) {
398 isValidConst = false; 400 isValidConst = false;
399 _serialize(expr.expression); 401 _serialize(expr.expression);
400 operations.add(UnlinkedExprOperation.await); 402 operations.add(UnlinkedExprOperation.await);
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
662 if (typeArguments == null) { 664 if (typeArguments == null) {
663 ints.add(0); 665 ints.add(0);
664 } else { 666 } else {
665 ints.add(typeArguments.arguments.length); 667 ints.add(typeArguments.arguments.length);
666 for (TypeAnnotation type in typeArguments.arguments) { 668 for (TypeAnnotation type in typeArguments.arguments) {
667 references.add(serializeTypeName(type)); 669 references.add(serializeTypeName(type));
668 } 670 }
669 } 671 }
670 } 672 }
671 } 673 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698