Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(138)

Side by Side Diff: src/serialize.cc

Issue 641643006: Always include full reloc info to stubs for serialization. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/objects-inl.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/api.h" 8 #include "src/api.h"
9 #include "src/base/platform/platform.h" 9 #include "src/base/platform/platform.h"
10 #include "src/bootstrapper.h" 10 #include "src/bootstrapper.h"
(...skipping 2122 matching lines...) Expand 10 before | Expand all | Expand 10 after
2133 // Deserialize. 2133 // Deserialize.
2134 deserializer.DeserializePartial(isolate, &root); 2134 deserializer.DeserializePartial(isolate, &root);
2135 deserializer.FlushICacheForNewCodeObjects(); 2135 deserializer.FlushICacheForNewCodeObjects();
2136 } 2136 }
2137 2137
2138 if (FLAG_profile_deserialization) { 2138 if (FLAG_profile_deserialization) {
2139 double ms = timer.Elapsed().InMillisecondsF(); 2139 double ms = timer.Elapsed().InMillisecondsF();
2140 int length = data->length(); 2140 int length = data->length();
2141 PrintF("[Deserializing from %d bytes took %0.3f ms]\n", length, ms); 2141 PrintF("[Deserializing from %d bytes took %0.3f ms]\n", length, ms);
2142 } 2142 }
2143 return Handle<SharedFunctionInfo>(SharedFunctionInfo::cast(root), isolate); 2143 Handle<SharedFunctionInfo> result(SharedFunctionInfo::cast(root), isolate);
2144 result->set_deserialized(true);
2145 return result;
2144 } 2146 }
2145 2147
2146 2148
2147 SerializedCodeData::SerializedCodeData(List<byte>* payload, CodeSerializer* cs) 2149 SerializedCodeData::SerializedCodeData(List<byte>* payload, CodeSerializer* cs)
2148 : owns_script_data_(true) { 2150 : owns_script_data_(true) {
2149 DisallowHeapAllocation no_gc; 2151 DisallowHeapAllocation no_gc;
2150 List<uint32_t>* stub_keys = cs->stub_keys(); 2152 List<uint32_t>* stub_keys = cs->stub_keys();
2151 2153
2152 // Calculate sizes. 2154 // Calculate sizes.
2153 int num_stub_keys = stub_keys->length(); 2155 int num_stub_keys = stub_keys->length();
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
2187 2189
2188 int SerializedCodeData::CheckSum(String* string) { 2190 int SerializedCodeData::CheckSum(String* string) {
2189 int checksum = Version::Hash(); 2191 int checksum = Version::Hash();
2190 #ifdef DEBUG 2192 #ifdef DEBUG
2191 uint32_t seed = static_cast<uint32_t>(checksum); 2193 uint32_t seed = static_cast<uint32_t>(checksum);
2192 checksum = static_cast<int>(IteratingStringHasher::Hash(string, seed)); 2194 checksum = static_cast<int>(IteratingStringHasher::Hash(string, seed));
2193 #endif // DEBUG 2195 #endif // DEBUG
2194 return checksum; 2196 return checksum;
2195 } 2197 }
2196 } } // namespace v8::internal 2198 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects-inl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698