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 5354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5365 | 5365 |
5366 // [constant_pool]: The constant pool for this function. | 5366 // [constant_pool]: The constant pool for this function. |
5367 inline ConstantPoolArray* constant_pool(); | 5367 inline ConstantPoolArray* constant_pool(); |
5368 inline void set_constant_pool(Object* constant_pool); | 5368 inline void set_constant_pool(Object* constant_pool); |
5369 | 5369 |
5370 // Get the safepoint entry for the given pc. | 5370 // Get the safepoint entry for the given pc. |
5371 SafepointEntry GetSafepointEntry(Address pc); | 5371 SafepointEntry GetSafepointEntry(Address pc); |
5372 | 5372 |
5373 // Find an object in a stub with a specified map | 5373 // Find an object in a stub with a specified map |
5374 Object* FindNthObject(int n, Map* match_map); | 5374 Object* FindNthObject(int n, Map* match_map); |
5375 void ReplaceNthObject(int n, Map* match_map, Object* replace_with); | |
5376 | 5375 |
5377 // Find the first allocation site in an IC stub. | 5376 // Find the first allocation site in an IC stub. |
5378 AllocationSite* FindFirstAllocationSite(); | 5377 AllocationSite* FindFirstAllocationSite(); |
5379 | 5378 |
5380 // Find the first map in an IC stub. | 5379 // Find the first map in an IC stub. |
5381 Map* FindFirstMap(); | 5380 Map* FindFirstMap(); |
5382 void FindAllMaps(MapHandleList* maps); | 5381 void FindAllMaps(MapHandleList* maps); |
5383 void FindAllTypes(TypeHandleList* types); | 5382 void FindAllTypes(TypeHandleList* types); |
5384 void ReplaceFirstMap(Map* replace); | |
5385 | 5383 |
5386 // Find the first handler in an IC stub. | 5384 // Find the first handler in an IC stub. |
5387 Code* FindFirstHandler(); | 5385 Code* FindFirstHandler(); |
5388 | 5386 |
5389 // Find |length| handlers and put them into |code_list|. Returns false if not | 5387 // Find |length| handlers and put them into |code_list|. Returns false if not |
5390 // enough handlers can be found. | 5388 // enough handlers can be found. |
5391 bool FindHandlers(CodeHandleList* code_list, int length = -1); | 5389 bool FindHandlers(CodeHandleList* code_list, int length = -1); |
5392 | 5390 |
5393 // Find the first name in an IC stub. | 5391 // Find the first name in an IC stub. |
5394 Name* FindFirstName(); | 5392 Name* FindFirstName(); |
5395 | 5393 |
5396 void ReplaceNthCell(int n, Cell* replace_with); | 5394 class FindAndReplacePattern; |
| 5395 void FindAndReplace(const FindAndReplacePattern& pattern); |
5397 | 5396 |
5398 // The entire code object including its header is copied verbatim to the | 5397 // The entire code object including its header is copied verbatim to the |
5399 // snapshot so that it can be written in one, fast, memcpy during | 5398 // snapshot so that it can be written in one, fast, memcpy during |
5400 // deserialization. The deserializer will overwrite some pointers, rather | 5399 // deserialization. The deserializer will overwrite some pointers, rather |
5401 // like a runtime linker, but the random allocation addresses used in the | 5400 // like a runtime linker, but the random allocation addresses used in the |
5402 // mksnapshot process would still be present in the unlinked snapshot data, | 5401 // mksnapshot process would still be present in the unlinked snapshot data, |
5403 // which would make snapshot production non-reproducible. This method wipes | 5402 // which would make snapshot production non-reproducible. This method wipes |
5404 // out the to-be-overwritten header data for reproducible snapshots. | 5403 // out the to-be-overwritten header data for reproducible snapshots. |
5405 inline void WipeOutHeader(); | 5404 inline void WipeOutHeader(); |
5406 | 5405 |
(...skipping 5374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10781 } else { | 10780 } else { |
10782 value &= ~(1 << bit_position); | 10781 value &= ~(1 << bit_position); |
10783 } | 10782 } |
10784 return value; | 10783 return value; |
10785 } | 10784 } |
10786 }; | 10785 }; |
10787 | 10786 |
10788 } } // namespace v8::internal | 10787 } } // namespace v8::internal |
10789 | 10788 |
10790 #endif // V8_OBJECTS_H_ | 10789 #endif // V8_OBJECTS_H_ |
OLD | NEW |