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

Side by Side Diff: lib/compiler/implementation/constants.dart

Issue 11052011: Fix some warnings. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 8 years, 2 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 | Annotate | Revision Log
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 abstract class ConstantVisitor<R> { 5 abstract class ConstantVisitor<R> {
6 R visitSentinel(SentinelConstant constant); 6 R visitSentinel(SentinelConstant constant);
7 R visitFunction(FunctionConstant constant); 7 R visitFunction(FunctionConstant constant);
8 R visitNull(NullConstant constant); 8 R visitNull(NullConstant constant);
9 R visitInt(IntConstant constant); 9 R visitInt(IntConstant constant);
10 R visitDouble(DoubleConstant constant); 10 R visitDouble(DoubleConstant constant);
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 static final SENTINEL = const SentinelConstant(); 52 static final SENTINEL = const SentinelConstant();
53 53
54 List<Constant> getDependencies() => const <Constant>[]; 54 List<Constant> getDependencies() => const <Constant>[];
55 55
56 // Just use a random value. 56 // Just use a random value.
57 int hashCode() => 24297418; 57 int hashCode() => 24297418;
58 58
59 bool isSentinel() => true; 59 bool isSentinel() => true;
60 60
61 accept(ConstantVisitor visitor) => visitor.visitSentinel(this); 61 accept(ConstantVisitor visitor) => visitor.visitSentinel(this);
62
63 DartType computeType(Compiler compiler) => compiler.types.dynamicType;
62 } 64 }
63 65
64 class FunctionConstant extends Constant { 66 class FunctionConstant extends Constant {
65 Element element; 67 Element element;
66 68
67 FunctionConstant(this.element); 69 FunctionConstant(this.element);
68 70
69 bool isFunction() => true; 71 bool isFunction() => true;
70 72
71 bool operator ==(var other) { 73 bool operator ==(var other) {
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
434 if (fields[i] != other.fields[i]) return false; 436 if (fields[i] != other.fields[i]) return false;
435 } 437 }
436 return true; 438 return true;
437 } 439 }
438 440
439 int hashCode() => _hashCode; 441 int hashCode() => _hashCode;
440 List<Constant> getDependencies() => fields; 442 List<Constant> getDependencies() => fields;
441 443
442 accept(ConstantVisitor visitor) => visitor.visitConstructed(this); 444 accept(ConstantVisitor visitor) => visitor.visitConstructed(this);
443 } 445 }
OLDNEW
« no previous file with comments | « lib/compiler/implementation/compiler.dart ('k') | lib/compiler/implementation/dart_backend/backend.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698