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

Side by Side Diff: src/serialize.cc

Issue 772853003: Cleanup: Remove NativesCollection<.>::*Raw* methods. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix compile. Created 6 years 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
« no previous file with comments | « src/natives-external.cc ('k') | test/cctest/test-log.cc » ('j') | 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 1230 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « src/natives-external.cc ('k') | test/cctest/test-log.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698