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

Side by Side Diff: src/snapshot/deserializer.cc

Issue 2090563002: [serializer] encode recent long-encoded root list items as hot objects. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: address comments Created 4 years, 6 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
« no previous file with comments | « src/snapshot/code-serializer.cc ('k') | src/snapshot/partial-serializer.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 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 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/snapshot/deserializer.h" 5 #include "src/snapshot/deserializer.h"
6 6
7 #include "src/bootstrapper.h" 7 #include "src/bootstrapper.h"
8 #include "src/external-reference-table.h" 8 #include "src/external-reference-table.h"
9 #include "src/heap/heap.h" 9 #include "src/heap/heap.h"
10 #include "src/isolate.h" 10 #include "src/isolate.h"
(...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after
468 int skip = source_.GetInt(); \ 468 int skip = source_.GetInt(); \
469 current = reinterpret_cast<Object**>( \ 469 current = reinterpret_cast<Object**>( \
470 reinterpret_cast<Address>(current) + skip); \ 470 reinterpret_cast<Address>(current) + skip); \
471 emit_write_barrier = (space_number == NEW_SPACE); \ 471 emit_write_barrier = (space_number == NEW_SPACE); \
472 new_object = GetBackReferencedObject(data & kSpaceMask); \ 472 new_object = GetBackReferencedObject(data & kSpaceMask); \
473 } else if (where == kRootArray) { \ 473 } else if (where == kRootArray) { \
474 int id = source_.GetInt(); \ 474 int id = source_.GetInt(); \
475 Heap::RootListIndex root_index = static_cast<Heap::RootListIndex>(id); \ 475 Heap::RootListIndex root_index = static_cast<Heap::RootListIndex>(id); \
476 new_object = isolate->heap()->root(root_index); \ 476 new_object = isolate->heap()->root(root_index); \
477 emit_write_barrier = isolate->heap()->InNewSpace(new_object); \ 477 emit_write_barrier = isolate->heap()->InNewSpace(new_object); \
478 hot_objects_.Add(HeapObject::cast(new_object)); \
478 } else if (where == kPartialSnapshotCache) { \ 479 } else if (where == kPartialSnapshotCache) { \
479 int cache_index = source_.GetInt(); \ 480 int cache_index = source_.GetInt(); \
480 new_object = isolate->partial_snapshot_cache()->at(cache_index); \ 481 new_object = isolate->partial_snapshot_cache()->at(cache_index); \
481 emit_write_barrier = isolate->heap()->InNewSpace(new_object); \ 482 emit_write_barrier = isolate->heap()->InNewSpace(new_object); \
482 } else if (where == kExternalReference) { \ 483 } else if (where == kExternalReference) { \
483 int skip = source_.GetInt(); \ 484 int skip = source_.GetInt(); \
484 current = reinterpret_cast<Object**>( \ 485 current = reinterpret_cast<Object**>( \
485 reinterpret_cast<Address>(current) + skip); \ 486 reinterpret_cast<Address>(current) + skip); \
486 int reference_id = source_.GetInt(); \ 487 int reference_id = source_.GetInt(); \
487 Address address = external_reference_table_->address(reference_id); \ 488 Address address = external_reference_table_->address(reference_id); \
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
805 806
806 default: 807 default:
807 CHECK(false); 808 CHECK(false);
808 } 809 }
809 } 810 }
810 CHECK_EQ(limit, current); 811 CHECK_EQ(limit, current);
811 return true; 812 return true;
812 } 813 }
813 } // namespace internal 814 } // namespace internal
814 } // namespace v8 815 } // namespace v8
OLDNEW
« no previous file with comments | « src/snapshot/code-serializer.cc ('k') | src/snapshot/partial-serializer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698