Skip to content

Commit bb332d9

Browse files
committed
Don't use pmc-specific accessors when not necessary
1 parent b0eb530 commit bb332d9

File tree

3 files changed

+23
-23
lines changed

3 files changed

+23
-23
lines changed

src/pmc/dispatchersub.pmc

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,24 @@ pmclass DispatcherSub extends Sub auto_attrs dynpmc group nqp {
77

88
VTABLE void init() {
99
SUPER();
10-
SETATTR_DispatcherSub_dispatchees(interp, SELF, PMCNULL);
11-
SETATTR_DispatcherSub_dispatch_cache(interp, SELF, PMCNULL);
10+
SET_ATTR_dispatchees(interp, SELF, PMCNULL);
11+
SET_ATTR_dispatch_cache(interp, SELF, PMCNULL);
1212
}
1313

1414
VTABLE void mark() {
1515
PMC *dispatchees;
1616
SUPER();
17-
GETATTR_DispatcherSub_dispatchees(interp, SELF, dispatchees);
17+
GET_ATTR_dispatchees(interp, SELF, dispatchees);
1818
Parrot_gc_mark_PMC_alive(INTERP, dispatchees);
1919
}
2020

2121
VTABLE PMC * clone() {
2222
PMC *dispatchees, *dispatch_cache;
2323
PMC *cloned = SUPER();
24-
GETATTR_DispatcherSub_dispatchees(interp, SELF, dispatchees);
25-
SETATTR_DispatcherSub_dispatchees(interp, cloned, dispatchees);
26-
GETATTR_DispatcherSub_dispatch_cache(interp, SELF, dispatch_cache);
27-
SETATTR_DispatcherSub_dispatch_cache(interp, cloned, dispatch_cache);
24+
GET_ATTR_dispatchees(interp, SELF, dispatchees);
25+
SET_ATTR_dispatchees(interp, cloned, dispatchees);
26+
GET_ATTR_dispatch_cache(interp, SELF, dispatch_cache);
27+
SET_ATTR_dispatch_cache(interp, cloned, dispatch_cache);
2828
return cloned;
2929
}
3030

src/pmc/nqpmultisig.pmc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ pmclass NQPMultiSig auto_attrs dynpmc group nqp {
88

99
VTABLE void mark() {
1010
PMC *types, *definednesses;
11-
GETATTR_NQPMultiSig_types(interp, SELF, types);
12-
GETATTR_NQPMultiSig_definedness_constraints(interp, SELF, definednesses);
11+
GET_ATTR_types(interp, SELF, types);
12+
GET_ATTR_definedness_constraints(interp, SELF, definednesses);
1313
Parrot_gc_mark_PMC_alive(interp, types);
1414
Parrot_gc_mark_PMC_alive(interp, definednesses);
1515
}

src/pmc/serializationcontext.pmc

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,79 +13,79 @@ pmclass SerializationContext auto_attrs dynpmc group nqp {
1313

1414
VTABLE void init() {
1515
PMC *root_objects = Parrot_pmc_new(interp, enum_class_ResizablePMCArray);
16-
SETATTR_SerializationContext_root_objects(interp, SELF, root_objects);
16+
SET_ATTR_root_objects(interp, SELF, root_objects);
1717
PObj_custom_mark_SET(SELF);
1818
}
1919

2020
VTABLE void set_string_native(STRING *handle) {
21-
SETATTR_SerializationContext_handle(interp, SELF, handle);
21+
SET_ATTR_handle(interp, SELF, handle);
2222
}
2323

2424
VTABLE void mark() {
2525
PMC *root_objects;
2626
STRING *handle, *description;
27-
GETATTR_SerializationContext_root_objects(interp, SELF, root_objects);
27+
GET_ATTR_root_objects(interp, SELF, root_objects);
2828
Parrot_gc_mark_PMC_alive(INTERP, root_objects);
29-
GETATTR_SerializationContext_handle(interp, SELF, handle);
29+
GET_ATTR_handle(interp, SELF, handle);
3030
Parrot_gc_mark_STRING_alive(INTERP, handle);
31-
GETATTR_SerializationContext_description(interp, SELF, description);
31+
GET_ATTR_description(interp, SELF, description);
3232
Parrot_gc_mark_STRING_alive(INTERP, description);
3333
}
3434

3535
VTABLE PMC* get_pmc_keyed_int(INTVAL idx) {
3636
PMC *root_objects;
37-
GETATTR_SerializationContext_root_objects(interp, SELF, root_objects);
37+
GET_ATTR_root_objects(interp, SELF, root_objects);
3838
return VTABLE_get_pmc_keyed_int(interp, root_objects, idx);
3939
}
4040

4141
VTABLE PMC* get_pmc_keyed(PMC *idx) {
4242
PMC *root_objects;
43-
GETATTR_SerializationContext_root_objects(interp, SELF, root_objects);
43+
GET_ATTR_root_objects(interp, SELF, root_objects);
4444
return VTABLE_get_pmc_keyed(interp, root_objects, idx);
4545
}
4646

4747
VTABLE void set_pmc_keyed_int(INTVAL idx, PMC *value) {
4848
PMC *root_objects;
49-
GETATTR_SerializationContext_root_objects(interp, SELF, root_objects);
49+
GET_ATTR_root_objects(interp, SELF, root_objects);
5050
VTABLE_set_pmc_keyed_int(interp, root_objects, idx, value);
5151
}
5252

5353
VTABLE void set_pmc_keyed(PMC *idx, PMC *value) {
5454
PMC *root_objects;
55-
GETATTR_SerializationContext_root_objects(interp, SELF, root_objects);
55+
GET_ATTR_root_objects(interp, SELF, root_objects);
5656
VTABLE_set_pmc_keyed(interp, root_objects, idx, value);
5757
}
5858

5959
METHOD INTVAL elems() {
6060
PMC *root_objects;
6161
INTVAL elems;
62-
GETATTR_SerializationContext_root_objects(interp, SELF, root_objects);
62+
GET_ATTR_root_objects(interp, SELF, root_objects);
6363
elems = VTABLE_elements(interp, root_objects);
6464
RETURN (INTVAL elems);
6565
}
6666

6767
METHOD STRING* handle() {
6868
STRING *handle;
69-
GETATTR_SerializationContext_handle(interp, SELF, handle);
69+
GET_ATTR_handle(interp, SELF, handle);
7070
RETURN (STRING* handle);
7171
}
7272

7373
METHOD set_description(STRING *description) {
74-
SETATTR_SerializationContext_description(interp, SELF, description);
74+
SET_ATTR_description(interp, SELF, description);
7575
RETURN (STRING* description);
7676
}
7777

7878
METHOD STRING* description() {
7979
STRING *description;
80-
GETATTR_SerializationContext_description(interp, SELF, description);
80+
GET_ATTR_description(interp, SELF, description);
8181
RETURN (STRING* description);
8282
}
8383

8484
METHOD INTVAL slot_index_for(PMC *obj) {
8585
/* This is kinda stupid, but it'll do for now. */
8686
PMC *root_objects;
8787
INTVAL i, count;
88-
GETATTR_SerializationContext_root_objects(interp, SELF, root_objects);
88+
GET_ATTR_root_objects(interp, SELF, root_objects);
8989
count = VTABLE_elements(interp, root_objects);
9090
for (i = 0; i < count; i++) {
9191
if (VTABLE_get_pmc_keyed_int(interp, root_objects, i) == obj) {

0 commit comments

Comments
 (0)