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

Side by Side Diff: dart/lib/compiler/implementation/ssa/value_set.dart

Issue 10876008: Remove most superfluous getter arguments from dart2js. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 4 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 class ValueSet { 5 class ValueSet {
6 int size = 0; 6 int size = 0;
7 List<HInstruction> table; 7 List<HInstruction> table;
8 ValueSetNode collisions; 8 ValueSetNode collisions;
9 ValueSet() : table = new List<HInstruction>(8); 9 ValueSet() : table = new List<HInstruction>(8);
10 10
11 bool isEmpty() => size == 0; 11 bool isEmpty() => size == 0;
12 int get length() => size; 12 int get length => size;
13 13
14 void add(HInstruction instruction) { 14 void add(HInstruction instruction) {
15 assert(lookup(instruction) === null); 15 assert(lookup(instruction) === null);
16 int hashCode = instruction.gvnHashCode(); 16 int hashCode = instruction.gvnHashCode();
17 int capacity = table.length; 17 int capacity = table.length;
18 // Resize when half of the hash table is in use. 18 // Resize when half of the hash table is in use.
19 if (size >= capacity >> 1) { 19 if (size >= capacity >> 1) {
20 capacity = capacity << 1; 20 capacity = capacity << 1;
21 resize(capacity); 21 resize(capacity);
22 } 22 }
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 assert(table.length == capacity); 145 assert(table.length == capacity);
146 } 146 }
147 } 147 }
148 148
149 class ValueSetNode { 149 class ValueSetNode {
150 final HInstruction value; 150 final HInstruction value;
151 final int hashCode; 151 final int hashCode;
152 ValueSetNode next; 152 ValueSetNode next;
153 ValueSetNode(this.value, this.hashCode, this.next); 153 ValueSetNode(this.value, this.hashCode, this.next);
154 } 154 }
OLDNEW
« no previous file with comments | « dart/lib/compiler/implementation/ssa/types_propagation.dart ('k') | dart/lib/compiler/implementation/tools/mini_parser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698