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 2151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2162 inline void set_the_hole(int index); | 2162 inline void set_the_hole(int index); |
2163 | 2163 |
2164 // Checking for the hole. | 2164 // Checking for the hole. |
2165 inline bool is_the_hole(int index); | 2165 inline bool is_the_hole(int index); |
2166 | 2166 |
2167 // Garbage collection support. | 2167 // Garbage collection support. |
2168 inline static int SizeFor(int length) { | 2168 inline static int SizeFor(int length) { |
2169 return kHeaderSize + length * kDoubleSize; | 2169 return kHeaderSize + length * kDoubleSize; |
2170 } | 2170 } |
2171 | 2171 |
2172 // Code Generation support. | |
2173 static int OffsetOfElementAt(int index) { return SizeFor(index); } | |
2174 | |
2175 inline static bool is_the_hole_nan(double value); | 2172 inline static bool is_the_hole_nan(double value); |
2176 inline static double hole_nan_as_double(); | 2173 inline static double hole_nan_as_double(); |
2177 inline static double canonical_not_the_hole_nan_as_double(); | 2174 inline static double canonical_not_the_hole_nan_as_double(); |
2178 | 2175 |
2179 // Casting. | 2176 // Casting. |
2180 static inline FixedDoubleArray* cast(Object* obj); | 2177 static inline FixedDoubleArray* cast(Object* obj); |
2181 | 2178 |
2182 // Maximal allowed size, in bytes, of a single FixedDoubleArray. | 2179 // Maximal allowed size, in bytes, of a single FixedDoubleArray. |
2183 // Prevents overflowing size computations, as well as extreme memory | 2180 // Prevents overflowing size computations, as well as extreme memory |
2184 // consumption. | 2181 // consumption. |
(...skipping 4989 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7174 } else { | 7171 } else { |
7175 value &= ~(1 << bit_position); | 7172 value &= ~(1 << bit_position); |
7176 } | 7173 } |
7177 return value; | 7174 return value; |
7178 } | 7175 } |
7179 }; | 7176 }; |
7180 | 7177 |
7181 } } // namespace v8::internal | 7178 } } // namespace v8::internal |
7182 | 7179 |
7183 #endif // V8_OBJECTS_H_ | 7180 #endif // V8_OBJECTS_H_ |
OLD | NEW |