Chromium Code Reviews

Side by Side Diff: src/serialize.cc

Issue 1016803002: Remove PropertyCell space (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
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 837 matching lines...)
848 848
849 void Deserializer::ReadData(Object** current, Object** limit, int source_space, 849 void Deserializer::ReadData(Object** current, Object** limit, int source_space,
850 Address current_object_address) { 850 Address current_object_address) {
851 Isolate* const isolate = isolate_; 851 Isolate* const isolate = isolate_;
852 // Write barrier support costs around 1% in startup time. In fact there 852 // Write barrier support costs around 1% in startup time. In fact there
853 // are no new space objects in current boot snapshots, so it's not needed, 853 // are no new space objects in current boot snapshots, so it's not needed,
854 // but that may change. 854 // but that may change.
855 bool write_barrier_needed = (current_object_address != NULL && 855 bool write_barrier_needed = (current_object_address != NULL &&
856 source_space != NEW_SPACE && 856 source_space != NEW_SPACE &&
857 source_space != CELL_SPACE && 857 source_space != CELL_SPACE &&
858 source_space != PROPERTY_CELL_SPACE &&
859 source_space != CODE_SPACE && 858 source_space != CODE_SPACE &&
860 source_space != OLD_DATA_SPACE); 859 source_space != OLD_DATA_SPACE);
861 while (current < limit) { 860 while (current < limit) {
862 byte data = source_.Get(); 861 byte data = source_.Get();
863 switch (data) { 862 switch (data) {
864 #define CASE_STATEMENT(where, how, within, space_number) \ 863 #define CASE_STATEMENT(where, how, within, space_number) \
865 case where + how + within + space_number: \ 864 case where + how + within + space_number: \
866 STATIC_ASSERT((where & ~kPointedToMask) == 0); \ 865 STATIC_ASSERT((where & ~kPointedToMask) == 0); \
867 STATIC_ASSERT((how & ~kHowToCodeMask) == 0); \ 866 STATIC_ASSERT((how & ~kHowToCodeMask) == 0); \
868 STATIC_ASSERT((within & ~kWhereToPointMask) == 0); \ 867 STATIC_ASSERT((within & ~kWhereToPointMask) == 0); \
(...skipping 92 matching lines...)
961 // write barrier handling) and handles the other spaces with 8 fall-through 960 // write barrier handling) and handles the other spaces with 8 fall-through
962 // cases and one body. 961 // cases and one body.
963 #define ALL_SPACES(where, how, within) \ 962 #define ALL_SPACES(where, how, within) \
964 CASE_STATEMENT(where, how, within, NEW_SPACE) \ 963 CASE_STATEMENT(where, how, within, NEW_SPACE) \
965 CASE_BODY(where, how, within, NEW_SPACE) \ 964 CASE_BODY(where, how, within, NEW_SPACE) \
966 CASE_STATEMENT(where, how, within, OLD_DATA_SPACE) \ 965 CASE_STATEMENT(where, how, within, OLD_DATA_SPACE) \
967 CASE_STATEMENT(where, how, within, OLD_POINTER_SPACE) \ 966 CASE_STATEMENT(where, how, within, OLD_POINTER_SPACE) \
968 CASE_STATEMENT(where, how, within, CODE_SPACE) \ 967 CASE_STATEMENT(where, how, within, CODE_SPACE) \
969 CASE_STATEMENT(where, how, within, MAP_SPACE) \ 968 CASE_STATEMENT(where, how, within, MAP_SPACE) \
970 CASE_STATEMENT(where, how, within, CELL_SPACE) \ 969 CASE_STATEMENT(where, how, within, CELL_SPACE) \
971 CASE_STATEMENT(where, how, within, PROPERTY_CELL_SPACE) \
972 CASE_STATEMENT(where, how, within, LO_SPACE) \ 970 CASE_STATEMENT(where, how, within, LO_SPACE) \
973 CASE_BODY(where, how, within, kAnyOldSpace) 971 CASE_BODY(where, how, within, kAnyOldSpace)
974 972
975 #define FOUR_CASES(byte_code) \ 973 #define FOUR_CASES(byte_code) \
976 case byte_code: \ 974 case byte_code: \
977 case byte_code + 1: \ 975 case byte_code + 1: \
978 case byte_code + 2: \ 976 case byte_code + 2: \
979 case byte_code + 3: 977 case byte_code + 3:
980 978
981 #define SIXTEEN_CASES(byte_code) \ 979 #define SIXTEEN_CASES(byte_code) \
(...skipping 1578 matching lines...)
2560 DisallowHeapAllocation no_gc; 2558 DisallowHeapAllocation no_gc;
2561 SerializedCodeData* scd = new SerializedCodeData(cached_data); 2559 SerializedCodeData* scd = new SerializedCodeData(cached_data);
2562 SanityCheckResult r = scd->SanityCheck(isolate, source); 2560 SanityCheckResult r = scd->SanityCheck(isolate, source);
2563 if (r == CHECK_SUCCESS) return scd; 2561 if (r == CHECK_SUCCESS) return scd;
2564 cached_data->Reject(); 2562 cached_data->Reject();
2565 source->GetIsolate()->counters()->code_cache_reject_reason()->AddSample(r); 2563 source->GetIsolate()->counters()->code_cache_reject_reason()->AddSample(r);
2566 delete scd; 2564 delete scd;
2567 return NULL; 2565 return NULL;
2568 } 2566 }
2569 } } // namespace v8::internal 2567 } } // namespace v8::internal
OLDNEW
« src/objects-inl.h ('K') | « src/objects-inl.h ('k') | src/x64/lithium-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine