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 545 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
556 int space, | 556 int space, |
557 int address, | 557 int address, |
558 HowToCode how_to_code, | 558 HowToCode how_to_code, |
559 WhereToPoint where_to_point, | 559 WhereToPoint where_to_point, |
560 int skip); | 560 int skip); |
561 void InitializeAllocators(); | 561 void InitializeAllocators(); |
562 // This will return the space for an object. | 562 // This will return the space for an object. |
563 static int SpaceOfObject(HeapObject* object); | 563 static int SpaceOfObject(HeapObject* object); |
564 int Allocate(int space, int size); | 564 int Allocate(int space, int size); |
565 int EncodeExternalReference(Address addr) { | 565 int EncodeExternalReference(Address addr) { |
| 566 if (((uint32_t)addr & 3) != 0) { |
| 567 addr = (Address)((((uint32_t)addr << 16) & ~0xffff) | |
| 568 (((uint32_t)addr >> 16) & 0xffff)); |
| 569 } |
566 return external_reference_encoder_->Encode(addr); | 570 return external_reference_encoder_->Encode(addr); |
567 } | 571 } |
568 | 572 |
569 int SpaceAreaSize(int space); | 573 int SpaceAreaSize(int space); |
570 | 574 |
571 Isolate* isolate_; | 575 Isolate* isolate_; |
572 // Keep track of the fullness of each space in order to generate | 576 // Keep track of the fullness of each space in order to generate |
573 // relative addresses for back references. | 577 // relative addresses for back references. |
574 int fullness_[LAST_SPACE + 1]; | 578 int fullness_[LAST_SPACE + 1]; |
575 SnapshotByteSink* sink_; | 579 SnapshotByteSink* sink_; |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
655 private: | 659 private: |
656 virtual bool ShouldBeInThePartialSnapshotCache(HeapObject* o) { | 660 virtual bool ShouldBeInThePartialSnapshotCache(HeapObject* o) { |
657 return false; | 661 return false; |
658 } | 662 } |
659 }; | 663 }; |
660 | 664 |
661 | 665 |
662 } } // namespace v8::internal | 666 } } // namespace v8::internal |
663 | 667 |
664 #endif // V8_SERIALIZE_H_ | 668 #endif // V8_SERIALIZE_H_ |
OLD | NEW |