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

Side by Side Diff: src/serialize.cc

Issue 699473002: 429168: fix for PdfJs regression (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 1 month 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/serialize.h ('k') | test/cctest/test-alloc.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 1881 matching lines...) Expand 10 before | Expand all | Expand 10 after
1892 1892
1893 AllocationSpace Serializer::SpaceOfObject(HeapObject* object) { 1893 AllocationSpace Serializer::SpaceOfObject(HeapObject* object) {
1894 for (int i = FIRST_SPACE; i <= LAST_SPACE; i++) { 1894 for (int i = FIRST_SPACE; i <= LAST_SPACE; i++) {
1895 AllocationSpace s = static_cast<AllocationSpace>(i); 1895 AllocationSpace s = static_cast<AllocationSpace>(i);
1896 if (object->GetHeap()->InSpace(object, s)) { 1896 if (object->GetHeap()->InSpace(object, s)) {
1897 DCHECK(i < kNumberOfSpaces); 1897 DCHECK(i < kNumberOfSpaces);
1898 return s; 1898 return s;
1899 } 1899 }
1900 } 1900 }
1901 UNREACHABLE(); 1901 UNREACHABLE();
1902 return INVALID_SPACE; 1902 return FIRST_SPACE;
1903 } 1903 }
1904 1904
1905 1905
1906 BackReference Serializer::AllocateLargeObject(int size) { 1906 BackReference Serializer::AllocateLargeObject(int size) {
1907 // Large objects are allocated one-by-one when deserializing. We do not 1907 // Large objects are allocated one-by-one when deserializing. We do not
1908 // have to keep track of multiple chunks. 1908 // have to keep track of multiple chunks.
1909 pending_chunk_[LO_SPACE] += size; 1909 pending_chunk_[LO_SPACE] += size;
1910 return BackReference::LargeObjectReference(seen_large_objects_index_++); 1910 return BackReference::LargeObjectReference(seen_large_objects_index_++);
1911 } 1911 }
1912 1912
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after
2324 2324
2325 int SerializedCodeData::CheckSum(String* string) { 2325 int SerializedCodeData::CheckSum(String* string) {
2326 int checksum = Version::Hash(); 2326 int checksum = Version::Hash();
2327 #ifdef DEBUG 2327 #ifdef DEBUG
2328 uint32_t seed = static_cast<uint32_t>(checksum); 2328 uint32_t seed = static_cast<uint32_t>(checksum);
2329 checksum = static_cast<int>(IteratingStringHasher::Hash(string, seed)); 2329 checksum = static_cast<int>(IteratingStringHasher::Hash(string, seed));
2330 #endif // DEBUG 2330 #endif // DEBUG
2331 return checksum; 2331 return checksum;
2332 } 2332 }
2333 } } // namespace v8::internal 2333 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/serialize.h ('k') | test/cctest/test-alloc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698