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

Side by Side Diff: pkg/fletchc/lib/src/fletch_constants.dart

Issue 1659163007: Rename fletch -> dartino (Closed) Base URL: https://github.com/dartino/sdk.git@master
Patch Set: address comments Created 4 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
(Empty)
1 // Copyright (c) 2015, the Dartino project authors. Please see the AUTHORS file
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.md file.
4
5 library fletchc.fletch_constants;
6
7 import 'package:compiler/src/constants/values.dart' show
8 ConstantValue;
9
10 import 'package:compiler/src/core_types.dart' show
11 CoreTypes;
12
13 import 'package:compiler/src/dart_types.dart' show
14 DartType,
15 DynamicType;
16
17 class FletchFunctionConstant extends ConstantValue {
18 final int functionId;
19
20 FletchFunctionConstant(this.functionId);
21
22 DartType getType(CoreTypes types) => const DynamicType();
23
24 List<ConstantValue> getDependencies() => const <ConstantValue>[];
25
26 accept(visitor, arg) {
27 throw new UnsupportedError("FletchFunctionConstant.accept");
28 }
29
30 String unparse() => toStructuredString();
31
32 String toStructuredString() {
33 return 'FletchFunctionConstant($functionId)';
34 }
35 }
36
37 class FletchClassConstant extends ConstantValue {
38 final int classId;
39
40 FletchClassConstant(this.classId);
41
42 DartType getType(CoreTypes types) => const DynamicType();
43
44 List<ConstantValue> getDependencies() => const <ConstantValue>[];
45
46 accept(visitor, arg) {
47 throw new UnsupportedError("FletchClassConstant.accept");
48 }
49
50 String unparse() => toStructuredString();
51
52 String toStructuredString() {
53 return 'FletchClassConstant($classId)';
54 }
55 }
56
57 class FletchClassInstanceConstant extends ConstantValue {
58 final int classId;
59
60 FletchClassInstanceConstant(this.classId);
61
62 DartType getType(CoreTypes types) => const DynamicType();
63
64 List<ConstantValue> getDependencies() => const <ConstantValue>[];
65
66 accept(visitor, arg) {
67 throw new UnsupportedError("FletchClassInstanceConstant.accept");
68 }
69
70 String unparse() => toStructuredString();
71
72 String toStructuredString() {
73 return 'FletchClassInstanceConstant($classId)';
74 }
75
76 bool operator==(other) {
77 return other is FletchClassInstanceConstant && other.classId == classId;
78 }
79
80 int get hashCode => classId;
81 }
OLDNEW
« no previous file with comments | « pkg/fletchc/lib/src/fletch_compiler_implementation.dart ('k') | pkg/fletchc/lib/src/fletch_context.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698