| 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 2154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2165 | 2165 |
| 2166 // Code Generation support. | 2166 // Code Generation support. |
| 2167 static int OffsetOfElementAt(int index) { return SizeFor(index); } | 2167 static int OffsetOfElementAt(int index) { return SizeFor(index); } |
| 2168 | 2168 |
| 2169 // Casting. | 2169 // Casting. |
| 2170 static inline FixedArray* cast(Object* obj); | 2170 static inline FixedArray* cast(Object* obj); |
| 2171 | 2171 |
| 2172 // Maximal allowed size, in bytes, of a single FixedArray. | 2172 // Maximal allowed size, in bytes, of a single FixedArray. |
| 2173 // Prevents overflowing size computations, as well as extreme memory | 2173 // Prevents overflowing size computations, as well as extreme memory |
| 2174 // consumption. | 2174 // consumption. |
| 2175 static const int kMaxSize = 512 * MB; | 2175 static const int kMaxSize = 128 * MB * kPointerSize; |
| 2176 // Maximally allowed length of a FixedArray. | 2176 // Maximally allowed length of a FixedArray. |
| 2177 static const int kMaxLength = (kMaxSize - kHeaderSize) / kPointerSize; | 2177 static const int kMaxLength = (kMaxSize - kHeaderSize) / kPointerSize; |
| 2178 | 2178 |
| 2179 // Dispatched behavior. | 2179 // Dispatched behavior. |
| 2180 #ifdef OBJECT_PRINT | 2180 #ifdef OBJECT_PRINT |
| 2181 inline void FixedArrayPrint() { | 2181 inline void FixedArrayPrint() { |
| 2182 FixedArrayPrint(stdout); | 2182 FixedArrayPrint(stdout); |
| 2183 } | 2183 } |
| 2184 void FixedArrayPrint(FILE* out); | 2184 void FixedArrayPrint(FILE* out); |
| 2185 #endif | 2185 #endif |
| (...skipping 5300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7486 } else { | 7486 } else { |
| 7487 value &= ~(1 << bit_position); | 7487 value &= ~(1 << bit_position); |
| 7488 } | 7488 } |
| 7489 return value; | 7489 return value; |
| 7490 } | 7490 } |
| 7491 }; | 7491 }; |
| 7492 | 7492 |
| 7493 } } // namespace v8::internal | 7493 } } // namespace v8::internal |
| 7494 | 7494 |
| 7495 #endif // V8_OBJECTS_H_ | 7495 #endif // V8_OBJECTS_H_ |
| OLD | NEW |