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 5178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5189 | 5189 |
5190 // Find |length| handlers and put them into |code_list|. Returns false if not | 5190 // Find |length| handlers and put them into |code_list|. Returns false if not |
5191 // enough handlers can be found. | 5191 // enough handlers can be found. |
5192 bool FindHandlers(CodeHandleList* code_list, int length = -1); | 5192 bool FindHandlers(CodeHandleList* code_list, int length = -1); |
5193 | 5193 |
5194 // Find the first name in an IC stub. | 5194 // Find the first name in an IC stub. |
5195 Name* FindFirstName(); | 5195 Name* FindFirstName(); |
5196 | 5196 |
5197 void ReplaceNthCell(int n, Cell* replace_with); | 5197 void ReplaceNthCell(int n, Cell* replace_with); |
5198 | 5198 |
| 5199 // The entire code object including its header is copied verbatim to the |
| 5200 // snapshot so that it can be written in one, fast, memcpy during |
| 5201 // deserialization. The deserializer will overwrite some pointers, rather |
| 5202 // like a runtime linker, but the random allocation addresses used in the |
| 5203 // mksnapshot process would still be present in the unlinked snapshot data, |
| 5204 // which would make snapshot production non-reproducible. This method wipes |
| 5205 // out the to-be-overwritten header data for reproducible snapshots. |
| 5206 inline void WipeOutHeader(); |
| 5207 |
5199 class ExtraICStateStrictMode: public BitField<StrictModeFlag, 0, 1> {}; | 5208 class ExtraICStateStrictMode: public BitField<StrictModeFlag, 0, 1> {}; |
5200 class ExtraICStateKeyedAccessStoreMode: | 5209 class ExtraICStateKeyedAccessStoreMode: |
5201 public BitField<KeyedAccessStoreMode, 1, 4> {}; // NOLINT | 5210 public BitField<KeyedAccessStoreMode, 1, 4> {}; // NOLINT |
5202 | 5211 |
5203 static inline StrictModeFlag GetStrictMode(ExtraICState extra_ic_state) { | 5212 static inline StrictModeFlag GetStrictMode(ExtraICState extra_ic_state) { |
5204 return ExtraICStateStrictMode::decode(extra_ic_state); | 5213 return ExtraICStateStrictMode::decode(extra_ic_state); |
5205 } | 5214 } |
5206 | 5215 |
5207 static inline KeyedAccessStoreMode GetKeyedAccessStoreMode( | 5216 static inline KeyedAccessStoreMode GetKeyedAccessStoreMode( |
5208 ExtraICState extra_ic_state) { | 5217 ExtraICState extra_ic_state) { |
(...skipping 5231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10440 } else { | 10449 } else { |
10441 value &= ~(1 << bit_position); | 10450 value &= ~(1 << bit_position); |
10442 } | 10451 } |
10443 return value; | 10452 return value; |
10444 } | 10453 } |
10445 }; | 10454 }; |
10446 | 10455 |
10447 } } // namespace v8::internal | 10456 } } // namespace v8::internal |
10448 | 10457 |
10449 #endif // V8_OBJECTS_H_ | 10458 #endif // V8_OBJECTS_H_ |
OLD | NEW |