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

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: REBASE 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
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 1303 matching lines...) Expand 10 before | Expand all | Expand 10 after
1314 if (AllocationSite::CanTrack(map()->instance_type())) { 1314 if (AllocationSite::CanTrack(map()->instance_type())) {
1315 if (!IsJSArray()) { 1315 if (!IsJSArray()) {
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
Michael Starzinger 2013/09/19 13:56:17 nit: Two empty newlines.
1325 void AllocationSite::Initialize() {
1326 SetElementsKind(GetInitialFastElementsKind());
1327 set_dependent_code(DependentCode::cast(GetHeap()->empty_fixed_array()),
1328 SKIP_WRITE_BARRIER);
1329 }
1330
1325 1331
1326 // Heuristic: We only need to create allocation site info if the boilerplate 1332 // Heuristic: We only need to create allocation site info if the boilerplate
1327 // elements kind is the initial elements kind. 1333 // elements kind is the initial elements kind.
1328 AllocationSiteMode AllocationSite::GetMode( 1334 AllocationSiteMode AllocationSite::GetMode(
1329 ElementsKind boilerplate_elements_kind) { 1335 ElementsKind boilerplate_elements_kind) {
1330 if (FLAG_track_allocation_sites && 1336 if (FLAG_track_allocation_sites &&
1331 IsFastSmiElementsKind(boilerplate_elements_kind)) { 1337 IsFastSmiElementsKind(boilerplate_elements_kind)) {
1332 return TRACK_ALLOCATION_SITE; 1338 return TRACK_ALLOCATION_SITE;
1333 } 1339 }
1334 1340
(...skipping 3138 matching lines...) Expand 10 before | Expand all | Expand 10 after
4473 ACCESSORS(ObjectTemplateInfo, constructor, Object, kConstructorOffset) 4479 ACCESSORS(ObjectTemplateInfo, constructor, Object, kConstructorOffset)
4474 ACCESSORS(ObjectTemplateInfo, internal_field_count, Object, 4480 ACCESSORS(ObjectTemplateInfo, internal_field_count, Object,
4475 kInternalFieldCountOffset) 4481 kInternalFieldCountOffset)
4476 4482
4477 ACCESSORS(SignatureInfo, receiver, Object, kReceiverOffset) 4483 ACCESSORS(SignatureInfo, receiver, Object, kReceiverOffset)
4478 ACCESSORS(SignatureInfo, args, Object, kArgsOffset) 4484 ACCESSORS(SignatureInfo, args, Object, kArgsOffset)
4479 4485
4480 ACCESSORS(TypeSwitchInfo, types, Object, kTypesOffset) 4486 ACCESSORS(TypeSwitchInfo, types, Object, kTypesOffset)
4481 4487
4482 ACCESSORS(AllocationSite, transition_info, Object, kTransitionInfoOffset) 4488 ACCESSORS(AllocationSite, transition_info, Object, kTransitionInfoOffset)
4489 ACCESSORS(AllocationSite, dependent_code, DependentCode,
4490 kDependentCodeOffset)
4483 ACCESSORS(AllocationSite, weak_next, Object, kWeakNextOffset) 4491 ACCESSORS(AllocationSite, weak_next, Object, kWeakNextOffset)
4484 ACCESSORS(AllocationMemento, allocation_site, Object, kAllocationSiteOffset) 4492 ACCESSORS(AllocationMemento, allocation_site, Object, kAllocationSiteOffset)
4485 4493
4486 ACCESSORS(Script, source, Object, kSourceOffset) 4494 ACCESSORS(Script, source, Object, kSourceOffset)
4487 ACCESSORS(Script, name, Object, kNameOffset) 4495 ACCESSORS(Script, name, Object, kNameOffset)
4488 ACCESSORS(Script, id, Smi, kIdOffset) 4496 ACCESSORS(Script, id, Smi, kIdOffset)
4489 ACCESSORS_TO_SMI(Script, line_offset, kLineOffsetOffset) 4497 ACCESSORS_TO_SMI(Script, line_offset, kLineOffsetOffset)
4490 ACCESSORS_TO_SMI(Script, column_offset, kColumnOffsetOffset) 4498 ACCESSORS_TO_SMI(Script, column_offset, kColumnOffsetOffset)
4491 ACCESSORS(Script, data, Object, kDataOffset) 4499 ACCESSORS(Script, data, Object, kDataOffset)
4492 ACCESSORS(Script, context_data, Object, kContextOffset) 4500 ACCESSORS(Script, context_data, Object, kContextOffset)
(...skipping 1791 matching lines...) Expand 10 before | Expand all | Expand 10 after
6284 #undef WRITE_UINT32_FIELD 6292 #undef WRITE_UINT32_FIELD
6285 #undef READ_SHORT_FIELD 6293 #undef READ_SHORT_FIELD
6286 #undef WRITE_SHORT_FIELD 6294 #undef WRITE_SHORT_FIELD
6287 #undef READ_BYTE_FIELD 6295 #undef READ_BYTE_FIELD
6288 #undef WRITE_BYTE_FIELD 6296 #undef WRITE_BYTE_FIELD
6289 6297
6290 6298
6291 } } // namespace v8::internal 6299 } } // namespace v8::internal
6292 6300
6293 #endif // V8_OBJECTS_INL_H_ 6301 #endif // V8_OBJECTS_INL_H_
OLDNEW
« src/code-stubs-hydrogen.cc ('K') | « src/objects.h ('k') | src/objects-printer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698