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

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

Issue 99133017: Use an allocation site scratchpad to speed up allocaton site processing during gc. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years 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') | 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 1362 matching lines...) Expand 10 before | Expand all | Expand 10 after
1373 break; 1373 break;
1374 case TRANSITIONS: 1374 case TRANSITIONS:
1375 return DependentCode::kAllocationSiteTransitionChangedGroup; 1375 return DependentCode::kAllocationSiteTransitionChangedGroup;
1376 break; 1376 break;
1377 } 1377 }
1378 UNREACHABLE(); 1378 UNREACHABLE();
1379 return DependentCode::kAllocationSiteTransitionChangedGroup; 1379 return DependentCode::kAllocationSiteTransitionChangedGroup;
1380 } 1380 }
1381 1381
1382 1382
1383 inline void AllocationSite::IncrementMementoFoundCount() { 1383 inline bool AllocationSite::IncrementMementoFoundCount() {
1384 if (IsZombie()) return false;
1385
1384 int value = memento_found_count()->value(); 1386 int value = memento_found_count()->value();
1385 set_memento_found_count(Smi::FromInt(value + 1)); 1387 set_memento_found_count(Smi::FromInt(value + 1));
1388 return value == 0;
1386 } 1389 }
1387 1390
1388 1391
1389 inline void AllocationSite::IncrementMementoCreateCount() { 1392 inline void AllocationSite::IncrementMementoCreateCount() {
1390 ASSERT(FLAG_allocation_site_pretenuring); 1393 ASSERT(FLAG_allocation_site_pretenuring);
1391 int value = memento_create_count()->value(); 1394 int value = memento_create_count()->value();
1392 set_memento_create_count(Smi::FromInt(value + 1)); 1395 set_memento_create_count(Smi::FromInt(value + 1));
1393 } 1396 }
1394 1397
1395 1398
(...skipping 5075 matching lines...) Expand 10 before | Expand all | Expand 10 after
6471 #undef WRITE_UINT32_FIELD 6474 #undef WRITE_UINT32_FIELD
6472 #undef READ_SHORT_FIELD 6475 #undef READ_SHORT_FIELD
6473 #undef WRITE_SHORT_FIELD 6476 #undef WRITE_SHORT_FIELD
6474 #undef READ_BYTE_FIELD 6477 #undef READ_BYTE_FIELD
6475 #undef WRITE_BYTE_FIELD 6478 #undef WRITE_BYTE_FIELD
6476 6479
6477 6480
6478 } } // namespace v8::internal 6481 } } // namespace v8::internal
6479 6482
6480 #endif // V8_OBJECTS_INL_H_ 6483 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « src/objects.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698