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

Side by Side Diff: pkg/compiler/lib/src/resolution/send_structure.dart

Issue 2103833002: Fix serialization of IndexSetIfNullStructure. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 5 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 | tests/compiler/dart2js/serialization/test_data.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 dart2js.resolution.send_structure; 5 library dart2js.resolution.send_structure;
6 6
7 import '../common.dart'; 7 import '../common.dart';
8 import '../constants/expressions.dart'; 8 import '../constants/expressions.dart';
9 import '../dart_types.dart'; 9 import '../dart_types.dart';
10 import '../elements/elements.dart'; 10 import '../elements/elements.dart';
(...skipping 1486 matching lines...) Expand 10 before | Expand all | Expand 10 after
1497 1497
1498 /// The structure for a [Send] that is a if-null assignment on the index 1498 /// The structure for a [Send] that is a if-null assignment on the index
1499 /// operator. For instance `a[b] ??= c`. 1499 /// operator. For instance `a[b] ??= c`.
1500 class IndexSetIfNullStructure<R, A> implements SendStructure<R, A> { 1500 class IndexSetIfNullStructure<R, A> implements SendStructure<R, A> {
1501 /// The target of the index operations. 1501 /// The target of the index operations.
1502 final AccessSemantics semantics; 1502 final AccessSemantics semantics;
1503 1503
1504 IndexSetIfNullStructure(this.semantics); 1504 IndexSetIfNullStructure(this.semantics);
1505 1505
1506 @override 1506 @override
1507 SendStructureKind get kind => SendStructureKind.INDEX_SET; 1507 SendStructureKind get kind => SendStructureKind.INDEX_SET_IF_NULL;
1508 1508
1509 R dispatch(SemanticSendVisitor<R, A> visitor, Send node, A arg) { 1509 R dispatch(SemanticSendVisitor<R, A> visitor, Send node, A arg) {
1510 switch (semantics.kind) { 1510 switch (semantics.kind) {
1511 case AccessKind.EXPRESSION: 1511 case AccessKind.EXPRESSION:
1512 return visitor.visitIndexSetIfNull(node, node.receiver, 1512 return visitor.visitIndexSetIfNull(node, node.receiver,
1513 node.arguments.first, node.arguments.tail.head, arg); 1513 node.arguments.first, node.arguments.tail.head, arg);
1514 case AccessKind.UNRESOLVED_SUPER: 1514 case AccessKind.UNRESOLVED_SUPER:
1515 return visitor.visitUnresolvedSuperIndexSetIfNull( 1515 return visitor.visitUnresolvedSuperIndexSetIfNull(
1516 node, 1516 node,
1517 semantics.element, 1517 semantics.element,
(...skipping 992 matching lines...) Expand 10 before | Expand all | Expand 10 after
2510 ThisConstructorInvokeStructure( 2510 ThisConstructorInvokeStructure(
2511 this.node, this.constructor, this.callStructure); 2511 this.node, this.constructor, this.callStructure);
2512 2512
2513 R dispatch(SemanticDeclarationVisitor<R, A> visitor, A arg) { 2513 R dispatch(SemanticDeclarationVisitor<R, A> visitor, A arg) {
2514 return visitor.visitThisConstructorInvoke( 2514 return visitor.visitThisConstructorInvoke(
2515 node, constructor, node.argumentsNode, callStructure, arg); 2515 node, constructor, node.argumentsNode, callStructure, arg);
2516 } 2516 }
2517 2517
2518 bool get isConstructorInvoke => true; 2518 bool get isConstructorInvoke => true;
2519 } 2519 }
OLDNEW
« no previous file with comments | « no previous file | tests/compiler/dart2js/serialization/test_data.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698