| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |