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

Side by Side Diff: src/heap/heap.cc

Issue 1156993018: GlobalDictionary now stores PropertyDetails in PropertyCells. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comments Created 5 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/heap-snapshot-generator.cc ('k') | src/lookup-inl.h » ('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 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/bits.h" 9 #include "src/base/bits.h"
10 #include "src/base/once.h" 10 #include "src/base/once.h"
(...skipping 2896 matching lines...) Expand 10 before | Expand all | Expand 10 after
2907 STATIC_ASSERT(PropertyCell::kSize <= Page::kMaxRegularHeapObjectSize); 2907 STATIC_ASSERT(PropertyCell::kSize <= Page::kMaxRegularHeapObjectSize);
2908 2908
2909 HeapObject* result; 2909 HeapObject* result;
2910 AllocationResult allocation = AllocateRaw(size, OLD_SPACE, OLD_SPACE); 2910 AllocationResult allocation = AllocateRaw(size, OLD_SPACE, OLD_SPACE);
2911 if (!allocation.To(&result)) return allocation; 2911 if (!allocation.To(&result)) return allocation;
2912 2912
2913 result->set_map_no_write_barrier(global_property_cell_map()); 2913 result->set_map_no_write_barrier(global_property_cell_map());
2914 PropertyCell* cell = PropertyCell::cast(result); 2914 PropertyCell* cell = PropertyCell::cast(result);
2915 cell->set_dependent_code(DependentCode::cast(empty_fixed_array()), 2915 cell->set_dependent_code(DependentCode::cast(empty_fixed_array()),
2916 SKIP_WRITE_BARRIER); 2916 SKIP_WRITE_BARRIER);
2917 cell->set_property_details(PropertyDetails(Smi::FromInt(0)));
2917 cell->set_value(the_hole_value()); 2918 cell->set_value(the_hole_value());
2918 return result; 2919 return result;
2919 } 2920 }
2920 2921
2921 2922
2922 AllocationResult Heap::AllocateWeakCell(HeapObject* value) { 2923 AllocationResult Heap::AllocateWeakCell(HeapObject* value) {
2923 int size = WeakCell::kSize; 2924 int size = WeakCell::kSize;
2924 STATIC_ASSERT(WeakCell::kSize <= Page::kMaxRegularHeapObjectSize); 2925 STATIC_ASSERT(WeakCell::kSize <= Page::kMaxRegularHeapObjectSize);
2925 HeapObject* result = NULL; 2926 HeapObject* result = NULL;
2926 { 2927 {
(...skipping 3738 matching lines...) Expand 10 before | Expand all | Expand 10 after
6665 *object_type = "CODE_TYPE"; \ 6666 *object_type = "CODE_TYPE"; \
6666 *object_sub_type = "CODE_AGE/" #name; \ 6667 *object_sub_type = "CODE_AGE/" #name; \
6667 return true; 6668 return true;
6668 CODE_AGE_LIST_COMPLETE(COMPARE_AND_RETURN_NAME) 6669 CODE_AGE_LIST_COMPLETE(COMPARE_AND_RETURN_NAME)
6669 #undef COMPARE_AND_RETURN_NAME 6670 #undef COMPARE_AND_RETURN_NAME
6670 } 6671 }
6671 return false; 6672 return false;
6672 } 6673 }
6673 } 6674 }
6674 } // namespace v8::internal 6675 } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/heap-snapshot-generator.cc ('k') | src/lookup-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698