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

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

Issue 2490783004: [serializer] small fixes for blink snapshot. (Closed)
Patch Set: rebase and fix Created 4 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
« no previous file with comments | « src/isolate.h ('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 510 matching lines...) Expand 10 before | Expand all | Expand 10 after
521 emit_write_barrier = isolate->heap()->InNewSpace(new_object); \ 521 emit_write_barrier = isolate->heap()->InNewSpace(new_object); \
522 hot_objects_.Add(HeapObject::cast(new_object)); \ 522 hot_objects_.Add(HeapObject::cast(new_object)); \
523 } else if (where == kPartialSnapshotCache) { \ 523 } else if (where == kPartialSnapshotCache) { \
524 int cache_index = source_.GetInt(); \ 524 int cache_index = source_.GetInt(); \
525 new_object = isolate->partial_snapshot_cache()->at(cache_index); \ 525 new_object = isolate->partial_snapshot_cache()->at(cache_index); \
526 emit_write_barrier = isolate->heap()->InNewSpace(new_object); \ 526 emit_write_barrier = isolate->heap()->InNewSpace(new_object); \
527 } else if (where == kExternalReference) { \ 527 } else if (where == kExternalReference) { \
528 int skip = source_.GetInt(); \ 528 int skip = source_.GetInt(); \
529 current = reinterpret_cast<Object**>( \ 529 current = reinterpret_cast<Object**>( \
530 reinterpret_cast<Address>(current) + skip); \ 530 reinterpret_cast<Address>(current) + skip); \
531 int reference_id = source_.GetInt(); \ 531 uint32_t reference_id = static_cast<uint32_t>(source_.GetInt()); \
532 Address address = external_reference_table_->address(reference_id); \ 532 Address address = external_reference_table_->address(reference_id); \
533 new_object = reinterpret_cast<Object*>(address); \ 533 new_object = reinterpret_cast<Object*>(address); \
534 } else if (where == kAttachedReference) { \ 534 } else if (where == kAttachedReference) { \
535 int index = source_.GetInt(); \ 535 int index = source_.GetInt(); \
536 new_object = *attached_objects_[index]; \ 536 new_object = *attached_objects_[index]; \
537 emit_write_barrier = isolate->heap()->InNewSpace(new_object); \ 537 emit_write_barrier = isolate->heap()->InNewSpace(new_object); \
538 } else { \ 538 } else { \
539 DCHECK(where == kBuiltin); \ 539 DCHECK(where == kBuiltin); \
540 DCHECK(deserializing_user_code()); \ 540 DCHECK(deserializing_user_code()); \
541 int builtin_id = source_.GetInt(); \ 541 int builtin_id = source_.GetInt(); \
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
851 851
852 default: 852 default:
853 CHECK(false); 853 CHECK(false);
854 } 854 }
855 } 855 }
856 CHECK_EQ(limit, current); 856 CHECK_EQ(limit, current);
857 return true; 857 return true;
858 } 858 }
859 } // namespace internal 859 } // namespace internal
860 } // namespace v8 860 } // namespace v8
OLDNEW
« no previous file with comments | « src/isolate.h ('k') | src/snapshot/partial-serializer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698