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

Side by Side Diff: src/serialize.cc

Issue 16641003: Unify processing of weak lists in heap.cc (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: CR feedback Created 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 669 matching lines...) Expand 10 before | Expand all | Expand 10 after
680 // No active handles. 680 // No active handles.
681 ASSERT(isolate_->handle_scope_implementer()->blocks()->is_empty()); 681 ASSERT(isolate_->handle_scope_implementer()->blocks()->is_empty());
682 ASSERT_EQ(NULL, external_reference_decoder_); 682 ASSERT_EQ(NULL, external_reference_decoder_);
683 external_reference_decoder_ = new ExternalReferenceDecoder(); 683 external_reference_decoder_ = new ExternalReferenceDecoder();
684 isolate_->heap()->IterateStrongRoots(this, VISIT_ONLY_STRONG); 684 isolate_->heap()->IterateStrongRoots(this, VISIT_ONLY_STRONG);
685 isolate_->heap()->RepairFreeListsAfterBoot(); 685 isolate_->heap()->RepairFreeListsAfterBoot();
686 isolate_->heap()->IterateWeakRoots(this, VISIT_ALL); 686 isolate_->heap()->IterateWeakRoots(this, VISIT_ALL);
687 687
688 isolate_->heap()->set_native_contexts_list( 688 isolate_->heap()->set_native_contexts_list(
689 isolate_->heap()->undefined_value()); 689 isolate_->heap()->undefined_value());
690 isolate_->heap()->set_array_buffers_list(
691 isolate_->heap()->undefined_value());
690 692
691 // Update data pointers to the external strings containing natives sources. 693 // Update data pointers to the external strings containing natives sources.
692 for (int i = 0; i < Natives::GetBuiltinsCount(); i++) { 694 for (int i = 0; i < Natives::GetBuiltinsCount(); i++) {
693 Object* source = isolate_->heap()->natives_source_cache()->get(i); 695 Object* source = isolate_->heap()->natives_source_cache()->get(i);
694 if (!source->IsUndefined()) { 696 if (!source->IsUndefined()) {
695 ExternalAsciiString::cast(source)->update_data_cache(); 697 ExternalAsciiString::cast(source)->update_data_cache();
696 } 698 }
697 } 699 }
698 700
699 // Issue code events for newly deserialized code objects. 701 // Issue code events for newly deserialized code objects.
(...skipping 985 matching lines...) Expand 10 before | Expand all | Expand 10 after
1685 1687
1686 bool SnapshotByteSource::AtEOF() { 1688 bool SnapshotByteSource::AtEOF() {
1687 if (0u + length_ - position_ > 2 * sizeof(uint32_t)) return false; 1689 if (0u + length_ - position_ > 2 * sizeof(uint32_t)) return false;
1688 for (int x = position_; x < length_; x++) { 1690 for (int x = position_; x < length_; x++) {
1689 if (data_[x] != SerializerDeserializer::nop()) return false; 1691 if (data_[x] != SerializerDeserializer::nop()) return false;
1690 } 1692 }
1691 return true; 1693 return true;
1692 } 1694 }
1693 1695
1694 } } // namespace v8::internal 1696 } } // namespace v8::internal
OLDNEW
« src/heap.cc ('K') | « src/runtime.cc ('k') | test/cctest/test-weaktypedarrays.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698