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

Side by Side Diff: src/serialize.cc

Issue 688853007: Implement aging of maps embedded in optimized code. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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 | 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 // 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/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/api.h" 8 #include "src/api.h"
9 #include "src/base/platform/platform.h" 9 #include "src/base/platform/platform.h"
10 #include "src/bootstrapper.h" 10 #include "src/bootstrapper.h"
(...skipping 650 matching lines...) Expand 10 before | Expand all | Expand 10 after
661 661
662 // The allocation site list is build during root iteration, but if no sites 662 // The allocation site list is build during root iteration, but if no sites
663 // were encountered then it needs to be initialized to undefined. 663 // were encountered then it needs to be initialized to undefined.
664 if (isolate_->heap()->allocation_sites_list() == Smi::FromInt(0)) { 664 if (isolate_->heap()->allocation_sites_list() == Smi::FromInt(0)) {
665 isolate_->heap()->set_allocation_sites_list( 665 isolate_->heap()->set_allocation_sites_list(
666 isolate_->heap()->undefined_value()); 666 isolate_->heap()->undefined_value());
667 } 667 }
668 668
669 isolate_->heap()->InitializeWeakObjectToCodeTable(); 669 isolate_->heap()->InitializeWeakObjectToCodeTable();
670 670
671 isolate_->heap()->InitializeEmbeddedMapCache();
672
671 // Update data pointers to the external strings containing natives sources. 673 // Update data pointers to the external strings containing natives sources.
672 for (int i = 0; i < Natives::GetBuiltinsCount(); i++) { 674 for (int i = 0; i < Natives::GetBuiltinsCount(); i++) {
673 Object* source = isolate_->heap()->natives_source_cache()->get(i); 675 Object* source = isolate_->heap()->natives_source_cache()->get(i);
674 if (!source->IsUndefined()) { 676 if (!source->IsUndefined()) {
675 ExternalOneByteString::cast(source)->update_data_cache(); 677 ExternalOneByteString::cast(source)->update_data_cache();
676 } 678 }
677 } 679 }
678 680
679 FlushICacheForNewCodeObjects(); 681 FlushICacheForNewCodeObjects();
680 682
(...skipping 1635 matching lines...) Expand 10 before | Expand all | Expand 10 after
2316 2318
2317 int SerializedCodeData::CheckSum(String* string) { 2319 int SerializedCodeData::CheckSum(String* string) {
2318 int checksum = Version::Hash(); 2320 int checksum = Version::Hash();
2319 #ifdef DEBUG 2321 #ifdef DEBUG
2320 uint32_t seed = static_cast<uint32_t>(checksum); 2322 uint32_t seed = static_cast<uint32_t>(checksum);
2321 checksum = static_cast<int>(IteratingStringHasher::Hash(string, seed)); 2323 checksum = static_cast<int>(IteratingStringHasher::Hash(string, seed));
2322 #endif // DEBUG 2324 #endif // DEBUG
2323 return checksum; 2325 return checksum;
2324 } 2326 }
2325 } } // namespace v8::internal 2327 } } // namespace v8::internal
OLDNEW
« src/objects-inl.h ('K') | « src/objects-inl.h ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698