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

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

Issue 18173013: AllocationSite objects weakly linked for traversal (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Review ready Created 7 years, 5 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 1325 matching lines...) Expand 10 before | Expand all | Expand 10 after
1336 if (FLAG_track_allocation_sites && 1336 if (FLAG_track_allocation_sites &&
1337 IsFastSmiElementsKind(from) && 1337 IsFastSmiElementsKind(from) &&
1338 IsMoreGeneralElementsKindTransition(from, to)) { 1338 IsMoreGeneralElementsKindTransition(from, to)) {
1339 return TRACK_ALLOCATION_SITE; 1339 return TRACK_ALLOCATION_SITE;
1340 } 1340 }
1341 1341
1342 return DONT_TRACK_ALLOCATION_SITE; 1342 return DONT_TRACK_ALLOCATION_SITE;
1343 } 1343 }
1344 1344
1345 1345
1346 void AllocationSite::AllocationSiteIterateBody(ObjectVisitor* v) {
1347 v->VisitAllocationSite(this);
1348 }
1349
1350
1346 MaybeObject* JSObject::EnsureCanContainHeapObjectElements() { 1351 MaybeObject* JSObject::EnsureCanContainHeapObjectElements() {
1347 ValidateElements(); 1352 ValidateElements();
1348 ElementsKind elements_kind = map()->elements_kind(); 1353 ElementsKind elements_kind = map()->elements_kind();
1349 if (!IsFastObjectElementsKind(elements_kind)) { 1354 if (!IsFastObjectElementsKind(elements_kind)) {
1350 if (IsFastHoleyElementsKind(elements_kind)) { 1355 if (IsFastHoleyElementsKind(elements_kind)) {
1351 return TransitionElementsKind(FAST_HOLEY_ELEMENTS); 1356 return TransitionElementsKind(FAST_HOLEY_ELEMENTS);
1352 } else { 1357 } else {
1353 return TransitionElementsKind(FAST_ELEMENTS); 1358 return TransitionElementsKind(FAST_ELEMENTS);
1354 } 1359 }
1355 } 1360 }
(...skipping 3087 matching lines...) Expand 10 before | Expand all | Expand 10 after
4443 ACCESSORS(ObjectTemplateInfo, constructor, Object, kConstructorOffset) 4448 ACCESSORS(ObjectTemplateInfo, constructor, Object, kConstructorOffset)
4444 ACCESSORS(ObjectTemplateInfo, internal_field_count, Object, 4449 ACCESSORS(ObjectTemplateInfo, internal_field_count, Object,
4445 kInternalFieldCountOffset) 4450 kInternalFieldCountOffset)
4446 4451
4447 ACCESSORS(SignatureInfo, receiver, Object, kReceiverOffset) 4452 ACCESSORS(SignatureInfo, receiver, Object, kReceiverOffset)
4448 ACCESSORS(SignatureInfo, args, Object, kArgsOffset) 4453 ACCESSORS(SignatureInfo, args, Object, kArgsOffset)
4449 4454
4450 ACCESSORS(TypeSwitchInfo, types, Object, kTypesOffset) 4455 ACCESSORS(TypeSwitchInfo, types, Object, kTypesOffset)
4451 4456
4452 ACCESSORS(AllocationSite, transition_info, Object, kTransitionInfoOffset) 4457 ACCESSORS(AllocationSite, transition_info, Object, kTransitionInfoOffset)
4458 ACCESSORS(AllocationSite, weak_next, Object, kWeakNextOffset)
4453 ACCESSORS(AllocationSiteInfo, allocation_site, Object, kAllocationSiteOffset) 4459 ACCESSORS(AllocationSiteInfo, allocation_site, Object, kAllocationSiteOffset)
4454 4460
4455 ACCESSORS(Script, source, Object, kSourceOffset) 4461 ACCESSORS(Script, source, Object, kSourceOffset)
4456 ACCESSORS(Script, name, Object, kNameOffset) 4462 ACCESSORS(Script, name, Object, kNameOffset)
4457 ACCESSORS(Script, id, Smi, kIdOffset) 4463 ACCESSORS(Script, id, Smi, kIdOffset)
4458 ACCESSORS_TO_SMI(Script, line_offset, kLineOffsetOffset) 4464 ACCESSORS_TO_SMI(Script, line_offset, kLineOffsetOffset)
4459 ACCESSORS_TO_SMI(Script, column_offset, kColumnOffsetOffset) 4465 ACCESSORS_TO_SMI(Script, column_offset, kColumnOffsetOffset)
4460 ACCESSORS(Script, data, Object, kDataOffset) 4466 ACCESSORS(Script, data, Object, kDataOffset)
4461 ACCESSORS(Script, context_data, Object, kContextOffset) 4467 ACCESSORS(Script, context_data, Object, kContextOffset)
4462 ACCESSORS(Script, wrapper, Foreign, kWrapperOffset) 4468 ACCESSORS(Script, wrapper, Foreign, kWrapperOffset)
(...skipping 1720 matching lines...) Expand 10 before | Expand all | Expand 10 after
6183 #undef WRITE_UINT32_FIELD 6189 #undef WRITE_UINT32_FIELD
6184 #undef READ_SHORT_FIELD 6190 #undef READ_SHORT_FIELD
6185 #undef WRITE_SHORT_FIELD 6191 #undef WRITE_SHORT_FIELD
6186 #undef READ_BYTE_FIELD 6192 #undef READ_BYTE_FIELD
6187 #undef WRITE_BYTE_FIELD 6193 #undef WRITE_BYTE_FIELD
6188 6194
6189 6195
6190 } } // namespace v8::internal 6196 } } // namespace v8::internal
6191 6197
6192 #endif // V8_OBJECTS_INL_H_ 6198 #endif // V8_OBJECTS_INL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698