OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 if (!str) return false; | 88 if (!str) return false; |
89 bool success; | 89 bool success; |
90 { | 90 { |
91 SnapshotByteSource source(str, len); | 91 SnapshotByteSource source(str, len); |
92 Deserializer deserializer(&source); | 92 Deserializer deserializer(&source); |
93 ReserveSpaceForSnapshot(&deserializer, snapshot_file); | 93 ReserveSpaceForSnapshot(&deserializer, snapshot_file); |
94 success = V8::Initialize(&deserializer); | 94 success = V8::Initialize(&deserializer); |
95 } | 95 } |
96 DeleteArray(str); | 96 DeleteArray(str); |
97 return success; | 97 return success; |
98 } else if (size_ > 0) { | 98 } else if (false) { // DO NOT SUBMIT(siggi) size_ > 0) { |
99 SnapshotByteSource source(raw_data_, raw_size_); | 99 SnapshotByteSource source(raw_data_, raw_size_); |
100 Deserializer deserializer(&source); | 100 Deserializer deserializer(&source); |
101 ReserveSpaceForLinkedInSnapshot(&deserializer); | 101 ReserveSpaceForLinkedInSnapshot(&deserializer); |
102 return V8::Initialize(&deserializer); | 102 return V8::Initialize(&deserializer); |
103 } | 103 } |
104 return false; | 104 return false; |
105 } | 105 } |
106 | 106 |
107 | 107 |
108 bool Snapshot::HaveASnapshotToStartFrom() { | 108 bool Snapshot::HaveASnapshotToStartFrom() { |
(...skipping 14 matching lines...) Expand all Loading... |
123 deserializer.set_reservation(OLD_DATA_SPACE, context_data_space_used_); | 123 deserializer.set_reservation(OLD_DATA_SPACE, context_data_space_used_); |
124 deserializer.set_reservation(CODE_SPACE, context_code_space_used_); | 124 deserializer.set_reservation(CODE_SPACE, context_code_space_used_); |
125 deserializer.set_reservation(MAP_SPACE, context_map_space_used_); | 125 deserializer.set_reservation(MAP_SPACE, context_map_space_used_); |
126 deserializer.set_reservation(CELL_SPACE, context_cell_space_used_); | 126 deserializer.set_reservation(CELL_SPACE, context_cell_space_used_); |
127 deserializer.DeserializePartial(&root); | 127 deserializer.DeserializePartial(&root); |
128 CHECK(root->IsContext()); | 128 CHECK(root->IsContext()); |
129 return Handle<Context>(Context::cast(root)); | 129 return Handle<Context>(Context::cast(root)); |
130 } | 130 } |
131 | 131 |
132 } } // namespace v8::internal | 132 } } // namespace v8::internal |
OLD | NEW |