| OLD | NEW |
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 27 matching lines...) Expand all Loading... |
| 38 namespace internal { | 38 namespace internal { |
| 39 | 39 |
| 40 // Forward declarations. | 40 // Forward declarations. |
| 41 class Node; | 41 class Node; |
| 42 | 42 |
| 43 class BitVector: public ZoneObject { | 43 class BitVector: public ZoneObject { |
| 44 public: | 44 public: |
| 45 explicit BitVector(int length) | 45 explicit BitVector(int length) |
| 46 : length_(length), | 46 : length_(length), |
| 47 data_length_(SizeFor(length)), | 47 data_length_(SizeFor(length)), |
| 48 data_(Zone::NewArray<uint32_t>(data_length_)) { | 48 data_(ZONE->NewArray<uint32_t>(data_length_)) { |
| 49 ASSERT(length > 0); | 49 ASSERT(length > 0); |
| 50 Clear(); | 50 Clear(); |
| 51 } | 51 } |
| 52 | 52 |
| 53 BitVector(const BitVector& other) | 53 BitVector(const BitVector& other) |
| 54 : length_(other.length()), | 54 : length_(other.length()), |
| 55 data_length_(SizeFor(length_)), | 55 data_length_(SizeFor(length_)), |
| 56 data_(Zone::NewArray<uint32_t>(data_length_)) { | 56 data_(ZONE->NewArray<uint32_t>(data_length_)) { |
| 57 CopyFrom(other); | 57 CopyFrom(other); |
| 58 } | 58 } |
| 59 | 59 |
| 60 static int SizeFor(int length) { | 60 static int SizeFor(int length) { |
| 61 return 1 + ((length - 1) / 32); | 61 return 1 + ((length - 1) / 32); |
| 62 } | 62 } |
| 63 | 63 |
| 64 BitVector& operator=(const BitVector& rhs) { | 64 BitVector& operator=(const BitVector& rhs) { |
| 65 if (this != &rhs) CopyFrom(rhs); | 65 if (this != &rhs) CopyFrom(rhs); |
| 66 return *this; | 66 return *this; |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 BitVector av_; | 269 BitVector av_; |
| 270 | 270 |
| 271 DISALLOW_COPY_AND_ASSIGN(AssignedVariablesAnalyzer); | 271 DISALLOW_COPY_AND_ASSIGN(AssignedVariablesAnalyzer); |
| 272 }; | 272 }; |
| 273 | 273 |
| 274 | 274 |
| 275 } } // namespace v8::internal | 275 } } // namespace v8::internal |
| 276 | 276 |
| 277 | 277 |
| 278 #endif // V8_DATAFLOW_H_ | 278 #endif // V8_DATAFLOW_H_ |
| OLD | NEW |