| OLD | NEW | 
|---|
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. | 
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without | 
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are | 
| 4 // met: | 4 // met: | 
| 5 // | 5 // | 
| 6 //     * Redistributions of source code must retain the above copyright | 6 //     * Redistributions of source code must retain the above copyright | 
| 7 //       notice, this list of conditions and the following disclaimer. | 7 //       notice, this list of conditions and the following disclaimer. | 
| 8 //     * Redistributions in binary form must reproduce the above | 8 //     * Redistributions in binary form must reproduce the above | 
| 9 //       copyright notice, this list of conditions and the following | 9 //       copyright notice, this list of conditions and the following | 
| 10 //       disclaimer in the documentation and/or other materials provided | 10 //       disclaimer in the documentation and/or other materials provided | 
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 208               ? new(zone) BitVector(1, zone) | 208               ? new(zone) BitVector(1, zone) | 
| 209               : target->bits_) { } | 209               : target->bits_) { } | 
| 210     bool Done() const { return it_.Done(); } | 210     bool Done() const { return it_.Done(); } | 
| 211     void Advance() { it_.Advance(); } | 211     void Advance() { it_.Advance(); } | 
| 212     int Current() const { return it_.Current(); } | 212     int Current() const { return it_.Current(); } | 
| 213    private: | 213    private: | 
| 214     BitVector::Iterator it_; | 214     BitVector::Iterator it_; | 
| 215   }; | 215   }; | 
| 216 | 216 | 
| 217   GrowableBitVector() : bits_(NULL) { } | 217   GrowableBitVector() : bits_(NULL) { } | 
|  | 218   GrowableBitVector(int length, Zone* zone) | 
|  | 219       : bits_(new(zone) BitVector(length, zone)) { } | 
| 218 | 220 | 
| 219   bool Contains(int value) const { | 221   bool Contains(int value) const { | 
| 220     if (!InBitsRange(value)) return false; | 222     if (!InBitsRange(value)) return false; | 
| 221     return bits_->Contains(value); | 223     return bits_->Contains(value); | 
| 222   } | 224   } | 
| 223 | 225 | 
| 224   void Add(int value, Zone* zone) { | 226   void Add(int value, Zone* zone) { | 
| 225     EnsureCapacity(value, zone); | 227     EnsureCapacity(value, zone); | 
| 226     bits_->Add(value); | 228     bits_->Add(value); | 
| 227   } | 229   } | 
| (...skipping 23 matching lines...) Expand all  Loading... | 
| 251   } | 253   } | 
| 252 | 254 | 
| 253   BitVector* bits_; | 255   BitVector* bits_; | 
| 254 }; | 256 }; | 
| 255 | 257 | 
| 256 | 258 | 
| 257 } }  // namespace v8::internal | 259 } }  // namespace v8::internal | 
| 258 | 260 | 
| 259 | 261 | 
| 260 #endif  // V8_DATAFLOW_H_ | 262 #endif  // V8_DATAFLOW_H_ | 
| OLD | NEW | 
|---|