| OLD | NEW | 
|---|
| 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 4103 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 4114   GCTracer::Scope gc_scope(tracer_, GCTracer::Scope::MC_SWEEP); | 4114   GCTracer::Scope gc_scope(tracer_, GCTracer::Scope::MC_SWEEP); | 
| 4115 #ifdef DEBUG | 4115 #ifdef DEBUG | 
| 4116   state_ = SWEEP_SPACES; | 4116   state_ = SWEEP_SPACES; | 
| 4117 #endif | 4117 #endif | 
| 4118   SweeperType how_to_sweep = | 4118   SweeperType how_to_sweep = | 
| 4119       FLAG_lazy_sweeping ? LAZY_CONSERVATIVE : CONSERVATIVE; | 4119       FLAG_lazy_sweeping ? LAZY_CONSERVATIVE : CONSERVATIVE; | 
| 4120   if (isolate()->num_sweeper_threads() > 0) { | 4120   if (isolate()->num_sweeper_threads() > 0) { | 
| 4121     if (FLAG_parallel_sweeping) how_to_sweep = PARALLEL_CONSERVATIVE; | 4121     if (FLAG_parallel_sweeping) how_to_sweep = PARALLEL_CONSERVATIVE; | 
| 4122     if (FLAG_concurrent_sweeping) how_to_sweep = CONCURRENT_CONSERVATIVE; | 4122     if (FLAG_concurrent_sweeping) how_to_sweep = CONCURRENT_CONSERVATIVE; | 
| 4123   } | 4123   } | 
| 4124   if (FLAG_expose_gc) how_to_sweep = CONSERVATIVE; |  | 
| 4125   if (sweep_precisely_) how_to_sweep = PRECISE; | 4124   if (sweep_precisely_) how_to_sweep = PRECISE; | 
| 4126 | 4125 | 
| 4127   // Unlink evacuation candidates before sweeper threads access the list of | 4126   // Unlink evacuation candidates before sweeper threads access the list of | 
| 4128   // pages to avoid race condition. | 4127   // pages to avoid race condition. | 
| 4129   UnlinkEvacuationCandidates(); | 4128   UnlinkEvacuationCandidates(); | 
| 4130 | 4129 | 
| 4131   // Noncompacting collections simply sweep the spaces to clear the mark | 4130   // Noncompacting collections simply sweep the spaces to clear the mark | 
| 4132   // bits and free the nonlive blocks (for old and map spaces).  We sweep | 4131   // bits and free the nonlive blocks (for old and map spaces).  We sweep | 
| 4133   // the map space last because freeing non-live maps overwrites them and | 4132   // the map space last because freeing non-live maps overwrites them and | 
| 4134   // the other spaces rely on possibly non-live maps to get the sizes for | 4133   // the other spaces rely on possibly non-live maps to get the sizes for | 
| (...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 4369   while (buffer != NULL) { | 4368   while (buffer != NULL) { | 
| 4370     SlotsBuffer* next_buffer = buffer->next(); | 4369     SlotsBuffer* next_buffer = buffer->next(); | 
| 4371     DeallocateBuffer(buffer); | 4370     DeallocateBuffer(buffer); | 
| 4372     buffer = next_buffer; | 4371     buffer = next_buffer; | 
| 4373   } | 4372   } | 
| 4374   *buffer_address = NULL; | 4373   *buffer_address = NULL; | 
| 4375 } | 4374 } | 
| 4376 | 4375 | 
| 4377 | 4376 | 
| 4378 } }  // namespace v8::internal | 4377 } }  // namespace v8::internal | 
| OLD | NEW | 
|---|