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 2324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2335 | 2335 |
2336 void SeededNumberDictionary::set_requires_slow_elements() { | 2336 void SeededNumberDictionary::set_requires_slow_elements() { |
2337 set(kMaxNumberKeyIndex, Smi::FromInt(kRequiresSlowElementsMask)); | 2337 set(kMaxNumberKeyIndex, Smi::FromInt(kRequiresSlowElementsMask)); |
2338 } | 2338 } |
2339 | 2339 |
2340 | 2340 |
2341 // ------------------------------------ | 2341 // ------------------------------------ |
2342 // Cast operations | 2342 // Cast operations |
2343 | 2343 |
2344 | 2344 |
2345 FixedDoubleArray* FixedDoubleArray::cast(Object* object) { | |
Michael Starzinger (Google)
2012/11/19 12:55:46
As discussed offline, I don't like this new castin
| |
2346 ASSERT((object->IsFixedArray() && FixedArray::cast(object)->length() == 0) || | |
2347 object->IsFixedDoubleArray()); | |
2348 return reinterpret_cast<FixedDoubleArray*>(object); | |
2349 } | |
2350 | |
2351 | |
2345 CAST_ACCESSOR(FixedArray) | 2352 CAST_ACCESSOR(FixedArray) |
2346 CAST_ACCESSOR(FixedDoubleArray) | |
2347 CAST_ACCESSOR(DescriptorArray) | 2353 CAST_ACCESSOR(DescriptorArray) |
2348 CAST_ACCESSOR(DeoptimizationInputData) | 2354 CAST_ACCESSOR(DeoptimizationInputData) |
2349 CAST_ACCESSOR(DeoptimizationOutputData) | 2355 CAST_ACCESSOR(DeoptimizationOutputData) |
2350 CAST_ACCESSOR(TypeFeedbackCells) | 2356 CAST_ACCESSOR(TypeFeedbackCells) |
2351 CAST_ACCESSOR(SymbolTable) | 2357 CAST_ACCESSOR(SymbolTable) |
2352 CAST_ACCESSOR(JSFunctionResultCache) | 2358 CAST_ACCESSOR(JSFunctionResultCache) |
2353 CAST_ACCESSOR(NormalizedMapCache) | 2359 CAST_ACCESSOR(NormalizedMapCache) |
2354 CAST_ACCESSOR(ScopeInfo) | 2360 CAST_ACCESSOR(ScopeInfo) |
2355 CAST_ACCESSOR(CompilationCacheTable) | 2361 CAST_ACCESSOR(CompilationCacheTable) |
2356 CAST_ACCESSOR(CodeCacheHashTable) | 2362 CAST_ACCESSOR(CodeCacheHashTable) |
(...skipping 3188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
5545 #undef WRITE_UINT32_FIELD | 5551 #undef WRITE_UINT32_FIELD |
5546 #undef READ_SHORT_FIELD | 5552 #undef READ_SHORT_FIELD |
5547 #undef WRITE_SHORT_FIELD | 5553 #undef WRITE_SHORT_FIELD |
5548 #undef READ_BYTE_FIELD | 5554 #undef READ_BYTE_FIELD |
5549 #undef WRITE_BYTE_FIELD | 5555 #undef WRITE_BYTE_FIELD |
5550 | 5556 |
5551 | 5557 |
5552 } } // namespace v8::internal | 5558 } } // namespace v8::internal |
5553 | 5559 |
5554 #endif // V8_OBJECTS_INL_H_ | 5560 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |