| 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 1305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1316 if (!IsJSArray()) { | 1316 if (!IsJSArray()) { |
| 1317 return true; | 1317 return true; |
| 1318 } | 1318 } |
| 1319 | 1319 |
| 1320 return AllocationSite::GetMode(GetElementsKind()) == | 1320 return AllocationSite::GetMode(GetElementsKind()) == |
| 1321 TRACK_ALLOCATION_SITE; | 1321 TRACK_ALLOCATION_SITE; |
| 1322 } | 1322 } |
| 1323 return false; | 1323 return false; |
| 1324 } | 1324 } |
| 1325 | 1325 |
| 1326 void AllocationSite::Initialize() { |
| 1327 SetElementsKind(GetInitialFastElementsKind()); |
| 1328 set_dependent_code(DependentCode::cast(GetHeap()->empty_fixed_array()), |
| 1329 SKIP_WRITE_BARRIER); |
| 1330 } |
| 1331 |
| 1326 | 1332 |
| 1327 // Heuristic: We only need to create allocation site info if the boilerplate | 1333 // Heuristic: We only need to create allocation site info if the boilerplate |
| 1328 // elements kind is the initial elements kind. | 1334 // elements kind is the initial elements kind. |
| 1329 AllocationSiteMode AllocationSite::GetMode( | 1335 AllocationSiteMode AllocationSite::GetMode( |
| 1330 ElementsKind boilerplate_elements_kind) { | 1336 ElementsKind boilerplate_elements_kind) { |
| 1331 if (FLAG_track_allocation_sites && | 1337 if (FLAG_track_allocation_sites && |
| 1332 IsFastSmiElementsKind(boilerplate_elements_kind)) { | 1338 IsFastSmiElementsKind(boilerplate_elements_kind)) { |
| 1333 return TRACK_ALLOCATION_SITE; | 1339 return TRACK_ALLOCATION_SITE; |
| 1334 } | 1340 } |
| 1335 | 1341 |
| (...skipping 3162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4498 ACCESSORS(ObjectTemplateInfo, constructor, Object, kConstructorOffset) | 4504 ACCESSORS(ObjectTemplateInfo, constructor, Object, kConstructorOffset) |
| 4499 ACCESSORS(ObjectTemplateInfo, internal_field_count, Object, | 4505 ACCESSORS(ObjectTemplateInfo, internal_field_count, Object, |
| 4500 kInternalFieldCountOffset) | 4506 kInternalFieldCountOffset) |
| 4501 | 4507 |
| 4502 ACCESSORS(SignatureInfo, receiver, Object, kReceiverOffset) | 4508 ACCESSORS(SignatureInfo, receiver, Object, kReceiverOffset) |
| 4503 ACCESSORS(SignatureInfo, args, Object, kArgsOffset) | 4509 ACCESSORS(SignatureInfo, args, Object, kArgsOffset) |
| 4504 | 4510 |
| 4505 ACCESSORS(TypeSwitchInfo, types, Object, kTypesOffset) | 4511 ACCESSORS(TypeSwitchInfo, types, Object, kTypesOffset) |
| 4506 | 4512 |
| 4507 ACCESSORS(AllocationSite, transition_info, Object, kTransitionInfoOffset) | 4513 ACCESSORS(AllocationSite, transition_info, Object, kTransitionInfoOffset) |
| 4514 ACCESSORS(AllocationSite, dependent_code, DependentCode, |
| 4515 kDependentCodeOffset) |
| 4508 ACCESSORS(AllocationSite, weak_next, Object, kWeakNextOffset) | 4516 ACCESSORS(AllocationSite, weak_next, Object, kWeakNextOffset) |
| 4509 ACCESSORS(AllocationMemento, allocation_site, Object, kAllocationSiteOffset) | 4517 ACCESSORS(AllocationMemento, allocation_site, Object, kAllocationSiteOffset) |
| 4510 | 4518 |
| 4511 ACCESSORS(Script, source, Object, kSourceOffset) | 4519 ACCESSORS(Script, source, Object, kSourceOffset) |
| 4512 ACCESSORS(Script, name, Object, kNameOffset) | 4520 ACCESSORS(Script, name, Object, kNameOffset) |
| 4513 ACCESSORS(Script, id, Smi, kIdOffset) | 4521 ACCESSORS(Script, id, Smi, kIdOffset) |
| 4514 ACCESSORS_TO_SMI(Script, line_offset, kLineOffsetOffset) | 4522 ACCESSORS_TO_SMI(Script, line_offset, kLineOffsetOffset) |
| 4515 ACCESSORS_TO_SMI(Script, column_offset, kColumnOffsetOffset) | 4523 ACCESSORS_TO_SMI(Script, column_offset, kColumnOffsetOffset) |
| 4516 ACCESSORS(Script, data, Object, kDataOffset) | 4524 ACCESSORS(Script, data, Object, kDataOffset) |
| 4517 ACCESSORS(Script, context_data, Object, kContextOffset) | 4525 ACCESSORS(Script, context_data, Object, kContextOffset) |
| (...skipping 1774 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6292 #undef WRITE_UINT32_FIELD | 6300 #undef WRITE_UINT32_FIELD |
| 6293 #undef READ_SHORT_FIELD | 6301 #undef READ_SHORT_FIELD |
| 6294 #undef WRITE_SHORT_FIELD | 6302 #undef WRITE_SHORT_FIELD |
| 6295 #undef READ_BYTE_FIELD | 6303 #undef READ_BYTE_FIELD |
| 6296 #undef WRITE_BYTE_FIELD | 6304 #undef WRITE_BYTE_FIELD |
| 6297 | 6305 |
| 6298 | 6306 |
| 6299 } } // namespace v8::internal | 6307 } } // namespace v8::internal |
| 6300 | 6308 |
| 6301 #endif // V8_OBJECTS_INL_H_ | 6309 #endif // V8_OBJECTS_INL_H_ |
| OLD | NEW |