ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Coro/Coro/State.xs
(Generate patch)

Comparing Coro/Coro/State.xs (file contents):
Revision 1.107 by root, Mon Nov 27 02:15:51 2006 UTC vs.
Revision 1.115 by root, Fri Dec 1 13:36:08 2006 UTC

7#include "patchlevel.h" 7#include "patchlevel.h"
8 8
9#if USE_VALGRIND 9#if USE_VALGRIND
10# include <valgrind/valgrind.h> 10# include <valgrind/valgrind.h>
11#endif 11#endif
12
13/* the maximum number of idle cctx that will be pooled */
14#define MAX_IDLE_CCTX 8
12 15
13#define PERL_VERSION_ATLEAST(a,b,c) \ 16#define PERL_VERSION_ATLEAST(a,b,c) \
14 (PERL_REVISION > (a) \ 17 (PERL_REVISION > (a) \
15 || (PERL_REVISION == (a) \ 18 || (PERL_REVISION == (a) \
16 && (PERL_VERSION > (b) \ 19 && (PERL_VERSION > (b) \
119 /* cpu state */ 122 /* cpu state */
120 void *idle_sp; /* sp of top-level transfer/schedule/cede call */ 123 void *idle_sp; /* sp of top-level transfer/schedule/cede call */
121 JMPENV *top_env; 124 JMPENV *top_env;
122 coro_context cctx; 125 coro_context cctx;
123 126
127 int inuse;
128
124#if USE_VALGRIND 129#if USE_VALGRIND
125 int valgrind_id; 130 int valgrind_id;
126#endif 131#endif
127} coro_cctx; 132} coro_cctx;
133
134enum {
135 CF_RUNNING, /* coroutine is running */
136 CF_READY, /* coroutine is ready */
137};
128 138
129/* this is a structure representing a perl-level coroutine */ 139/* this is a structure representing a perl-level coroutine */
130struct coro { 140struct coro {
131 /* the c coroutine allocated to this perl coroutine, if any */ 141 /* the c coroutine allocated to this perl coroutine, if any */
132 coro_cctx *cctx; 142 coro_cctx *cctx;
133 143
134 /* data associated with this coroutine (initial args) */ 144 /* data associated with this coroutine (initial args) */
135 AV *args; 145 AV *args;
136 int refcnt; 146 int refcnt;
147 int flags;
137 148
138 /* optionally saved, might be zero */ 149 /* optionally saved, might be zero */
139 AV *defav; 150 AV *defav;
140 SV *defsv; 151 SV *defsv;
141 SV *errsv; 152 SV *errsv;
142 153
143 /* saved global state not related to stacks */ 154#define VAR(name,type) type name;
144 U8 dowarn; 155# include "state.h"
145 I32 in_eval; 156#undef VAR
146
147 /* the stacks and related info (callchain etc..) */
148 PERL_SI *curstackinfo;
149 AV *curstack;
150 AV *mainstack;
151 SV **stack_sp;
152 OP *op;
153 SV **curpad;
154 AV *comppad;
155 CV *compcv;
156 SV **stack_base;
157 SV **stack_max;
158 SV **tmps_stack;
159 I32 tmps_floor;
160 I32 tmps_ix;
161 I32 tmps_max;
162 I32 *markstack;
163 I32 *markstack_ptr;
164 I32 *markstack_max;
165 I32 *scopestack;
166 I32 scopestack_ix;
167 I32 scopestack_max;
168 ANY *savestack;
169 I32 savestack_ix;
170 I32 savestack_max;
171 OP **retstack;
172 I32 retstack_ix;
173 I32 retstack_max;
174 PMOP *curpm;
175 COP *curcop;
176 157
177 /* coro process data */ 158 /* coro process data */
178 int prio; 159 int prio;
179}; 160};
180 161
244 225
245#define PERL_MAGIC_coro PERL_MAGIC_ext 226#define PERL_MAGIC_coro PERL_MAGIC_ext
246 227
247static MGVTBL vtbl_coro = {0, 0, 0, 0, coro_cv_free}; 228static MGVTBL vtbl_coro = {0, 0, 0, 0, coro_cv_free};
248 229
230#define CORO_MAGIC(cv) \
231 SvMAGIC (cv) \
232 ? SvMAGIC (cv)->mg_type == PERL_MAGIC_coro \
233 ? SvMAGIC (cv) \
234 : mg_find ((SV *)cv, PERL_MAGIC_coro) \
235 : 0
236
249/* the next two functions merely cache the padlists */ 237/* the next two functions merely cache the padlists */
250static void 238static void
251get_padlist (CV *cv) 239get_padlist (CV *cv)
252{ 240{
253 MAGIC *mg = mg_find ((SV *)cv, PERL_MAGIC_coro); 241 MAGIC *mg = CORO_MAGIC (cv);
242 AV *av;
254 243
255 if (mg && AvFILLp ((AV *)mg->mg_obj) >= 0) 244 if (mg && AvFILLp ((av = (AV *)mg->mg_obj)) >= 0)
256 CvPADLIST (cv) = (AV *)av_pop ((AV *)mg->mg_obj); 245 CvPADLIST (cv) = (AV *)AvARRAY (av)[AvFILLp (av)--];
257 else 246 else
258 { 247 {
259#if 0 248#if 0
260 /* this is probably cleaner, but also slower? */ 249 /* this is probably cleaner, but also slower? */
261 CV *cp = Perl_cv_clone (cv); 250 CV *cp = Perl_cv_clone (cv);
269} 258}
270 259
271static void 260static void
272put_padlist (CV *cv) 261put_padlist (CV *cv)
273{ 262{
274 MAGIC *mg = mg_find ((SV *)cv, PERL_MAGIC_coro); 263 MAGIC *mg = CORO_MAGIC (cv);
264 AV *av;
275 265
276 if (!mg) 266 if (!mg)
277 { 267 {
278 sv_magic ((SV *)cv, 0, PERL_MAGIC_coro, 0, 0); 268 sv_magic ((SV *)cv, 0, PERL_MAGIC_coro, 0, 0);
279 mg = mg_find ((SV *)cv, PERL_MAGIC_coro); 269 mg = mg_find ((SV *)cv, PERL_MAGIC_coro);
280 mg->mg_virtual = &vtbl_coro; 270 mg->mg_virtual = &vtbl_coro;
281 mg->mg_obj = (SV *)newAV (); 271 mg->mg_obj = (SV *)newAV ();
282 } 272 }
283 273
284 av_push ((AV *)mg->mg_obj, (SV *)CvPADLIST (cv)); 274 av = (AV *)mg->mg_obj;
275
276 if (AvFILLp (av) >= AvMAX (av))
277 av_extend (av, AvMAX (av) + 1);
278
279 AvARRAY (av)[++AvFILLp (av)] = (SV *)CvPADLIST (cv);
285} 280}
286 281
287#define SB do { 282#define SB do {
288#define SE } while (0) 283#define SE } while (0)
289 284
293#define REPLACE_SV(sv,val) SB SvREFCNT_dec(sv); (sv) = (val); (val) = 0; SE 288#define REPLACE_SV(sv,val) SB SvREFCNT_dec(sv); (sv) = (val); (val) = 0; SE
294 289
295static void 290static void
296load_state(Coro__State c) 291load_state(Coro__State c)
297{ 292{
298 PL_dowarn = c->dowarn; 293#define VAR(name,type) PL_ ## name = c->name;
299 PL_in_eval = c->in_eval; 294# include "state.h"
300 295#undef VAR
301 PL_curstackinfo = c->curstackinfo;
302 PL_curstack = c->curstack;
303 PL_mainstack = c->mainstack;
304 PL_stack_sp = c->stack_sp;
305 PL_op = c->op;
306 PL_curpad = c->curpad;
307 PL_comppad = c->comppad;
308 PL_compcv = c->compcv;
309 PL_stack_base = c->stack_base;
310 PL_stack_max = c->stack_max;
311 PL_tmps_stack = c->tmps_stack;
312 PL_tmps_floor = c->tmps_floor;
313 PL_tmps_ix = c->tmps_ix;
314 PL_tmps_max = c->tmps_max;
315 PL_markstack = c->markstack;
316 PL_markstack_ptr = c->markstack_ptr;
317 PL_markstack_max = c->markstack_max;
318 PL_scopestack = c->scopestack;
319 PL_scopestack_ix = c->scopestack_ix;
320 PL_scopestack_max = c->scopestack_max;
321 PL_savestack = c->savestack;
322 PL_savestack_ix = c->savestack_ix;
323 PL_savestack_max = c->savestack_max;
324#if !PERL_VERSION_ATLEAST (5,9,0)
325 PL_retstack = c->retstack;
326 PL_retstack_ix = c->retstack_ix;
327 PL_retstack_max = c->retstack_max;
328#endif
329 PL_curpm = c->curpm;
330 PL_curcop = c->curcop;
331 296
332 if (c->defav) REPLACE_SV (GvAV (PL_defgv), c->defav); 297 if (c->defav) REPLACE_SV (GvAV (PL_defgv), c->defav);
333 if (c->defsv) REPLACE_SV (DEFSV , c->defsv); 298 if (c->defsv) REPLACE_SV (DEFSV , c->defsv);
334 if (c->errsv) REPLACE_SV (ERRSV , c->errsv); 299 if (c->errsv) REPLACE_SV (ERRSV , c->errsv);
335 300
338 CV *cv; 303 CV *cv;
339 304
340 /* now do the ugly restore mess */ 305 /* now do the ugly restore mess */
341 while ((cv = (CV *)POPs)) 306 while ((cv = (CV *)POPs))
342 { 307 {
343 AV *padlist = (AV *)POPs;
344
345 if (padlist)
346 {
347 put_padlist (cv); /* mark this padlist as available */ 308 put_padlist (cv); /* mark this padlist as available */
348 CvPADLIST(cv) = padlist; 309 CvDEPTH (cv) = PTR2IV (POPs);
349 } 310 CvPADLIST (cv) = (AV *)POPs;
350
351 ++CvDEPTH(cv);
352 } 311 }
353 312
354 PUTBACK; 313 PUTBACK;
355 } 314 }
356} 315}
378 PERL_CONTEXT *cx = &ccstk[cxix--]; 337 PERL_CONTEXT *cx = &ccstk[cxix--];
379 338
380 if (CxTYPE(cx) == CXt_SUB) 339 if (CxTYPE(cx) == CXt_SUB)
381 { 340 {
382 CV *cv = cx->blk_sub.cv; 341 CV *cv = cx->blk_sub.cv;
342
383 if (CvDEPTH(cv)) 343 if (CvDEPTH (cv))
384 { 344 {
385 EXTEND (SP, CvDEPTH(cv)*2); 345 EXTEND (SP, 3);
386
387 while (--CvDEPTH(cv))
388 {
389 /* this tells the restore code to increment CvDEPTH */
390 PUSHs (Nullsv);
391 PUSHs ((SV *)cv);
392 }
393 346
394 PUSHs ((SV *)CvPADLIST(cv)); 347 PUSHs ((SV *)CvPADLIST(cv));
348 PUSHs (INT2PTR (SV *, CvDEPTH (cv)));
395 PUSHs ((SV *)cv); 349 PUSHs ((SV *)cv);
396 350
351 CvDEPTH (cv) = 0;
397 get_padlist (cv); 352 get_padlist (cv);
398 } 353 }
399 } 354 }
400#ifdef CXt_FORMAT 355#ifdef CXt_FORMAT
401 else if (CxTYPE(cx) == CXt_FORMAT) 356 else if (CxTYPE(cx) == CXt_FORMAT)
420 375
421 c->defav = flags & TRANSFER_SAVE_DEFAV ? (AV *)SvREFCNT_inc (GvAV (PL_defgv)) : 0; 376 c->defav = flags & TRANSFER_SAVE_DEFAV ? (AV *)SvREFCNT_inc (GvAV (PL_defgv)) : 0;
422 c->defsv = flags & TRANSFER_SAVE_DEFSV ? SvREFCNT_inc (DEFSV) : 0; 377 c->defsv = flags & TRANSFER_SAVE_DEFSV ? SvREFCNT_inc (DEFSV) : 0;
423 c->errsv = flags & TRANSFER_SAVE_ERRSV ? SvREFCNT_inc (ERRSV) : 0; 378 c->errsv = flags & TRANSFER_SAVE_ERRSV ? SvREFCNT_inc (ERRSV) : 0;
424 379
425 c->dowarn = PL_dowarn; 380#define VAR(name,type)c->name = PL_ ## name;
426 c->in_eval = PL_in_eval; 381# include "state.h"
427 382#undef VAR
428 c->curstackinfo = PL_curstackinfo;
429 c->curstack = PL_curstack;
430 c->mainstack = PL_mainstack;
431 c->stack_sp = PL_stack_sp;
432 c->op = PL_op;
433 c->curpad = PL_curpad;
434 c->comppad = PL_comppad;
435 c->compcv = PL_compcv;
436 c->stack_base = PL_stack_base;
437 c->stack_max = PL_stack_max;
438 c->tmps_stack = PL_tmps_stack;
439 c->tmps_floor = PL_tmps_floor;
440 c->tmps_ix = PL_tmps_ix;
441 c->tmps_max = PL_tmps_max;
442 c->markstack = PL_markstack;
443 c->markstack_ptr = PL_markstack_ptr;
444 c->markstack_max = PL_markstack_max;
445 c->scopestack = PL_scopestack;
446 c->scopestack_ix = PL_scopestack_ix;
447 c->scopestack_max = PL_scopestack_max;
448 c->savestack = PL_savestack;
449 c->savestack_ix = PL_savestack_ix;
450 c->savestack_max = PL_savestack_max;
451#if !PERL_VERSION_ATLEAST (5,9,0)
452 c->retstack = PL_retstack;
453 c->retstack_ix = PL_retstack_ix;
454 c->retstack_max = PL_retstack_max;
455#endif
456 c->curpm = PL_curpm;
457 c->curcop = PL_curcop;
458} 383}
459 384
460/* 385/*
461 * allocate various perl stacks. This is an exact copy 386 * allocate various perl stacks. This is an exact copy
462 * of perl.c:init_stacks, except that it uses less memory 387 * of perl.c:init_stacks, except that it uses less memory
691 616
692 return cctx; 617 return cctx;
693} 618}
694 619
695static void 620static void
696cctx_free (coro_cctx *cctx) 621cctx_destroy (coro_cctx *cctx)
697{ 622{
698 if (!cctx) 623 if (!cctx)
699 return; 624 return;
700 625
701 --cctx_count; 626 --cctx_count;
718{ 643{
719 coro_cctx *cctx; 644 coro_cctx *cctx;
720 645
721 if (cctx_first) 646 if (cctx_first)
722 { 647 {
723 --cctx_idle;
724 cctx = cctx_first; 648 cctx = cctx_first;
725 cctx_first = cctx->next; 649 cctx_first = cctx->next;
650 --cctx_idle;
726 } 651 }
727 else 652 else
728 { 653 {
729 cctx = cctx_new (); 654 cctx = cctx_new ();
730 PL_op = PL_op->op_next; 655 PL_op = PL_op->op_next;
734} 659}
735 660
736static void 661static void
737cctx_put (coro_cctx *cctx) 662cctx_put (coro_cctx *cctx)
738{ 663{
664 /* free another cctx if overlimit */
665 if (cctx_idle >= MAX_IDLE_CCTX)
666 {
667 coro_cctx *first = cctx_first;
668 cctx_first = first->next;
669 --cctx_idle;
670
671 assert (!first->inuse);
672 cctx_destroy (first);
673 }
674
739 ++cctx_idle; 675 ++cctx_idle;
740 cctx->next = cctx_first; 676 cctx->next = cctx_first;
741 cctx_first = cctx; 677 cctx_first = cctx;
742} 678}
743 679
751 if (flags == TRANSFER_SET_STACKLEVEL) 687 if (flags == TRANSFER_SET_STACKLEVEL)
752 ((coro_cctx *)prev)->idle_sp = STACKLEVEL; 688 ((coro_cctx *)prev)->idle_sp = STACKLEVEL;
753 else if (prev != next) 689 else if (prev != next)
754 { 690 {
755 coro_cctx *prev__cctx; 691 coro_cctx *prev__cctx;
692
693 if (!prev->cctx)
694 {
695 /* create a new empty context */
696 Newz (0, prev->cctx, 1, coro_cctx);
697 prev->cctx->inuse = 1;
698 prev->flags |= CF_RUNNING;
699 }
700
701 if (!prev->flags & CF_RUNNING)
702 croak ("Coro::State::transfer called with non-running prev Coro::State, but can only transfer from running states");
703
704 if (next->flags & CF_RUNNING)
705 croak ("Coro::State::transfer called with running next Coro::State, but can only transfer to inactive states");
706
707 prev->flags &= ~CF_RUNNING;
708 next->flags |= CF_RUNNING;
756 709
757 LOCK; 710 LOCK;
758 711
759 if (next->mainstack) 712 if (next->mainstack)
760 { 713 {
767 /* need to start coroutine */ 720 /* need to start coroutine */
768 /* first get rid of the old state */ 721 /* first get rid of the old state */
769 SAVE (prev, -1); 722 SAVE (prev, -1);
770 /* setup coroutine call */ 723 /* setup coroutine call */
771 setup_coro (next); 724 setup_coro (next);
772 /* need a stack */ 725 /* need a new stack */
773 next->cctx = 0; 726 assert (!next->stack);
774 } 727 }
775
776 if (!prev->cctx)
777 /* create a new empty context */
778 Newz (0, prev->cctx, 1, coro_cctx);
779 728
780 prev__cctx = prev->cctx; 729 prev__cctx = prev->cctx;
781 730
782 /* possibly "free" the cctx */ 731 /* possibly "free" the cctx */
783 if (prev__cctx->idle_sp == STACKLEVEL) 732 if (prev__cctx->idle_sp == STACKLEVEL)
784 { 733 {
734 /* I assume that STACKLEVEL is a stronger indicator than PL_top_env changes */
735 assert (PL_top_env == prev__cctx->top_env);
736
785 cctx_put (prev__cctx); 737 cctx_put (prev__cctx);
786 prev->cctx = 0; 738 prev->cctx = 0;
787 } 739 }
788 740
789 if (!next->cctx) 741 if (!next->cctx)
790 next->cctx = cctx_get (); 742 next->cctx = cctx_get ();
791 743
792 if (prev__cctx != next->cctx) 744 if (prev__cctx != next->cctx)
793 { 745 {
746 assert ( prev__cctx->inuse);
747 assert (!next->cctx->inuse);
748
749 prev__cctx->inuse = 0;
750 next->cctx->inuse = 1;
751
794 prev__cctx->top_env = PL_top_env; 752 prev__cctx->top_env = PL_top_env;
795 PL_top_env = next->cctx->top_env; 753 PL_top_env = next->cctx->top_env;
796 coro_transfer (&prev__cctx->cctx, &next->cctx->cctx); 754 coro_transfer (&prev__cctx->cctx, &next->cctx->cctx);
797 } 755 }
798 756
814coro_state_destroy (struct coro *coro) 772coro_state_destroy (struct coro *coro)
815{ 773{
816 if (coro->refcnt--) 774 if (coro->refcnt--)
817 return; 775 return;
818 776
777 if (coro->flags & CF_RUNNING)
778 croak ("FATAL: tried to destroy currently running coroutine");
779
819 if (coro->mainstack && coro->mainstack != main_mainstack) 780 if (coro->mainstack && coro->mainstack != main_mainstack)
820 { 781 {
821 struct coro temp; 782 struct coro temp;
822 783
823 SAVE ((&temp), TRANSFER_SAVE_ALL); 784 SAVE ((&temp), TRANSFER_SAVE_ALL);
828 LOAD ((&temp)); /* this will get rid of defsv etc.. */ 789 LOAD ((&temp)); /* this will get rid of defsv etc.. */
829 790
830 coro->mainstack = 0; 791 coro->mainstack = 0;
831 } 792 }
832 793
833 cctx_free (coro->cctx); 794 cctx_destroy (coro->cctx);
834 SvREFCNT_dec (coro->args); 795 SvREFCNT_dec (coro->args);
835 Safefree (coro); 796 Safefree (coro);
836} 797}
837 798
838static int 799static int
920static GV *coro_current, *coro_idle; 881static GV *coro_current, *coro_idle;
921static AV *coro_ready [PRIO_MAX-PRIO_MIN+1]; 882static AV *coro_ready [PRIO_MAX-PRIO_MIN+1];
922static int coro_nready; 883static int coro_nready;
923 884
924static void 885static void
925coro_enq (SV *sv) 886coro_enq (SV *coro_sv)
926{ 887{
927 int prio;
928
929 if (SvTYPE (sv) != SVt_PVHV)
930 croak ("Coro::ready tried to enqueue something that is not a coroutine");
931
932 prio = SvSTATE (sv)->prio;
933
934 av_push (coro_ready [prio - PRIO_MIN], sv); 888 av_push (coro_ready [SvSTATE (coro_sv)->prio - PRIO_MIN], coro_sv);
935 coro_nready++; 889 coro_nready++;
936} 890}
937 891
938static SV * 892static SV *
939coro_deq (int min_prio) 893coro_deq (int min_prio)
952 } 906 }
953 907
954 return 0; 908 return 0;
955} 909}
956 910
957static void 911static int
958api_ready (SV *coro) 912api_ready (SV *coro_sv)
959{ 913{
960 dTHX; 914 struct coro *coro;
961 915
962 if (SvROK (coro)) 916 if (SvROK (coro_sv))
963 coro = SvRV (coro); 917 coro_sv = SvRV (coro_sv);
918
919 coro = SvSTATE (coro_sv);
920
921 if (coro->flags & CF_READY)
922 return 0;
923
924 if (coro->flags & CF_RUNNING)
925 croak ("Coro::ready called on currently running coroutine");
926
927 coro->flags |= CF_READY;
964 928
965 LOCK; 929 LOCK;
966 coro_enq (SvREFCNT_inc (coro)); 930 coro_enq (SvREFCNT_inc (coro_sv));
967 UNLOCK; 931 UNLOCK;
932
933 return 1;
934}
935
936static int
937api_is_ready (SV *coro_sv)
938{
939 return !!SvSTATE (coro_sv)->flags & CF_READY;
968} 940}
969 941
970static void 942static void
971prepare_schedule (struct transfer_args *ta) 943prepare_schedule (struct transfer_args *ta)
972{ 944{
1008 coro_mortal = prev; 980 coro_mortal = prev;
1009 981
1010 ta->prev = SvSTATE (prev); 982 ta->prev = SvSTATE (prev);
1011 ta->next = SvSTATE (next); 983 ta->next = SvSTATE (next);
1012 ta->flags = TRANSFER_SAVE_ALL; 984 ta->flags = TRANSFER_SAVE_ALL;
985
986 ta->next->flags &= ~CF_READY;
1013} 987}
1014 988
1015static void 989static void
1016prepare_cede (struct transfer_args *ta) 990prepare_cede (struct transfer_args *ta)
1017{ 991{
1018 LOCK; 992 api_ready (GvSV (coro_current));
1019 coro_enq (SvREFCNT_inc (SvRV (GvSV (coro_current))));
1020 UNLOCK;
1021 993
1022 prepare_schedule (ta); 994 prepare_schedule (ta);
1023} 995}
1024 996
1025static void 997static void
1211 SV *sv = perl_get_sv("Coro::API", 1); 1183 SV *sv = perl_get_sv("Coro::API", 1);
1212 1184
1213 coroapi.schedule = api_schedule; 1185 coroapi.schedule = api_schedule;
1214 coroapi.cede = api_cede; 1186 coroapi.cede = api_cede;
1215 coroapi.ready = api_ready; 1187 coroapi.ready = api_ready;
1188 coroapi.is_ready = api_is_ready;
1216 coroapi.nready = &coro_nready; 1189 coroapi.nready = &coro_nready;
1217 coroapi.current = coro_current; 1190 coroapi.current = coro_current;
1218 1191
1219 GCoroAPI = &coroapi; 1192 GCoroAPI = &coroapi;
1220 sv_setiv (sv, (IV)&coroapi); 1193 sv_setiv (sv, (IV)&coroapi);
1240 1213
1241 coro->prio = newprio; 1214 coro->prio = newprio;
1242 } 1215 }
1243} 1216}
1244 1217
1245void 1218SV *
1246ready (SV *self) 1219ready (SV *self)
1247 PROTOTYPE: $ 1220 PROTOTYPE: $
1248 CODE: 1221 CODE:
1249 api_ready (self); 1222 RETVAL = boolSV (api_ready (self));
1223 OUTPUT:
1224 RETVAL
1225
1226SV *
1227is_ready (SV *self)
1228 PROTOTYPE: $
1229 CODE:
1230 RETVAL = boolSV (api_is_ready (self));
1231 OUTPUT:
1232 RETVAL
1250 1233
1251int 1234int
1252nready (...) 1235nready (...)
1253 PROTOTYPE: 1236 PROTOTYPE:
1254 CODE: 1237 CODE:

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines