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 5238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5249 MaybeHandle<Code> FindHandlerForMap(Map* map); | 5249 MaybeHandle<Code> FindHandlerForMap(Map* map); |
5250 | 5250 |
5251 // Find the first name in an IC stub. | 5251 // Find the first name in an IC stub. |
5252 Name* FindFirstName(); | 5252 Name* FindFirstName(); |
5253 | 5253 |
5254 class FindAndReplacePattern; | 5254 class FindAndReplacePattern; |
5255 // For each (map-to-find, object-to-replace) pair in the pattern, this | 5255 // For each (map-to-find, object-to-replace) pair in the pattern, this |
5256 // function replaces the corresponding placeholder in the code with the | 5256 // function replaces the corresponding placeholder in the code with the |
5257 // object-to-replace. The function assumes that pairs in the pattern come in | 5257 // object-to-replace. The function assumes that pairs in the pattern come in |
5258 // the same order as the placeholders in the code. | 5258 // the same order as the placeholders in the code. |
| 5259 // If the placeholder is a weak cell, then the value of weak cell is matched |
| 5260 // against the map-to-find. |
5259 void FindAndReplace(const FindAndReplacePattern& pattern); | 5261 void FindAndReplace(const FindAndReplacePattern& pattern); |
5260 | 5262 |
5261 // The entire code object including its header is copied verbatim to the | 5263 // The entire code object including its header is copied verbatim to the |
5262 // snapshot so that it can be written in one, fast, memcpy during | 5264 // snapshot so that it can be written in one, fast, memcpy during |
5263 // deserialization. The deserializer will overwrite some pointers, rather | 5265 // deserialization. The deserializer will overwrite some pointers, rather |
5264 // like a runtime linker, but the random allocation addresses used in the | 5266 // like a runtime linker, but the random allocation addresses used in the |
5265 // mksnapshot process would still be present in the unlinked snapshot data, | 5267 // mksnapshot process would still be present in the unlinked snapshot data, |
5266 // which would make snapshot production non-reproducible. This method wipes | 5268 // which would make snapshot production non-reproducible. This method wipes |
5267 // out the to-be-overwritten header data for reproducible snapshots. | 5269 // out the to-be-overwritten header data for reproducible snapshots. |
5268 inline void WipeOutHeader(); | 5270 inline void WipeOutHeader(); |
(...skipping 5703 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10972 } else { | 10974 } else { |
10973 value &= ~(1 << bit_position); | 10975 value &= ~(1 << bit_position); |
10974 } | 10976 } |
10975 return value; | 10977 return value; |
10976 } | 10978 } |
10977 }; | 10979 }; |
10978 | 10980 |
10979 } } // namespace v8::internal | 10981 } } // namespace v8::internal |
10980 | 10982 |
10981 #endif // V8_OBJECTS_H_ | 10983 #endif // V8_OBJECTS_H_ |
OLD | NEW |