Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(525)

Side by Side Diff: src/objects-inl.h

Issue 23567003: Added a DependentCode field to AllocationSite. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Comment updates Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/objects.h ('k') | src/objects-printer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
1316 return true; 1316 return true;
1317 } 1317 }
1318 1318
1319 return AllocationSite::GetMode(GetElementsKind()) == 1319 return AllocationSite::GetMode(GetElementsKind()) ==
1320 TRACK_ALLOCATION_SITE; 1320 TRACK_ALLOCATION_SITE;
1321 } 1321 }
1322 return false; 1322 return false;
1323 } 1323 }
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
1332
1326 // 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
1327 // elements kind is the initial elements kind. 1334 // elements kind is the initial elements kind.
1328 AllocationSiteMode AllocationSite::GetMode( 1335 AllocationSiteMode AllocationSite::GetMode(
1329 ElementsKind boilerplate_elements_kind) { 1336 ElementsKind boilerplate_elements_kind) {
1330 if (FLAG_track_allocation_sites && 1337 if (FLAG_track_allocation_sites &&
1331 IsFastSmiElementsKind(boilerplate_elements_kind)) { 1338 IsFastSmiElementsKind(boilerplate_elements_kind)) {
1332 return TRACK_ALLOCATION_SITE; 1339 return TRACK_ALLOCATION_SITE;
1333 } 1340 }
1334 1341
1335 return DONT_TRACK_ALLOCATION_SITE; 1342 return DONT_TRACK_ALLOCATION_SITE;
(...skipping 3137 matching lines...) Expand 10 before | Expand all | Expand 10 after
4473 ACCESSORS(ObjectTemplateInfo, constructor, Object, kConstructorOffset) 4480 ACCESSORS(ObjectTemplateInfo, constructor, Object, kConstructorOffset)
4474 ACCESSORS(ObjectTemplateInfo, internal_field_count, Object, 4481 ACCESSORS(ObjectTemplateInfo, internal_field_count, Object,
4475 kInternalFieldCountOffset) 4482 kInternalFieldCountOffset)
4476 4483
4477 ACCESSORS(SignatureInfo, receiver, Object, kReceiverOffset) 4484 ACCESSORS(SignatureInfo, receiver, Object, kReceiverOffset)
4478 ACCESSORS(SignatureInfo, args, Object, kArgsOffset) 4485 ACCESSORS(SignatureInfo, args, Object, kArgsOffset)
4479 4486
4480 ACCESSORS(TypeSwitchInfo, types, Object, kTypesOffset) 4487 ACCESSORS(TypeSwitchInfo, types, Object, kTypesOffset)
4481 4488
4482 ACCESSORS(AllocationSite, transition_info, Object, kTransitionInfoOffset) 4489 ACCESSORS(AllocationSite, transition_info, Object, kTransitionInfoOffset)
4490 ACCESSORS(AllocationSite, dependent_code, DependentCode,
4491 kDependentCodeOffset)
4483 ACCESSORS(AllocationSite, weak_next, Object, kWeakNextOffset) 4492 ACCESSORS(AllocationSite, weak_next, Object, kWeakNextOffset)
4484 ACCESSORS(AllocationMemento, allocation_site, Object, kAllocationSiteOffset) 4493 ACCESSORS(AllocationMemento, allocation_site, Object, kAllocationSiteOffset)
4485 4494
4486 ACCESSORS(Script, source, Object, kSourceOffset) 4495 ACCESSORS(Script, source, Object, kSourceOffset)
4487 ACCESSORS(Script, name, Object, kNameOffset) 4496 ACCESSORS(Script, name, Object, kNameOffset)
4488 ACCESSORS(Script, id, Smi, kIdOffset) 4497 ACCESSORS(Script, id, Smi, kIdOffset)
4489 ACCESSORS_TO_SMI(Script, line_offset, kLineOffsetOffset) 4498 ACCESSORS_TO_SMI(Script, line_offset, kLineOffsetOffset)
4490 ACCESSORS_TO_SMI(Script, column_offset, kColumnOffsetOffset) 4499 ACCESSORS_TO_SMI(Script, column_offset, kColumnOffsetOffset)
4491 ACCESSORS(Script, data, Object, kDataOffset) 4500 ACCESSORS(Script, data, Object, kDataOffset)
4492 ACCESSORS(Script, context_data, Object, kContextOffset) 4501 ACCESSORS(Script, context_data, Object, kContextOffset)
(...skipping 1791 matching lines...) Expand 10 before | Expand all | Expand 10 after
6284 #undef WRITE_UINT32_FIELD 6293 #undef WRITE_UINT32_FIELD
6285 #undef READ_SHORT_FIELD 6294 #undef READ_SHORT_FIELD
6286 #undef WRITE_SHORT_FIELD 6295 #undef WRITE_SHORT_FIELD
6287 #undef READ_BYTE_FIELD 6296 #undef READ_BYTE_FIELD
6288 #undef WRITE_BYTE_FIELD 6297 #undef WRITE_BYTE_FIELD
6289 6298
6290 6299
6291 } } // namespace v8::internal 6300 } } // namespace v8::internal
6292 6301
6293 #endif // V8_OBJECTS_INL_H_ 6302 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « src/objects.h ('k') | src/objects-printer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698