OLD | NEW |
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 3022 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3033 MaybeObject* maybe_result = | 3033 MaybeObject* maybe_result = |
3034 AllocateRaw(size, PROPERTY_CELL_SPACE, PROPERTY_CELL_SPACE); | 3034 AllocateRaw(size, PROPERTY_CELL_SPACE, PROPERTY_CELL_SPACE); |
3035 if (!maybe_result->ToObject(&result)) return maybe_result; | 3035 if (!maybe_result->ToObject(&result)) return maybe_result; |
3036 | 3036 |
3037 HeapObject::cast(result)->set_map_no_write_barrier( | 3037 HeapObject::cast(result)->set_map_no_write_barrier( |
3038 global_property_cell_map()); | 3038 global_property_cell_map()); |
3039 PropertyCell* cell = PropertyCell::cast(result); | 3039 PropertyCell* cell = PropertyCell::cast(result); |
3040 cell->set_dependent_code(DependentCode::cast(empty_fixed_array()), | 3040 cell->set_dependent_code(DependentCode::cast(empty_fixed_array()), |
3041 SKIP_WRITE_BARRIER); | 3041 SKIP_WRITE_BARRIER); |
3042 cell->set_value(the_hole_value()); | 3042 cell->set_value(the_hole_value()); |
3043 cell->set_type(Type::None()); | 3043 cell->set_type(HeapType::None()); |
3044 return result; | 3044 return result; |
3045 } | 3045 } |
3046 | 3046 |
3047 | 3047 |
3048 MaybeObject* Heap::AllocateBox(Object* value, PretenureFlag pretenure) { | 3048 MaybeObject* Heap::AllocateBox(Object* value, PretenureFlag pretenure) { |
3049 Box* result; | 3049 Box* result; |
3050 MaybeObject* maybe_result = AllocateStruct(BOX_TYPE); | 3050 MaybeObject* maybe_result = AllocateStruct(BOX_TYPE); |
3051 if (!maybe_result->To(&result)) return maybe_result; | 3051 if (!maybe_result->To(&result)) return maybe_result; |
3052 result->set_value(value); | 3052 result->set_value(value); |
3053 return result; | 3053 return result; |
(...skipping 4908 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7962 static_cast<int>(object_sizes_last_time_[index])); | 7962 static_cast<int>(object_sizes_last_time_[index])); |
7963 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) | 7963 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) |
7964 #undef ADJUST_LAST_TIME_OBJECT_COUNT | 7964 #undef ADJUST_LAST_TIME_OBJECT_COUNT |
7965 | 7965 |
7966 OS::MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); | 7966 OS::MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); |
7967 OS::MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); | 7967 OS::MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); |
7968 ClearObjectStats(); | 7968 ClearObjectStats(); |
7969 } | 7969 } |
7970 | 7970 |
7971 } } // namespace v8::internal | 7971 } } // namespace v8::internal |
OLD | NEW |