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 2510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2521 ASSERT(HasEnumCache()); | 2521 ASSERT(HasEnumCache()); |
2522 FixedArray* bridge = FixedArray::cast(get(kEnumCacheIndex)); | 2522 FixedArray* bridge = FixedArray::cast(get(kEnumCacheIndex)); |
2523 return FixedArray::cast(bridge->get(kEnumCacheBridgeCacheIndex)); | 2523 return FixedArray::cast(bridge->get(kEnumCacheBridgeCacheIndex)); |
2524 } | 2524 } |
2525 | 2525 |
2526 bool HasEnumIndicesCache() { | 2526 bool HasEnumIndicesCache() { |
2527 if (IsEmpty()) return false; | 2527 if (IsEmpty()) return false; |
2528 Object* object = get(kEnumCacheIndex); | 2528 Object* object = get(kEnumCacheIndex); |
2529 if (object->IsSmi()) return false; | 2529 if (object->IsSmi()) return false; |
2530 FixedArray* bridge = FixedArray::cast(object); | 2530 FixedArray* bridge = FixedArray::cast(object); |
2531 return bridge->get(kEnumCacheBridgeIndicesCacheIndex)->IsSmi(); | 2531 return !bridge->get(kEnumCacheBridgeIndicesCacheIndex)->IsSmi(); |
2532 } | 2532 } |
2533 | 2533 |
2534 FixedArray* GetEnumIndicesCache() { | 2534 FixedArray* GetEnumIndicesCache() { |
2535 ASSERT(HasEnumIndicesCache()); | 2535 ASSERT(HasEnumIndicesCache()); |
2536 FixedArray* bridge = FixedArray::cast(get(kEnumCacheIndex)); | 2536 FixedArray* bridge = FixedArray::cast(get(kEnumCacheIndex)); |
2537 return FixedArray::cast(bridge->get(kEnumCacheBridgeIndicesCacheIndex)); | 2537 return FixedArray::cast(bridge->get(kEnumCacheBridgeIndicesCacheIndex)); |
2538 } | 2538 } |
2539 | 2539 |
2540 Object** GetEnumCacheSlot() { | 2540 Object** GetEnumCacheSlot() { |
2541 ASSERT(HasEnumCache()); | 2541 ASSERT(HasEnumCache()); |
(...skipping 6477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9019 } else { | 9019 } else { |
9020 value &= ~(1 << bit_position); | 9020 value &= ~(1 << bit_position); |
9021 } | 9021 } |
9022 return value; | 9022 return value; |
9023 } | 9023 } |
9024 }; | 9024 }; |
9025 | 9025 |
9026 } } // namespace v8::internal | 9026 } } // namespace v8::internal |
9027 | 9027 |
9028 #endif // V8_OBJECTS_H_ | 9028 #endif // V8_OBJECTS_H_ |
OLD | NEW |