Ticket #926: rm-newcont.patch
File rm-newcont.patch, 1.9 KB (added by jrtayloriv, 12 years ago) |
---|
-
src/sub.c
127 127 128 128 /* 129 129 130 =item C<PMC * new_continuation(PARROT_INTERP, const PMC *to)>131 130 132 Returns a new C<PMC> to the context of C<to> with its own copy of the133 current interpreter context. If C<to> is C<NULL>, then the C<to_ctx> is set134 to the current context.135 136 =cut137 138 */139 140 PARROT_MALLOC141 PARROT_CANNOT_RETURN_NULL142 PMC *143 new_continuation(PARROT_INTERP, ARGIN_NULLOK(PMC *to))144 {145 ASSERT_ARGS(new_continuation)146 147 PMC * const cc = to ?148 constant_pmc_new_init(interp, enum_class_Continuation, to) :149 constant_pmc_new(interp, enum_class_Continuation);150 return cc;151 }152 153 131 /* 154 132 155 =item C<PMC * new_ret_continuation(PARROT_INTERP)>156 157 Returns a new RetContinuation C<PMC> pointing to the current context.158 159 =cut160 161 */162 163 PARROT_MALLOC164 PARROT_CANNOT_RETURN_NULL165 PMC *166 new_ret_continuation(PARROT_INTERP)167 {168 ASSERT_ARGS(new_ret_continuation)169 PMC * const cc = pmc_new(interp, enum_class_RetContinuation);170 return cc;171 }172 173 174 /*175 176 133 =item C<PMC * new_ret_continuation_pmc(PARROT_INTERP, opcode_t *address)> 177 134 178 135 Returns a new C<RetContinuation> PMC, and sets address field to C<address> -
include/parrot/sub.h
223 223 FUNC_MODIFIES(* ctx); 224 224 225 225 void mark_context_start(void); 226 PARROT_MALLOC227 PARROT_CANNOT_RETURN_NULL228 PMC * new_continuation(PARROT_INTERP,229 ARGIN_NULLOK(PMC *to))230 __attribute__nonnull__(1);231 226 232 PARROT_MALLOC233 PARROT_CANNOT_RETURN_NULL234 PMC * new_ret_continuation(PARROT_INTERP)235 __attribute__nonnull__(1);236 237 227 void Parrot_capture_lex(PARROT_INTERP, ARGMOD(PMC *sub_pmc)) 238 228 __attribute__nonnull__(1) 239 229 __attribute__nonnull__(2)