DCHECK(function->next_function_link()->IsUndefined());
- function->set_next_function_link(get(OPTIMIZED_FUNCTIONS_LIST));
+ function->set_next_function_link(get(OPTIMIZED_FUNCTIONS_LIST),
+ UPDATE_WEAK_WRITE_BARRIER);
set(OPTIMIZED_FUNCTIONS_LIST, function, UPDATE_WEAK_WRITE_BARRIER);
}
set(OPTIMIZED_FUNCTIONS_LIST, element_function->next_function_link(),
UPDATE_WEAK_WRITE_BARRIER);
} else {
- prev->set_next_function_link(element_function->next_function_link());
+ prev->set_next_function_link(element_function->next_function_link(),
+ UPDATE_WEAK_WRITE_BARRIER);
}
- element_function->set_next_function_link(GetHeap()->undefined_value());
+ element_function->set_next_function_link(GetHeap()->undefined_value(),
+ UPDATE_WEAK_WRITE_BARRIER);
return;
}
prev = element_function;
// changed the code to which it refers to no longer be optimized code.
// Remove the function from this list.
if (prev != NULL) {
- prev->set_next_function_link(next);
+ prev->set_next_function_link(next, UPDATE_WEAK_WRITE_BARRIER);
} else {
context->SetOptimizedFunctionsListHead(next);
}
CHECK_EQ(function->next_function_link(), next);
// Set the next function link to undefined to indicate it is no longer
// in the optimized functions list.
- function->set_next_function_link(context->GetHeap()->undefined_value());
+ function->set_next_function_link(context->GetHeap()->undefined_value(),
+ SKIP_WRITE_BARRIER);
} else {
// The visitor should not alter the link directly.
CHECK_EQ(function->next_function_link(), next);
function->set_context(*context);
function->set_prototype_or_initial_map(*the_hole_value());
function->set_literals_or_bindings(*empty_fixed_array());
- function->set_next_function_link(*undefined_value());
+ function->set_next_function_link(*undefined_value(), SKIP_WRITE_BARRIER);
}
static void SetNextCandidate(JSFunction* candidate,
JSFunction* next_candidate) {
- candidate->set_next_function_link(next_candidate);
+ candidate->set_next_function_link(next_candidate,
+ UPDATE_WEAK_WRITE_BARRIER);
}
static void ClearNextCandidate(JSFunction* candidate, Object* undefined) {
// We can ignore weak cells with cleared values because they will always
// contain smi zero.
if (weak_cell->next() == undefined && !weak_cell->cleared()) {
- weak_cell->set_next(heap->encountered_weak_cells());
+ weak_cell->set_next(heap->encountered_weak_cells(),
+ UPDATE_WEAK_WRITE_BARRIER);
heap->set_encountered_weak_cells(weak_cell);
}
}
template <>
struct WeakListVisitor<JSFunction> {
static void SetWeakNext(JSFunction* function, Object* next) {
- function->set_next_function_link(next);
+ function->set_next_function_link(next, UPDATE_WEAK_WRITE_BARRIER);
}
static Object* WeakNext(JSFunction* function) {
template <>
struct WeakListVisitor<Code> {
static void SetWeakNext(Code* code, Object* next) {
- code->set_next_code_link(next);
+ code->set_next_code_link(next, UPDATE_WEAK_WRITE_BARRIER);
}
static Object* WeakNext(Code* code) { return code->next_code_link(); }
template <>
struct WeakListVisitor<AllocationSite> {
static void SetWeakNext(AllocationSite* obj, Object* next) {
- obj->set_weak_next(next);
+ obj->set_weak_next(next, UPDATE_WEAK_WRITE_BARRIER);
}
static Object* WeakNext(AllocationSite* obj) { return obj->weak_next(); }