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

Side by Side Diff: src/serialize.cc

Issue 565047: * Add the partial context snapshot to the VM executable if... (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
« src/api.cc ('K') | « src/serialize.h ('k') | src/snapshot.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 647 matching lines...) Expand 10 before | Expand all | Expand 10 after
658 case (base_tag) + kLargeCode: /* NOLINT */ \ 658 case (base_tag) + kLargeCode: /* NOLINT */ \
659 case (base_tag) + kLargeFixedArray: /* NOLINT */ 659 case (base_tag) + kLargeFixedArray: /* NOLINT */
660 660
661 661
662 void Deserializer::ReadChunk(Object** current, 662 void Deserializer::ReadChunk(Object** current,
663 Object** limit, 663 Object** limit,
664 int space, 664 int space,
665 Address address) { 665 Address address) {
666 while (current < limit) { 666 while (current < limit) {
667 int data = source_->Get(); 667 int data = source_->Get();
668 Trace("Tag", data);
669 switch (data) { 668 switch (data) {
670 #define RAW_CASE(index, size) \ 669 #define RAW_CASE(index, size) \
671 case RAW_DATA_SERIALIZATION + index: { \ 670 case RAW_DATA_SERIALIZATION + index: { \
672 byte* raw_data_out = reinterpret_cast<byte*>(current); \ 671 byte* raw_data_out = reinterpret_cast<byte*>(current); \
673 source_->CopyRaw(raw_data_out, size); \ 672 source_->CopyRaw(raw_data_out, size); \
674 current = reinterpret_cast<Object**>(raw_data_out + size); \ 673 current = reinterpret_cast<Object**>(raw_data_out + size); \
675 break; \ 674 break; \
676 } 675 }
677 COMMON_RAW_LENGTHS(RAW_CASE) 676 COMMON_RAW_LENGTHS(RAW_CASE)
678 #undef RAW_CASE 677 #undef RAW_CASE
(...skipping 673 matching lines...) Expand 10 before | Expand all | Expand 10 after
1352 if (used_in_this_page + size > Page::kObjectAreaSize) { 1351 if (used_in_this_page + size > Page::kObjectAreaSize) {
1353 *new_page = true; 1352 *new_page = true;
1354 fullness_[space] = RoundUp(fullness_[space], Page::kPageSize); 1353 fullness_[space] = RoundUp(fullness_[space], Page::kPageSize);
1355 } 1354 }
1356 } 1355 }
1357 int allocation_address = fullness_[space]; 1356 int allocation_address = fullness_[space];
1358 fullness_[space] = allocation_address + size; 1357 fullness_[space] = allocation_address + size;
1359 return allocation_address; 1358 return allocation_address;
1360 } 1359 }
1361 1360
1362 bool SerializerDeserializer::tracing_;
1363
1364 1361
1365 } } // namespace v8::internal 1362 } } // namespace v8::internal
OLDNEW
« src/api.cc ('K') | « src/serialize.h ('k') | src/snapshot.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698