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

Side by Side Diff: pkg/compiler/lib/src/serialization/constant_serialization.dart

Issue 1873573004: Serialize TreeElements (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 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) 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.serialization.constants; 5 library dart2js.serialization.constants;
6 6
7 import '../constants/constructors.dart'; 7 import '../constants/constructors.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' show 10 import '../elements/elements.dart' show
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 } 104 }
105 105
106 @override 106 @override
107 void visitNull(NullConstantExpression exp, ObjectEncoder encoder) { 107 void visitNull(NullConstantExpression exp, ObjectEncoder encoder) {
108 // No additional data needed. 108 // No additional data needed.
109 } 109 }
110 110
111 @override 111 @override
112 void visitSymbol(SymbolConstantExpression exp, 112 void visitSymbol(SymbolConstantExpression exp,
113 ObjectEncoder encoder) { 113 ObjectEncoder encoder) {
114 throw new UnsupportedError( 114 encoder.setString(Key.NAME, exp.name);
115 "ConstantSerializer.visitSymbol: ${exp.getText()}");
116 } 115 }
117 116
118 @override 117 @override
119 void visitType(TypeConstantExpression exp, 118 void visitType(TypeConstantExpression exp,
120 ObjectEncoder encoder) { 119 ObjectEncoder encoder) {
121 encoder.setType(Key.TYPE, exp.type); 120 encoder.setType(Key.TYPE, exp.type);
122 } 121 }
123 122
124 @override 123 @override
125 void visitUnary(UnaryConstantExpression exp, 124 void visitUnary(UnaryConstantExpression exp,
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 case ConstantConstructorKind.REDIRECTING_GENERATIVE: 423 case ConstantConstructorKind.REDIRECTING_GENERATIVE:
425 return new RedirectingGenerativeConstantConstructor( 424 return new RedirectingGenerativeConstantConstructor(
426 readDefaults(), 425 readDefaults(),
427 readConstructorInvocation()); 426 readConstructorInvocation());
428 case ConstantConstructorKind.REDIRECTING_FACTORY: 427 case ConstantConstructorKind.REDIRECTING_FACTORY:
429 return new RedirectingFactoryConstantConstructor( 428 return new RedirectingFactoryConstantConstructor(
430 readConstructorInvocation()); 429 readConstructorInvocation());
431 } 430 }
432 } 431 }
433 } 432 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698