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 1314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1325 return AllocationSite::GetMode(GetElementsKind()) == | 1325 return AllocationSite::GetMode(GetElementsKind()) == |
1326 TRACK_ALLOCATION_SITE; | 1326 TRACK_ALLOCATION_SITE; |
1327 } | 1327 } |
1328 return false; | 1328 return false; |
1329 } | 1329 } |
1330 | 1330 |
1331 | 1331 |
1332 void AllocationSite::Initialize() { | 1332 void AllocationSite::Initialize() { |
1333 SetElementsKind(GetInitialFastElementsKind()); | 1333 SetElementsKind(GetInitialFastElementsKind()); |
1334 set_nested_site(Smi::FromInt(0)); | 1334 set_nested_site(Smi::FromInt(0)); |
| 1335 set_memento_create_count(Smi::FromInt(0)); |
| 1336 set_memento_found_count(Smi::FromInt(0)); |
| 1337 set_pretenure_decision(Smi::FromInt(0)); |
1335 set_dependent_code(DependentCode::cast(GetHeap()->empty_fixed_array()), | 1338 set_dependent_code(DependentCode::cast(GetHeap()->empty_fixed_array()), |
1336 SKIP_WRITE_BARRIER); | 1339 SKIP_WRITE_BARRIER); |
1337 } | 1340 } |
1338 | 1341 |
1339 | 1342 |
1340 // Heuristic: We only need to create allocation site info if the boilerplate | 1343 // Heuristic: We only need to create allocation site info if the boilerplate |
1341 // elements kind is the initial elements kind. | 1344 // elements kind is the initial elements kind. |
1342 AllocationSiteMode AllocationSite::GetMode( | 1345 AllocationSiteMode AllocationSite::GetMode( |
1343 ElementsKind boilerplate_elements_kind) { | 1346 ElementsKind boilerplate_elements_kind) { |
1344 if (FLAG_track_allocation_sites && | 1347 if (FLAG_track_allocation_sites && |
(...skipping 3200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4545 ACCESSORS(ObjectTemplateInfo, internal_field_count, Object, | 4548 ACCESSORS(ObjectTemplateInfo, internal_field_count, Object, |
4546 kInternalFieldCountOffset) | 4549 kInternalFieldCountOffset) |
4547 | 4550 |
4548 ACCESSORS(SignatureInfo, receiver, Object, kReceiverOffset) | 4551 ACCESSORS(SignatureInfo, receiver, Object, kReceiverOffset) |
4549 ACCESSORS(SignatureInfo, args, Object, kArgsOffset) | 4552 ACCESSORS(SignatureInfo, args, Object, kArgsOffset) |
4550 | 4553 |
4551 ACCESSORS(TypeSwitchInfo, types, Object, kTypesOffset) | 4554 ACCESSORS(TypeSwitchInfo, types, Object, kTypesOffset) |
4552 | 4555 |
4553 ACCESSORS(AllocationSite, transition_info, Object, kTransitionInfoOffset) | 4556 ACCESSORS(AllocationSite, transition_info, Object, kTransitionInfoOffset) |
4554 ACCESSORS(AllocationSite, nested_site, Object, kNestedSiteOffset) | 4557 ACCESSORS(AllocationSite, nested_site, Object, kNestedSiteOffset) |
| 4558 ACCESSORS_TO_SMI(AllocationSite, memento_found_count, kMementoFoundCountOffset) |
| 4559 ACCESSORS_TO_SMI(AllocationSite, memento_create_count, |
| 4560 kMementoCreateCountOffset) |
| 4561 ACCESSORS_TO_SMI(AllocationSite, pretenure_decision, kPretenureDecisionOffset) |
4555 ACCESSORS(AllocationSite, dependent_code, DependentCode, | 4562 ACCESSORS(AllocationSite, dependent_code, DependentCode, |
4556 kDependentCodeOffset) | 4563 kDependentCodeOffset) |
4557 ACCESSORS(AllocationSite, weak_next, Object, kWeakNextOffset) | 4564 ACCESSORS(AllocationSite, weak_next, Object, kWeakNextOffset) |
4558 ACCESSORS(AllocationMemento, allocation_site, Object, kAllocationSiteOffset) | 4565 ACCESSORS(AllocationMemento, allocation_site, Object, kAllocationSiteOffset) |
4559 | 4566 |
4560 ACCESSORS(Script, source, Object, kSourceOffset) | 4567 ACCESSORS(Script, source, Object, kSourceOffset) |
4561 ACCESSORS(Script, name, Object, kNameOffset) | 4568 ACCESSORS(Script, name, Object, kNameOffset) |
4562 ACCESSORS(Script, id, Smi, kIdOffset) | 4569 ACCESSORS(Script, id, Smi, kIdOffset) |
4563 ACCESSORS_TO_SMI(Script, line_offset, kLineOffsetOffset) | 4570 ACCESSORS_TO_SMI(Script, line_offset, kLineOffsetOffset) |
4564 ACCESSORS_TO_SMI(Script, column_offset, kColumnOffsetOffset) | 4571 ACCESSORS_TO_SMI(Script, column_offset, kColumnOffsetOffset) |
(...skipping 1828 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6393 #undef WRITE_UINT32_FIELD | 6400 #undef WRITE_UINT32_FIELD |
6394 #undef READ_SHORT_FIELD | 6401 #undef READ_SHORT_FIELD |
6395 #undef WRITE_SHORT_FIELD | 6402 #undef WRITE_SHORT_FIELD |
6396 #undef READ_BYTE_FIELD | 6403 #undef READ_BYTE_FIELD |
6397 #undef WRITE_BYTE_FIELD | 6404 #undef WRITE_BYTE_FIELD |
6398 | 6405 |
6399 | 6406 |
6400 } } // namespace v8::internal | 6407 } } // namespace v8::internal |
6401 | 6408 |
6402 #endif // V8_OBJECTS_INL_H_ | 6409 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |