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

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

Issue 7535004: Merge bleeding edge up to 8774 into the GC branch. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/gc/
Patch Set: Created 9 years, 4 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/macros.py ('k') | src/messages.js » ('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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 2100 matching lines...) Expand 10 before | Expand all | Expand 10 after
2111 heap_, 2111 heap_,
2112 proto_offset + new_number_of_transitions * step, 2112 proto_offset + new_number_of_transitions * step,
2113 prototype, 2113 prototype,
2114 UPDATE_WRITE_BARRIER); 2114 UPDATE_WRITE_BARRIER);
2115 prototype_transitions->set_unchecked( 2115 prototype_transitions->set_unchecked(
2116 heap_, 2116 heap_,
2117 map_offset + new_number_of_transitions * step, 2117 map_offset + new_number_of_transitions * step,
2118 cached_map, 2118 cached_map,
2119 SKIP_WRITE_BARRIER); 2119 SKIP_WRITE_BARRIER);
2120 } 2120 }
2121 new_number_of_transitions++;
2122 } 2121 }
2123 2122
2124 // Fill slots that became free with undefined value. 2123 // Fill slots that became free with undefined value.
2125 Object* undefined = heap()->undefined_value(); 2124 Object* undefined = heap()->undefined_value();
2126 for (int i = new_number_of_transitions * step; 2125 for (int i = new_number_of_transitions * step;
2127 i < number_of_transitions * step; 2126 i < number_of_transitions * step;
2128 i++) { 2127 i++) {
2129 prototype_transitions->set_unchecked(heap_, 2128 prototype_transitions->set_unchecked(heap_,
2130 header + i, 2129 header + i,
2131 undefined, 2130 undefined,
(...skipping 1173 matching lines...) Expand 10 before | Expand all | Expand 10 after
3305 } 3304 }
3306 3305
3307 3306
3308 void MarkCompactCollector::ReportDeleteIfNeeded(HeapObject* obj, 3307 void MarkCompactCollector::ReportDeleteIfNeeded(HeapObject* obj,
3309 Isolate* isolate) { 3308 Isolate* isolate) {
3310 #ifdef ENABLE_GDB_JIT_INTERFACE 3309 #ifdef ENABLE_GDB_JIT_INTERFACE
3311 if (obj->IsCode()) { 3310 if (obj->IsCode()) {
3312 GDBJITInterface::RemoveCode(reinterpret_cast<Code*>(obj)); 3311 GDBJITInterface::RemoveCode(reinterpret_cast<Code*>(obj));
3313 } 3312 }
3314 #endif 3313 #endif
3315 #ifdef ENABLE_LOGGING_AND_PROFILING
3316 if (obj->IsCode()) { 3314 if (obj->IsCode()) {
3317 PROFILE(isolate, CodeDeleteEvent(obj->address())); 3315 PROFILE(isolate, CodeDeleteEvent(obj->address()));
3318 } 3316 }
3319 #endif
3320 } 3317 }
3321 3318
3322 3319
3323 void MarkCompactCollector::Initialize() { 3320 void MarkCompactCollector::Initialize() {
3324 StaticMarkingVisitor::Initialize(); 3321 StaticMarkingVisitor::Initialize();
3325 } 3322 }
3326 3323
3327 3324
3328 void SlotsBuffer::UpdateSlots() { 3325 void SlotsBuffer::UpdateSlots() {
3329 for (int slot_idx = 0; slot_idx < idx_; ++slot_idx) { 3326 for (int slot_idx = 0; slot_idx < idx_; ++slot_idx) {
(...skipping 18 matching lines...) Expand all
3348 while (buffer != NULL) { 3345 while (buffer != NULL) {
3349 SlotsBuffer* next_buffer = buffer->next(); 3346 SlotsBuffer* next_buffer = buffer->next();
3350 DeallocateBuffer(buffer); 3347 DeallocateBuffer(buffer);
3351 buffer = next_buffer; 3348 buffer = next_buffer;
3352 } 3349 }
3353 *buffer_address = NULL; 3350 *buffer_address = NULL;
3354 } 3351 }
3355 3352
3356 3353
3357 } } // namespace v8::internal 3354 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/macros.py ('k') | src/messages.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698