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

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

Issue 125873002: Fix for issue 3071: A zombie AlloctionSite must clear pointer fields. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 11 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 | « no previous file | no next file » | 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 1296 matching lines...) Expand 10 before | Expand all | Expand 10 after
1307 set_memento_create_count(Smi::FromInt(0)); 1307 set_memento_create_count(Smi::FromInt(0));
1308 set_memento_found_count(Smi::FromInt(0)); 1308 set_memento_found_count(Smi::FromInt(0));
1309 set_pretenure_decision(Smi::FromInt(0)); 1309 set_pretenure_decision(Smi::FromInt(0));
1310 set_dependent_code(DependentCode::cast(GetHeap()->empty_fixed_array()), 1310 set_dependent_code(DependentCode::cast(GetHeap()->empty_fixed_array()),
1311 SKIP_WRITE_BARRIER); 1311 SKIP_WRITE_BARRIER);
1312 } 1312 }
1313 1313
1314 1314
1315 void AllocationSite::MarkZombie() { 1315 void AllocationSite::MarkZombie() {
1316 ASSERT(!IsZombie()); 1316 ASSERT(!IsZombie());
1317 Initialize();
1317 set_pretenure_decision(Smi::FromInt(kZombie)); 1318 set_pretenure_decision(Smi::FromInt(kZombie));
1318 // Clear all non-smi fields
1319 set_transition_info(Smi::FromInt(0));
1320 set_dependent_code(DependentCode::cast(GetHeap()->empty_fixed_array()),
1321 SKIP_WRITE_BARRIER);
1322 } 1319 }
1323 1320
1324 1321
1325 // Heuristic: We only need to create allocation site info if the boilerplate 1322 // Heuristic: We only need to create allocation site info if the boilerplate
1326 // elements kind is the initial elements kind. 1323 // elements kind is the initial elements kind.
1327 AllocationSiteMode AllocationSite::GetMode( 1324 AllocationSiteMode AllocationSite::GetMode(
1328 ElementsKind boilerplate_elements_kind) { 1325 ElementsKind boilerplate_elements_kind) {
1329 if (FLAG_track_allocation_sites && 1326 if (FLAG_track_allocation_sites &&
1330 IsFastSmiElementsKind(boilerplate_elements_kind)) { 1327 IsFastSmiElementsKind(boilerplate_elements_kind)) {
1331 return TRACK_ALLOCATION_SITE; 1328 return TRACK_ALLOCATION_SITE;
(...skipping 5148 matching lines...) Expand 10 before | Expand all | Expand 10 after
6480 #undef WRITE_UINT32_FIELD 6477 #undef WRITE_UINT32_FIELD
6481 #undef READ_SHORT_FIELD 6478 #undef READ_SHORT_FIELD
6482 #undef WRITE_SHORT_FIELD 6479 #undef WRITE_SHORT_FIELD
6483 #undef READ_BYTE_FIELD 6480 #undef READ_BYTE_FIELD
6484 #undef WRITE_BYTE_FIELD 6481 #undef WRITE_BYTE_FIELD
6485 6482
6486 6483
6487 } } // namespace v8::internal 6484 } } // namespace v8::internal
6488 6485
6489 #endif // V8_OBJECTS_INL_H_ 6486 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698