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

Side by Side Diff: pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart

Issue 761073002: Remove the hashCode function from CPS nodes. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years 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
« no previous file with comments | « no previous file | no next file » | 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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 // IrNodes are kept in a separate library to have precise control over their 5 // IrNodes are kept in a separate library to have precise control over their
6 // dependencies on other parts of the system. 6 // dependencies on other parts of the system.
7 library dart2js.ir_nodes; 7 library dart2js.ir_nodes;
8 8
9 import '../constants/expressions.dart'; 9 import '../constants/expressions.dart';
10 import '../constants/values.dart' as values show ConstantValue; 10 import '../constants/values.dart' as values show ConstantValue;
11 import '../dart2jslib.dart' as dart2js show invariant; 11 import '../dart2jslib.dart' as dart2js show invariant;
12 import '../elements/elements.dart'; 12 import '../elements/elements.dart';
13 import '../universe/universe.dart' show Selector, SelectorKind; 13 import '../universe/universe.dart' show Selector, SelectorKind;
14 import '../dart_types.dart' show DartType, GenericType; 14 import '../dart_types.dart' show DartType, GenericType;
15 15
16 abstract class Node { 16 abstract class Node {
17 static int hashCount = 0;
18 final int hashCode = hashCount = (hashCount + 1) & 0x3fffffff;
19
20 /// A pointer to the parent node. Is null until set by optimization passes. 17 /// A pointer to the parent node. Is null until set by optimization passes.
21 Node parent; 18 Node parent;
22 19
23 accept(Visitor visitor); 20 accept(Visitor visitor);
24 } 21 }
25 22
26 abstract class Expression extends Node { 23 abstract class Expression extends Node {
27 Expression plug(Expression expr) => throw 'impossible'; 24 Expression plug(Expression expr) => throw 'impossible';
28 } 25 }
29 26
(...skipping 945 matching lines...) Expand 10 before | Expand all | Expand 10 after
975 } 972 }
976 973
977 // JavaScript specific nodes. 974 // JavaScript specific nodes.
978 975
979 void visitIdentical(Identical node) { 976 void visitIdentical(Identical node) {
980 visitReference(node.left); 977 visitReference(node.left);
981 visitReference(node.right); 978 visitReference(node.right);
982 } 979 }
983 } 980 }
984 981
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698