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 817 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
828 isolate_->heap()->set_array_buffers_list( | 828 isolate_->heap()->set_array_buffers_list( |
829 isolate_->heap()->undefined_value()); | 829 isolate_->heap()->undefined_value()); |
830 | 830 |
831 // The allocation site list is build during root iteration, but if no sites | 831 // The allocation site list is build during root iteration, but if no sites |
832 // were encountered then it needs to be initialized to undefined. | 832 // were encountered then it needs to be initialized to undefined. |
833 if (isolate_->heap()->allocation_sites_list() == Smi::FromInt(0)) { | 833 if (isolate_->heap()->allocation_sites_list() == Smi::FromInt(0)) { |
834 isolate_->heap()->set_allocation_sites_list( | 834 isolate_->heap()->set_allocation_sites_list( |
835 isolate_->heap()->undefined_value()); | 835 isolate_->heap()->undefined_value()); |
836 } | 836 } |
837 | 837 |
| 838 isolate_->heap()->InitializeWeakObjectToCodeTable(); |
| 839 |
838 // Update data pointers to the external strings containing natives sources. | 840 // Update data pointers to the external strings containing natives sources. |
839 for (int i = 0; i < Natives::GetBuiltinsCount(); i++) { | 841 for (int i = 0; i < Natives::GetBuiltinsCount(); i++) { |
840 Object* source = isolate_->heap()->natives_source_cache()->get(i); | 842 Object* source = isolate_->heap()->natives_source_cache()->get(i); |
841 if (!source->IsUndefined()) { | 843 if (!source->IsUndefined()) { |
842 ExternalAsciiString::cast(source)->update_data_cache(); | 844 ExternalAsciiString::cast(source)->update_data_cache(); |
843 } | 845 } |
844 } | 846 } |
845 | 847 |
846 // Issue code events for newly deserialized code objects. | 848 // Issue code events for newly deserialized code objects. |
847 LOG_CODE_EVENT(isolate_, LogCodeObjects()); | 849 LOG_CODE_EVENT(isolate_, LogCodeObjects()); |
(...skipping 1007 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1855 | 1857 |
1856 bool SnapshotByteSource::AtEOF() { | 1858 bool SnapshotByteSource::AtEOF() { |
1857 if (0u + length_ - position_ > 2 * sizeof(uint32_t)) return false; | 1859 if (0u + length_ - position_ > 2 * sizeof(uint32_t)) return false; |
1858 for (int x = position_; x < length_; x++) { | 1860 for (int x = position_; x < length_; x++) { |
1859 if (data_[x] != SerializerDeserializer::nop()) return false; | 1861 if (data_[x] != SerializerDeserializer::nop()) return false; |
1860 } | 1862 } |
1861 return true; | 1863 return true; |
1862 } | 1864 } |
1863 | 1865 |
1864 } } // namespace v8::internal | 1866 } } // namespace v8::internal |
OLD | NEW |