| 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 3514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3525 // Attempt to shrink hash table after removal of key. | 3525 // Attempt to shrink hash table after removal of key. |
| 3526 MUST_USE_RESULT static inline Handle<ObjectHashTable> Shrink( | 3526 MUST_USE_RESULT static inline Handle<ObjectHashTable> Shrink( |
| 3527 Handle<ObjectHashTable> table, | 3527 Handle<ObjectHashTable> table, |
| 3528 Handle<Object> key); | 3528 Handle<Object> key); |
| 3529 | 3529 |
| 3530 // Looks up the value associated with the given key. The hole value is | 3530 // Looks up the value associated with the given key. The hole value is |
| 3531 // returned in case the key is not present. | 3531 // returned in case the key is not present. |
| 3532 Object* Lookup(Handle<Object> key); | 3532 Object* Lookup(Handle<Object> key); |
| 3533 Object* Lookup(Handle<Object> key, int32_t hash); | 3533 Object* Lookup(Handle<Object> key, int32_t hash); |
| 3534 Object* Lookup(Isolate* isolate, Handle<Object> key, int32_t hash); | 3534 Object* Lookup(Isolate* isolate, Handle<Object> key, int32_t hash); |
| 3535 bool HasKey(Isolate* isolate, Handle<Object> key); |
| 3535 | 3536 |
| 3536 // Adds (or overwrites) the value associated with the given key. | 3537 // Adds (or overwrites) the value associated with the given key. |
| 3537 static Handle<ObjectHashTable> Put(Handle<ObjectHashTable> table, | 3538 static Handle<ObjectHashTable> Put(Handle<ObjectHashTable> table, |
| 3538 Handle<Object> key, | 3539 Handle<Object> key, |
| 3539 Handle<Object> value); | 3540 Handle<Object> value); |
| 3540 static Handle<ObjectHashTable> Put(Handle<ObjectHashTable> table, | 3541 static Handle<ObjectHashTable> Put(Handle<ObjectHashTable> table, |
| 3541 Handle<Object> key, Handle<Object> value, | 3542 Handle<Object> key, Handle<Object> value, |
| 3542 int32_t hash); | 3543 int32_t hash); |
| 3544 static Handle<ObjectHashTable> Put(Isolate* isolate, |
| 3545 Handle<ObjectHashTable> table, |
| 3546 Handle<Object> key, Handle<Object> value); |
| 3547 static Handle<ObjectHashTable> Put(Isolate* isolate, |
| 3548 Handle<ObjectHashTable> table, |
| 3549 Handle<Object> key, Handle<Object> value, |
| 3550 int32_t hash); |
| 3543 | 3551 |
| 3544 // Returns an ObjectHashTable (possibly |table|) where |key| has been removed. | 3552 // Returns an ObjectHashTable (possibly |table|) where |key| has been removed. |
| 3545 static Handle<ObjectHashTable> Remove(Handle<ObjectHashTable> table, | 3553 static Handle<ObjectHashTable> Remove(Handle<ObjectHashTable> table, |
| 3546 Handle<Object> key, | 3554 Handle<Object> key, |
| 3547 bool* was_present); | 3555 bool* was_present); |
| 3548 static Handle<ObjectHashTable> Remove(Handle<ObjectHashTable> table, | 3556 static Handle<ObjectHashTable> Remove(Handle<ObjectHashTable> table, |
| 3549 Handle<Object> key, bool* was_present, | 3557 Handle<Object> key, bool* was_present, |
| 3550 int32_t hash); | 3558 int32_t hash); |
| 3551 | 3559 |
| 3552 protected: | 3560 protected: |
| (...skipping 6861 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10414 } else { | 10422 } else { |
| 10415 value &= ~(1 << bit_position); | 10423 value &= ~(1 << bit_position); |
| 10416 } | 10424 } |
| 10417 return value; | 10425 return value; |
| 10418 } | 10426 } |
| 10419 }; | 10427 }; |
| 10420 | 10428 |
| 10421 } } // namespace v8::internal | 10429 } } // namespace v8::internal |
| 10422 | 10430 |
| 10423 #endif // V8_OBJECTS_H_ | 10431 #endif // V8_OBJECTS_H_ |
| OLD | NEW |