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

Side by Side Diff: src/serialize.cc

Issue 660095: Merge revision 3813 to 3930 from bleeding_edge to partial snapshots branch. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/partial_snapshots/
Patch Set: '' Created 10 years, 10 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/scopeinfo.cc ('k') | src/spaces-inl.h » ('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 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 414 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 #endif 425 #endif
426 // Keyed lookup cache. 426 // Keyed lookup cache.
427 Add(ExternalReference::keyed_lookup_cache_keys().address(), 427 Add(ExternalReference::keyed_lookup_cache_keys().address(),
428 UNCLASSIFIED, 428 UNCLASSIFIED,
429 23, 429 23,
430 "KeyedLookupCache::keys()"); 430 "KeyedLookupCache::keys()");
431 Add(ExternalReference::keyed_lookup_cache_field_offsets().address(), 431 Add(ExternalReference::keyed_lookup_cache_field_offsets().address(),
432 UNCLASSIFIED, 432 UNCLASSIFIED,
433 24, 433 24,
434 "KeyedLookupCache::field_offsets()"); 434 "KeyedLookupCache::field_offsets()");
435 Add(ExternalReference::transcendental_cache_array_address().address(),
436 UNCLASSIFIED,
437 25,
438 "TranscendentalCache::caches()");
435 } 439 }
436 440
437 441
438 ExternalReferenceEncoder::ExternalReferenceEncoder() 442 ExternalReferenceEncoder::ExternalReferenceEncoder()
439 : encodings_(Match) { 443 : encodings_(Match) {
440 ExternalReferenceTable* external_references = 444 ExternalReferenceTable* external_references =
441 ExternalReferenceTable::instance(); 445 ExternalReferenceTable::instance();
442 for (int i = 0; i < external_references->size(); ++i) { 446 for (int i = 0; i < external_references->size(); ++i) {
443 Put(external_references->address(i), i); 447 Put(external_references->address(i), i);
444 } 448 }
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after
845 } 849 }
846 } 850 }
847 ASSERT_EQ(current, limit); 851 ASSERT_EQ(current, limit);
848 } 852 }
849 853
850 854
851 void SnapshotByteSink::PutInt(uintptr_t integer, const char* description) { 855 void SnapshotByteSink::PutInt(uintptr_t integer, const char* description) {
852 const int max_shift = ((kPointerSize * kBitsPerByte) / 7) * 7; 856 const int max_shift = ((kPointerSize * kBitsPerByte) / 7) * 7;
853 for (int shift = max_shift; shift > 0; shift -= 7) { 857 for (int shift = max_shift; shift > 0; shift -= 7) {
854 if (integer >= static_cast<uintptr_t>(1u) << shift) { 858 if (integer >= static_cast<uintptr_t>(1u) << shift) {
855 Put(((integer >> shift) & 0x7f) | 0x80, "IntPart"); 859 Put((static_cast<int>((integer >> shift)) & 0x7f) | 0x80, "IntPart");
856 } 860 }
857 } 861 }
858 PutSection(integer & 0x7f, "IntLastPart"); 862 PutSection(static_cast<int>(integer & 0x7f), "IntLastPart");
859 } 863 }
860 864
861 #ifdef DEBUG 865 #ifdef DEBUG
862 866
863 void Deserializer::Synchronize(const char* tag) { 867 void Deserializer::Synchronize(const char* tag) {
864 int data = source_->Get(); 868 int data = source_->Get();
865 // If this assert fails then that indicates that you have a mismatch between 869 // If this assert fails then that indicates that you have a mismatch between
866 // the number of GC roots when serializing and deserializing. 870 // the number of GC roots when serializing and deserializing.
867 ASSERT_EQ(SYNCHRONIZE, data); 871 ASSERT_EQ(SYNCHRONIZE, data);
868 do { 872 do {
(...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after
1350 fullness_[space] = RoundUp(fullness_[space], Page::kPageSize); 1354 fullness_[space] = RoundUp(fullness_[space], Page::kPageSize);
1351 } 1355 }
1352 } 1356 }
1353 int allocation_address = fullness_[space]; 1357 int allocation_address = fullness_[space];
1354 fullness_[space] = allocation_address + size; 1358 fullness_[space] = allocation_address + size;
1355 return allocation_address; 1359 return allocation_address;
1356 } 1360 }
1357 1361
1358 1362
1359 } } // namespace v8::internal 1363 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/scopeinfo.cc ('k') | src/spaces-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698