Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

105 lines (97 sloc) 3.297 kb
/* Represents a Hash that is owned by a serialization context. If it gets
* modified, we need to trigger the SC write barrier. */
#include "../6model/sixmodelobject.h"
pmclass OwnedHash extends Hash auto_attrs dynpmc group nqp {
/* The object that owns this hash. */
ATTR PMC *owner;
VTABLE void set_integer_keyed(PMC* key, INTVAL value) {
PMC *owner;
GET_ATTR_owner(interp, SELF, owner);
if (!PMC_IS_NULL(owner))
OBJ_SC_WRITE_BARRIER(owner);
SUPER(key, value);
}
VTABLE void set_integer_keyed_int(INTVAL key, INTVAL value) {
PMC *owner;
GET_ATTR_owner(interp, SELF, owner);
if (!PMC_IS_NULL(owner))
OBJ_SC_WRITE_BARRIER(owner);
SUPER(key, value);
}
VTABLE void set_integer_keyed_str(STRING* key, INTVAL value) {
PMC *owner;
GET_ATTR_owner(interp, SELF, owner);
if (!PMC_IS_NULL(owner))
OBJ_SC_WRITE_BARRIER(owner);
SUPER(key, value);
}
VTABLE void set_number_keyed(PMC* key, FLOATVAL value) {
PMC *owner;
GET_ATTR_owner(interp, SELF, owner);
if (!PMC_IS_NULL(owner))
OBJ_SC_WRITE_BARRIER(owner);
SUPER(key, value);
}
VTABLE void set_number_keyed_int(INTVAL key, FLOATVAL value) {
PMC *owner;
GET_ATTR_owner(interp, SELF, owner);
if (!PMC_IS_NULL(owner))
OBJ_SC_WRITE_BARRIER(owner);
SUPER(key, value);
}
VTABLE void set_number_keyed_str(STRING* key, FLOATVAL value) {
PMC *owner;
GET_ATTR_owner(interp, SELF, owner);
if (!PMC_IS_NULL(owner))
OBJ_SC_WRITE_BARRIER(owner);
SUPER(key, value);
}
VTABLE void set_string_keyed(PMC* key, STRING* value) {
PMC *owner;
GET_ATTR_owner(interp, SELF, owner);
if (!PMC_IS_NULL(owner))
OBJ_SC_WRITE_BARRIER(owner);
SUPER(key, value);
}
VTABLE void set_string_keyed_int(INTVAL key, STRING* value) {
PMC *owner;
GET_ATTR_owner(interp, SELF, owner);
if (!PMC_IS_NULL(owner))
OBJ_SC_WRITE_BARRIER(owner);
SUPER(key, value);
}
VTABLE void set_string_keyed_str(STRING* key, STRING* value) {
PMC *owner;
GET_ATTR_owner(interp, SELF, owner);
if (!PMC_IS_NULL(owner))
OBJ_SC_WRITE_BARRIER(owner);
SUPER(key, value);
}
VTABLE void set_pmc_keyed(PMC* key, PMC* value) {
PMC *owner;
GET_ATTR_owner(interp, SELF, owner);
if (!PMC_IS_NULL(owner))
OBJ_SC_WRITE_BARRIER(owner);
SUPER(key, value);
}
VTABLE void set_pmc_keyed_int(INTVAL key, PMC* value) {
PMC *owner;
GET_ATTR_owner(interp, SELF, owner);
if (!PMC_IS_NULL(owner))
OBJ_SC_WRITE_BARRIER(owner);
SUPER(key, value);
}
VTABLE void set_pmc_keyed_str(STRING* key, PMC* value) {
PMC *owner;
GET_ATTR_owner(interp, SELF, owner);
if (!PMC_IS_NULL(owner))
OBJ_SC_WRITE_BARRIER(owner);
SUPER(key, value);
}
VTABLE void mark() {
PMC *owner;
GET_ATTR_owner(interp, SELF, owner);
Parrot_gc_mark_PMC_alive(INTERP, owner);
SUPER();
}
}
Jump to Line
Something went wrong with that request. Please try again.