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

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

Issue 10091027: Process weak references between optimized JSFunctions on scavenges. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: fix incremental marking and slot recording Created 8 years, 8 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
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 1507 matching lines...) Expand 10 before | Expand all | Expand 10 after
1518 true); 1518 true);
1519 } 1519 }
1520 } 1520 }
1521 1521
1522 VisitPointers( 1522 VisitPointers(
1523 heap, 1523 heap,
1524 HeapObject::RawField(object, 1524 HeapObject::RawField(object,
1525 JSFunction::kCodeEntryOffset + kPointerSize), 1525 JSFunction::kCodeEntryOffset + kPointerSize),
1526 HeapObject::RawField(object, 1526 HeapObject::RawField(object,
1527 JSFunction::kNonWeakFieldsEndOffset)); 1527 JSFunction::kNonWeakFieldsEndOffset));
1528
1529 // Don't visit the next function list field as it is a weak reference.
1530 Object** next_function =
1531 HeapObject::RawField(object, JSFunction::kNextFunctionLinkOffset);
1532 heap->mark_compact_collector()->RecordSlot(
1533 next_function, next_function, *next_function);
1534 } 1528 }
1535 1529
1536 static inline void VisitJSRegExpFields(Map* map, 1530 static inline void VisitJSRegExpFields(Map* map,
1537 HeapObject* object) { 1531 HeapObject* object) {
1538 int last_property_offset = 1532 int last_property_offset =
1539 JSRegExp::kSize + kPointerSize * map->inobject_properties(); 1533 JSRegExp::kSize + kPointerSize * map->inobject_properties();
1540 VisitPointers(map->GetHeap(), 1534 VisitPointers(map->GetHeap(),
1541 SLOT_ADDR(object, JSRegExp::kPropertiesOffset), 1535 SLOT_ADDR(object, JSRegExp::kPropertiesOffset),
1542 SLOT_ADDR(object, last_property_offset)); 1536 SLOT_ADDR(object, last_property_offset));
1543 } 1537 }
(...skipping 2596 matching lines...) Expand 10 before | Expand all | Expand 10 after
4140 while (buffer != NULL) { 4134 while (buffer != NULL) {
4141 SlotsBuffer* next_buffer = buffer->next(); 4135 SlotsBuffer* next_buffer = buffer->next();
4142 DeallocateBuffer(buffer); 4136 DeallocateBuffer(buffer);
4143 buffer = next_buffer; 4137 buffer = next_buffer;
4144 } 4138 }
4145 *buffer_address = NULL; 4139 *buffer_address = NULL;
4146 } 4140 }
4147 4141
4148 4142
4149 } } // namespace v8::internal 4143 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698