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

Side by Side Diff: pkg/compiler/lib/src/constants/values.dart

Issue 2070493003: Revert "Remove Registry from registerMetadataConstant" and "Serialize metadata" (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 6 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 | « pkg/compiler/lib/src/compiler.dart ('k') | pkg/compiler/lib/src/cps_ir/cps_ir_nodes_sexpr.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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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.constants.values; 5 library dart2js.constants.values;
6 6
7 import '../common.dart'; 7 import '../common.dart';
8 import '../core_types.dart'; 8 import '../core_types.dart';
9 import '../dart_types.dart'; 9 import '../dart_types.dart';
10 import '../elements/elements.dart' 10 import '../elements/elements.dart'
(...skipping 10 matching lines...) Expand all
21 R visitDouble(DoubleConstantValue constant, A arg); 21 R visitDouble(DoubleConstantValue constant, A arg);
22 R visitBool(BoolConstantValue constant, A arg); 22 R visitBool(BoolConstantValue constant, A arg);
23 R visitString(StringConstantValue constant, A arg); 23 R visitString(StringConstantValue constant, A arg);
24 R visitList(ListConstantValue constant, A arg); 24 R visitList(ListConstantValue constant, A arg);
25 R visitMap(MapConstantValue constant, A arg); 25 R visitMap(MapConstantValue constant, A arg);
26 R visitConstructed(ConstructedConstantValue constant, A arg); 26 R visitConstructed(ConstructedConstantValue constant, A arg);
27 R visitType(TypeConstantValue constant, A arg); 27 R visitType(TypeConstantValue constant, A arg);
28 R visitInterceptor(InterceptorConstantValue constant, A arg); 28 R visitInterceptor(InterceptorConstantValue constant, A arg);
29 R visitSynthetic(SyntheticConstantValue constant, A arg); 29 R visitSynthetic(SyntheticConstantValue constant, A arg);
30 R visitDeferred(DeferredConstantValue constant, A arg); 30 R visitDeferred(DeferredConstantValue constant, A arg);
31 R visitNonConstant(NonConstantValue constant, A arg);
32 } 31 }
33 32
34 abstract class ConstantValue { 33 abstract class ConstantValue {
35 const ConstantValue(); 34 const ConstantValue();
36 35
37 /// `true` if this is a valid constant value. 36 /// `true` if this is a valid constant value.
38 bool get isConstant => true; 37 bool get isConstant => true;
39 38
40 bool get isNull => false; 39 bool get isNull => false;
41 bool get isBool => false; 40 bool get isBool => false;
(...skipping 714 matching lines...) Expand 10 before | Expand all | Expand 10 after
756 } 755 }
757 756
758 /// A constant value resulting from a non constant or erroneous constant 757 /// A constant value resulting from a non constant or erroneous constant
759 /// expression. 758 /// expression.
760 // TODO(johnniwinther): Expand this to contain the error kind. 759 // TODO(johnniwinther): Expand this to contain the error kind.
761 class NonConstantValue extends ConstantValue { 760 class NonConstantValue extends ConstantValue {
762 bool get isConstant => false; 761 bool get isConstant => false;
763 762
764 @override 763 @override
765 accept(ConstantValueVisitor visitor, arg) { 764 accept(ConstantValueVisitor visitor, arg) {
766 return visitor.visitNonConstant(this, arg); 765 // TODO(johnniwinther): Should this be part of the visiting?
767 } 766 }
768 767
769 @override 768 @override
770 List<ConstantValue> getDependencies() => const <ConstantValue>[]; 769 List<ConstantValue> getDependencies() => const <ConstantValue>[];
771 770
772 @override 771 @override
773 DartType getType(CoreTypes types) => const DynamicType(); 772 DartType getType(CoreTypes types) => const DynamicType();
774 773
775 @override 774 @override
776 String toStructuredText() => 'NonConstant'; 775 String toStructuredText() => 'NonConstant';
777 776
778 @override 777 @override
779 String toDartText() => '>>non-constant<<'; 778 String toDartText() => '>>non-constant<<';
780 } 779 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/compiler.dart ('k') | pkg/compiler/lib/src/cps_ir/cps_ir_nodes_sexpr.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698