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

Side by Side Diff: src/mark-compact.cc

Issue 181063033: Ignore slots buffer overflow when recording entries of the allocation sites scratchpad. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 9 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/mark-compact.h ('k') | src/mark-compact-inl.h » ('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 2035 matching lines...) Expand 10 before | Expand all | Expand 10 after
2046 while (current_cell != 0) { 2046 while (current_cell != 0) {
2047 int trailing_zeros = CompilerIntrinsics::CountTrailingZeros(current_cell); 2047 int trailing_zeros = CompilerIntrinsics::CountTrailingZeros(current_cell);
2048 current_cell >>= trailing_zeros; 2048 current_cell >>= trailing_zeros;
2049 offset += trailing_zeros; 2049 offset += trailing_zeros;
2050 Address address = cell_base + offset * kPointerSize; 2050 Address address = cell_base + offset * kPointerSize;
2051 HeapObject* object = HeapObject::FromAddress(address); 2051 HeapObject* object = HeapObject::FromAddress(address);
2052 2052
2053 int size = object->Size(); 2053 int size = object->Size();
2054 survivors_size += size; 2054 survivors_size += size;
2055 2055
2056 Heap::UpdateAllocationSiteFeedback(object); 2056 Heap::UpdateAllocationSiteFeedback(object, Heap::RECORD_SCRATCHPAD_SLOT);
2057 2057
2058 offset++; 2058 offset++;
2059 current_cell >>= 1; 2059 current_cell >>= 1;
2060 // Aggressively promote young survivors to the old space. 2060 // Aggressively promote young survivors to the old space.
2061 if (TryPromoteObject(object, size)) { 2061 if (TryPromoteObject(object, size)) {
2062 continue; 2062 continue;
2063 } 2063 }
2064 2064
2065 // Promotion failed. Just migrate object to another semispace. 2065 // Promotion failed. Just migrate object to another semispace.
2066 MaybeObject* allocation = new_space->AllocateRaw(size); 2066 MaybeObject* allocation = new_space->AllocateRaw(size);
(...skipping 2410 matching lines...) Expand 10 before | Expand all | Expand 10 after
4477 while (buffer != NULL) { 4477 while (buffer != NULL) {
4478 SlotsBuffer* next_buffer = buffer->next(); 4478 SlotsBuffer* next_buffer = buffer->next();
4479 DeallocateBuffer(buffer); 4479 DeallocateBuffer(buffer);
4480 buffer = next_buffer; 4480 buffer = next_buffer;
4481 } 4481 }
4482 *buffer_address = NULL; 4482 *buffer_address = NULL;
4483 } 4483 }
4484 4484
4485 4485
4486 } } // namespace v8::internal 4486 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/mark-compact.h ('k') | src/mark-compact-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698