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 1296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1307 TRACK_ALLOCATION_SITE; | 1307 TRACK_ALLOCATION_SITE; |
1308 } | 1308 } |
1309 return false; | 1309 return false; |
1310 } | 1310 } |
1311 | 1311 |
1312 | 1312 |
1313 void AllocationSite::Initialize() { | 1313 void AllocationSite::Initialize() { |
1314 set_transition_info(Smi::FromInt(0)); | 1314 set_transition_info(Smi::FromInt(0)); |
1315 SetElementsKind(GetInitialFastElementsKind()); | 1315 SetElementsKind(GetInitialFastElementsKind()); |
1316 set_nested_site(Smi::FromInt(0)); | 1316 set_nested_site(Smi::FromInt(0)); |
| 1317 set_memento_create_count(Smi::FromInt(0)); |
| 1318 set_memento_found_count(Smi::FromInt(0)); |
| 1319 set_pretenure_decision(Smi::FromInt(0)); |
1317 set_dependent_code(DependentCode::cast(GetHeap()->empty_fixed_array()), | 1320 set_dependent_code(DependentCode::cast(GetHeap()->empty_fixed_array()), |
1318 SKIP_WRITE_BARRIER); | 1321 SKIP_WRITE_BARRIER); |
1319 } | 1322 } |
1320 | 1323 |
1321 | 1324 |
1322 // Heuristic: We only need to create allocation site info if the boilerplate | 1325 // Heuristic: We only need to create allocation site info if the boilerplate |
1323 // elements kind is the initial elements kind. | 1326 // elements kind is the initial elements kind. |
1324 AllocationSiteMode AllocationSite::GetMode( | 1327 AllocationSiteMode AllocationSite::GetMode( |
1325 ElementsKind boilerplate_elements_kind) { | 1328 ElementsKind boilerplate_elements_kind) { |
1326 if (FLAG_track_allocation_sites && | 1329 if (FLAG_track_allocation_sites && |
(...skipping 3218 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 1846 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6411 #undef WRITE_UINT32_FIELD | 6418 #undef WRITE_UINT32_FIELD |
6412 #undef READ_SHORT_FIELD | 6419 #undef READ_SHORT_FIELD |
6413 #undef WRITE_SHORT_FIELD | 6420 #undef WRITE_SHORT_FIELD |
6414 #undef READ_BYTE_FIELD | 6421 #undef READ_BYTE_FIELD |
6415 #undef WRITE_BYTE_FIELD | 6422 #undef WRITE_BYTE_FIELD |
6416 | 6423 |
6417 | 6424 |
6418 } } // namespace v8::internal | 6425 } } // namespace v8::internal |
6419 | 6426 |
6420 #endif // V8_OBJECTS_INL_H_ | 6427 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |