| 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 #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 1230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1241 | 1241 |
| 1242 case kSkip: { | 1242 case kSkip: { |
| 1243 int size = source_->GetInt(); | 1243 int size = source_->GetInt(); |
| 1244 current = reinterpret_cast<Object**>( | 1244 current = reinterpret_cast<Object**>( |
| 1245 reinterpret_cast<intptr_t>(current) + size); | 1245 reinterpret_cast<intptr_t>(current) + size); |
| 1246 break; | 1246 break; |
| 1247 } | 1247 } |
| 1248 | 1248 |
| 1249 case kNativesStringResource: { | 1249 case kNativesStringResource: { |
| 1250 int index = source_->Get(); | 1250 int index = source_->Get(); |
| 1251 Vector<const char> source_vector = Natives::GetRawScriptSource(index); | 1251 Vector<const char> source_vector = Natives::GetScriptSource(index); |
| 1252 NativesExternalStringResource* resource = | 1252 NativesExternalStringResource* resource = |
| 1253 new NativesExternalStringResource(isolate->bootstrapper(), | 1253 new NativesExternalStringResource(isolate->bootstrapper(), |
| 1254 source_vector.start(), | 1254 source_vector.start(), |
| 1255 source_vector.length()); | 1255 source_vector.length()); |
| 1256 *current++ = reinterpret_cast<Object*>(resource); | 1256 *current++ = reinterpret_cast<Object*>(resource); |
| 1257 break; | 1257 break; |
| 1258 } | 1258 } |
| 1259 | 1259 |
| 1260 case kNextChunk: { | 1260 case kNextChunk: { |
| 1261 int space = source_->Get(); | 1261 int space = source_->Get(); |
| (...skipping 1129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2391 bool SerializedCodeData::IsSane(String* source) { | 2391 bool SerializedCodeData::IsSane(String* source) { |
| 2392 return GetHeaderValue(kCheckSumOffset) == CheckSum(source) && | 2392 return GetHeaderValue(kCheckSumOffset) == CheckSum(source) && |
| 2393 PayloadLength() >= SharedFunctionInfo::kSize; | 2393 PayloadLength() >= SharedFunctionInfo::kSize; |
| 2394 } | 2394 } |
| 2395 | 2395 |
| 2396 | 2396 |
| 2397 int SerializedCodeData::CheckSum(String* string) { | 2397 int SerializedCodeData::CheckSum(String* string) { |
| 2398 return Version::Hash() ^ string->length(); | 2398 return Version::Hash() ^ string->length(); |
| 2399 } | 2399 } |
| 2400 } } // namespace v8::internal | 2400 } } // namespace v8::internal |
| OLD | NEW |