| OLD | NEW |
| 1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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_IDENTITY_MAP_H_ | 5 #ifndef V8_IDENTITY_MAP_H_ |
| 6 #define V8_IDENTITY_MAP_H_ | 6 #define V8_IDENTITY_MAP_H_ |
| 7 | 7 |
| 8 #include "src/handles.h" | 8 #include "src/handles.h" |
| 9 | 9 |
| 10 namespace v8 { | 10 namespace v8 { |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 // as the identity, returning: | 85 // as the identity, returning: |
| 86 // found => a pointer to the storage location for the value | 86 // found => a pointer to the storage location for the value |
| 87 // not found => {nullptr} | 87 // not found => {nullptr} |
| 88 V* Find(Handle<Object> key) { return reinterpret_cast<V*>(FindEntry(key)); } | 88 V* Find(Handle<Object> key) { return reinterpret_cast<V*>(FindEntry(key)); } |
| 89 | 89 |
| 90 // Set the value for the given key. | 90 // Set the value for the given key. |
| 91 void Set(Handle<Object> key, V value) { | 91 void Set(Handle<Object> key, V value) { |
| 92 *(reinterpret_cast<V*>(GetEntry(key))) = value; | 92 *(reinterpret_cast<V*>(GetEntry(key))) = value; |
| 93 } | 93 } |
| 94 }; | 94 }; |
| 95 } | 95 } // namespace internal |
| 96 } // namespace v8::internal | 96 } // namespace v8 |
| 97 | 97 |
| 98 #endif // V8_IDENTITY_MAP_H_ | 98 #endif // V8_IDENTITY_MAP_H_ |
| OLD | NEW |