| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8_OBJECTS_H_ | 5 #ifndef V8_OBJECTS_H_ |
| 6 #define V8_OBJECTS_H_ | 6 #define V8_OBJECTS_H_ |
| 7 | 7 |
| 8 #include <iosfwd> | 8 #include <iosfwd> |
| 9 | 9 |
| 10 #include "src/allocation.h" | 10 #include "src/allocation.h" |
| (...skipping 3430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3441 | 3441 |
| 3442 class SeededNumberDictionary | 3442 class SeededNumberDictionary |
| 3443 : public Dictionary<SeededNumberDictionary, | 3443 : public Dictionary<SeededNumberDictionary, |
| 3444 SeededNumberDictionaryShape, | 3444 SeededNumberDictionaryShape, |
| 3445 uint32_t> { | 3445 uint32_t> { |
| 3446 public: | 3446 public: |
| 3447 DECLARE_CAST(SeededNumberDictionary) | 3447 DECLARE_CAST(SeededNumberDictionary) |
| 3448 | 3448 |
| 3449 // Type specific at put (default NONE attributes is used when adding). | 3449 // Type specific at put (default NONE attributes is used when adding). |
| 3450 MUST_USE_RESULT static Handle<SeededNumberDictionary> AtNumberPut( | 3450 MUST_USE_RESULT static Handle<SeededNumberDictionary> AtNumberPut( |
| 3451 Handle<SeededNumberDictionary> dictionary, | 3451 Handle<SeededNumberDictionary> dictionary, uint32_t key, |
| 3452 uint32_t key, | 3452 Handle<Object> value, bool used_as_prototype); |
| 3453 Handle<Object> value); | |
| 3454 MUST_USE_RESULT static Handle<SeededNumberDictionary> AddNumberEntry( | 3453 MUST_USE_RESULT static Handle<SeededNumberDictionary> AddNumberEntry( |
| 3455 Handle<SeededNumberDictionary> dictionary, | 3454 Handle<SeededNumberDictionary> dictionary, uint32_t key, |
| 3456 uint32_t key, | 3455 Handle<Object> value, PropertyDetails details, bool used_as_prototype); |
| 3457 Handle<Object> value, | |
| 3458 PropertyDetails details); | |
| 3459 | 3456 |
| 3460 // Set an existing entry or add a new one if needed. | 3457 // Set an existing entry or add a new one if needed. |
| 3461 // Return the updated dictionary. | 3458 // Return the updated dictionary. |
| 3462 MUST_USE_RESULT static Handle<SeededNumberDictionary> Set( | 3459 MUST_USE_RESULT static Handle<SeededNumberDictionary> Set( |
| 3463 Handle<SeededNumberDictionary> dictionary, | 3460 Handle<SeededNumberDictionary> dictionary, uint32_t key, |
| 3464 uint32_t key, | 3461 Handle<Object> value, PropertyDetails details, bool used_as_prototype); |
| 3465 Handle<Object> value, | |
| 3466 PropertyDetails details); | |
| 3467 | 3462 |
| 3468 void UpdateMaxNumberKey(uint32_t key); | 3463 void UpdateMaxNumberKey(uint32_t key, bool used_as_prototype); |
| 3469 | 3464 |
| 3470 // If slow elements are required we will never go back to fast-case | 3465 // If slow elements are required we will never go back to fast-case |
| 3471 // for the elements kept in this dictionary. We require slow | 3466 // for the elements kept in this dictionary. We require slow |
| 3472 // elements if an element has been added at an index larger than | 3467 // elements if an element has been added at an index larger than |
| 3473 // kRequiresSlowElementsLimit or set_requires_slow_elements() has been called | 3468 // kRequiresSlowElementsLimit or set_requires_slow_elements() has been called |
| 3474 // when defining a getter or setter with a number key. | 3469 // when defining a getter or setter with a number key. |
| 3475 inline bool requires_slow_elements(); | 3470 inline bool requires_slow_elements(); |
| 3476 inline void set_requires_slow_elements(); | 3471 inline void set_requires_slow_elements(); |
| 3477 | 3472 |
| 3478 // Get the value of the max number key that has been added to this | 3473 // Get the value of the max number key that has been added to this |
| (...skipping 7066 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10545 } else { | 10540 } else { |
| 10546 value &= ~(1 << bit_position); | 10541 value &= ~(1 << bit_position); |
| 10547 } | 10542 } |
| 10548 return value; | 10543 return value; |
| 10549 } | 10544 } |
| 10550 }; | 10545 }; |
| 10551 | 10546 |
| 10552 } } // namespace v8::internal | 10547 } } // namespace v8::internal |
| 10553 | 10548 |
| 10554 #endif // V8_OBJECTS_H_ | 10549 #endif // V8_OBJECTS_H_ |
| OLD | NEW |