| 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_SERIALIZE_H_ | 5 #ifndef V8_SERIALIZE_H_ |
| 6 #define V8_SERIALIZE_H_ | 6 #define V8_SERIALIZE_H_ |
| 7 | 7 |
| 8 #include "src/compiler.h" | 8 #include "src/compiler.h" |
| 9 #include "src/hashmap.h" | 9 #include "src/hashmap.h" |
| 10 #include "src/heap-profiler.h" | 10 #include "src/heap-profiler.h" |
| (...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 370 } | 370 } |
| 371 static const int kRootArrayConstants = 0xa0; | 371 static const int kRootArrayConstants = 0xa0; |
| 372 // 0xa0-0xbf Things from the first 32 elements of the root array. | 372 // 0xa0-0xbf Things from the first 32 elements of the root array. |
| 373 static const int kRootArrayNumberOfConstantEncodings = 0x20; | 373 static const int kRootArrayNumberOfConstantEncodings = 0x20; |
| 374 static int RootArrayConstantFromByteCode(int byte_code) { | 374 static int RootArrayConstantFromByteCode(int byte_code) { |
| 375 return byte_code & 0x1f; | 375 return byte_code & 0x1f; |
| 376 } | 376 } |
| 377 | 377 |
| 378 static const int kNop = 0xf; // Do nothing, used for padding. | 378 static const int kNop = 0xf; // Do nothing, used for padding. |
| 379 | 379 |
| 380 static const int kNextChunk = 0x4f; // Move to next reserved chunk. |
| 381 |
| 380 static const int kAnyOldSpace = -1; | 382 static const int kAnyOldSpace = -1; |
| 381 | 383 |
| 382 // A bitmask for getting the space out of an instruction. | 384 // A bitmask for getting the space out of an instruction. |
| 383 static const int kSpaceMask = 7; | 385 static const int kSpaceMask = 7; |
| 384 STATIC_ASSERT(kNumberOfSpaces <= kSpaceMask + 1); | 386 STATIC_ASSERT(kNumberOfSpaces <= kSpaceMask + 1); |
| 385 | 387 |
| 386 // Sentinel after a new object to indicate that double alignment is needed. | 388 // Sentinel after a new object to indicate that double alignment is needed. |
| 387 static const int kDoubleAlignmentSentinel = 0; | 389 static const int kDoubleAlignmentSentinel = 0; |
| 388 }; | 390 }; |
| 389 | 391 |
| (...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 866 // Following the header, we store, in sequential order | 868 // Following the header, we store, in sequential order |
| 867 // - code stub keys | 869 // - code stub keys |
| 868 // - serialization payload | 870 // - serialization payload |
| 869 | 871 |
| 870 ScriptData* script_data_; | 872 ScriptData* script_data_; |
| 871 bool owns_script_data_; | 873 bool owns_script_data_; |
| 872 }; | 874 }; |
| 873 } } // namespace v8::internal | 875 } } // namespace v8::internal |
| 874 | 876 |
| 875 #endif // V8_SERIALIZE_H_ | 877 #endif // V8_SERIALIZE_H_ |
| OLD | NEW |