Skip to content

Commit

Permalink
missing write barriers and more standard write barriers
Browse files Browse the repository at this point in the history
  • Loading branch information
diakopter committed Sep 1, 2013
1 parent 22d8e75 commit d560772
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/6model/reprs/MVMHash.c
Expand Up @@ -47,8 +47,8 @@ static void copy_to(MVMThreadContext *tc, MVMSTable *st, void *src, MVMObject *d
size_t klen;
void *kdata;
MVMHashEntry *new_entry = malloc(sizeof(MVMHashEntry));
new_entry->key = current->key;
new_entry->value = current->value;
MVM_ASSIGN_REF(tc, dest_root, new_entry->key, current->key);
MVM_ASSIGN_REF(tc, dest_root, new_entry->value, current->value);
extract_key(tc, &kdata, &klen, current->key);

HASH_ADD_KEYPTR(hash_handle, dest_body->hash_head, kdata, klen, new_entry);
Expand Down Expand Up @@ -118,10 +118,8 @@ static void bind_key_boxed(MVMThreadContext *tc, MVMSTable *st, MVMObject *root,
}
else
entry->hash_handle.key = (void *)kdata;
entry->key = key;
entry->value = value;
MVM_WB(tc, root, key);
MVM_WB(tc, root, value);
MVM_ASSIGN_REF(tc, root, entry->key, key);
MVM_ASSIGN_REF(tc, root, entry->value, value);
}

static MVMuint64 elems(MVMThreadContext *tc, MVMSTable *st, MVMObject *root, void *data) {
Expand Down

0 comments on commit d560772

Please sign in to comment.