Changeset 21201 for v6/smop/src/p6opaque.sm0p
- Timestamp:
- 07/03/08 23:23:38 (5 months ago)
- Files:
-
- 1 modified
-
v6/smop/src/p6opaque.sm0p (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
v6/smop/src/p6opaque.sm0p
r21182 r21201 115 115 fprintf(stderr, "[SMOP p6opaque] TODO: p6opaque RI's meta undefined yet\n"); 116 116 ret = SMOP__NATIVE__bool_false; 117 } else if (SMOP_RI(invocant) != (SMOP__ResponderInterface*)SMOP__p6opaque__RI) { 118 fprintf(stderr, "[SMOP p6opaque] call to repr method with non p6opaque invocant\n"); 119 ret = SMOP__NATIVE__bool_false; 117 120 } else { 118 121 if (set) … … 140 143 if (set) { 141 144 fprintf(stderr, "[SMOP p6opaque] Can't set how on a instance\n"); 145 SMOP_RELEASE(interpreter,set); 142 146 } else { 143 147 … … 145 149 SMOP__Object* frame; 146 150 SMOP__Object* continuation = SMOP_DISPATCH(interpreter, SMOP_RI(interpreter), 147 SMOP__ID__continuation, interpreter);151 SMOP__ID__continuation, SMOP_REFERENCE(interpreter,interpreter)); 148 152 $frame = q:sm0p { 149 153 $continuation; … … 161 165 } else if (set) { 162 166 // create the metadata struct and set the how. 163 164 167 SMOP__p6opaque_LOWL_metadata* m = calloc(1,sizeof(SMOP__p6opaque_LOWL_metadata)); 168 assert(m); 169 m->how = set; 170 ((SMOP__p6opaque_struct*)invocant)->metadata = m; 171 smop_lowlevel_unlock(invocant); 172 173 ret = SMOP_REFERENCE(interpreter, set); 165 174 } else { 166 167 175 fprintf(stderr,"[SMOP p6opaque] TODO: invalid .^!how call\n"); 168 176 } … … 182 190 SMOP__Object* frame; 183 191 SMOP__Object* continuation = SMOP_DISPATCH(interpreter, SMOP_RI(interpreter), 184 SMOP__ID__continuation, interpreter); 192 SMOP__ID__continuation, 193 SMOP_REFERENCE(interpreter,interpreter)); 185 194 $frame = q:sm0p { 186 195 $capture;
