| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 2169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2180 } | 2180 } |
| 2181 }; | 2181 }; |
| 2182 | 2182 |
| 2183 protected: | 2183 protected: |
| 2184 // Set operation on FixedArray without using write barriers. Can | 2184 // Set operation on FixedArray without using write barriers. Can |
| 2185 // only be used for storing old space objects or smis. | 2185 // only be used for storing old space objects or smis. |
| 2186 static inline void NoWriteBarrierSet(FixedArray* array, | 2186 static inline void NoWriteBarrierSet(FixedArray* array, |
| 2187 int index, | 2187 int index, |
| 2188 Object* value); | 2188 Object* value); |
| 2189 | 2189 |
| 2190 // Set operation on FixedArray without incremental write barrier. Can |
| 2191 // only be used if the object is guaranteed to be white (whiteness witness |
| 2192 // is present). |
| 2193 static inline void NoIncrementalWriteBarrierSet(FixedArray* array, |
| 2194 int index, |
| 2195 Object* value); |
| 2196 |
| 2190 private: | 2197 private: |
| 2191 DISALLOW_IMPLICIT_CONSTRUCTORS(FixedArray); | 2198 DISALLOW_IMPLICIT_CONSTRUCTORS(FixedArray); |
| 2192 }; | 2199 }; |
| 2193 | 2200 |
| 2194 | 2201 |
| 2195 // FixedDoubleArray describes fixed-sized arrays with element type double. | 2202 // FixedDoubleArray describes fixed-sized arrays with element type double. |
| 2196 class FixedDoubleArray: public FixedArrayBase { | 2203 class FixedDoubleArray: public FixedArrayBase { |
| 2197 public: | 2204 public: |
| 2198 inline void Initialize(FixedArray* from); | 2205 inline void Initialize(FixedArray* from); |
| 2199 inline void Initialize(FixedDoubleArray* from); | 2206 inline void Initialize(FixedDoubleArray* from); |
| (...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2458 | 2465 |
| 2459 static int ToValueIndex(int descriptor_number) { | 2466 static int ToValueIndex(int descriptor_number) { |
| 2460 return descriptor_number << 1; | 2467 return descriptor_number << 1; |
| 2461 } | 2468 } |
| 2462 | 2469 |
| 2463 bool is_null_descriptor(int descriptor_number) { | 2470 bool is_null_descriptor(int descriptor_number) { |
| 2464 return PropertyDetails(GetDetails(descriptor_number)).type() == | 2471 return PropertyDetails(GetDetails(descriptor_number)).type() == |
| 2465 NULL_DESCRIPTOR; | 2472 NULL_DESCRIPTOR; |
| 2466 } | 2473 } |
| 2467 // Swap operation on FixedArray without using write barriers. | 2474 // Swap operation on FixedArray without using write barriers. |
| 2468 static inline void NoWriteBarrierSwap(FixedArray* array, | 2475 static inline void NoIncrementalWriteBarrierSwap( |
| 2469 int first, | 2476 FixedArray* array, int first, int second); |
| 2470 int second); | |
| 2471 | 2477 |
| 2472 // Swap descriptor first and second. | 2478 // Swap descriptor first and second. |
| 2473 inline void NoWriteBarrierSwapDescriptors(int first, int second); | 2479 inline void NoIncrementalWriteBarrierSwapDescriptors( |
| 2480 int first, int second); |
| 2474 | 2481 |
| 2475 FixedArray* GetContentArray() { | 2482 FixedArray* GetContentArray() { |
| 2476 return FixedArray::cast(get(kContentArrayIndex)); | 2483 return FixedArray::cast(get(kContentArrayIndex)); |
| 2477 } | 2484 } |
| 2478 DISALLOW_IMPLICIT_CONSTRUCTORS(DescriptorArray); | 2485 DISALLOW_IMPLICIT_CONSTRUCTORS(DescriptorArray); |
| 2479 }; | 2486 }; |
| 2480 | 2487 |
| 2481 | 2488 |
| 2482 // HashTable is a subclass of FixedArray that implements a hash table | 2489 // HashTable is a subclass of FixedArray that implements a hash table |
| 2483 // that uses open addressing and quadratic probing. | 2490 // that uses open addressing and quadratic probing. |
| (...skipping 5474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7958 } else { | 7965 } else { |
| 7959 value &= ~(1 << bit_position); | 7966 value &= ~(1 << bit_position); |
| 7960 } | 7967 } |
| 7961 return value; | 7968 return value; |
| 7962 } | 7969 } |
| 7963 }; | 7970 }; |
| 7964 | 7971 |
| 7965 } } // namespace v8::internal | 7972 } } // namespace v8::internal |
| 7966 | 7973 |
| 7967 #endif // V8_OBJECTS_H_ | 7974 #endif // V8_OBJECTS_H_ |
| OLD | NEW |