Change 27743 by [EMAIL PROTECTED] on 2006/04/08 18:07:27

        Make the fold_constants exception capture compatible with
        -DPERL_FLEXIBLE_EXCEPTIONS

Affected files ...

... //depot/maint-5.8/perl/embed.fnc#135 edit
... //depot/maint-5.8/perl/embed.h#102 edit
... //depot/maint-5.8/perl/op.c#126 edit
... //depot/maint-5.8/perl/proto.h#124 edit

Differences ...

==== //depot/maint-5.8/perl/embed.fnc#135 (text) ====
Index: perl/embed.fnc
--- perl/embed.fnc#134~27623~   2006-03-28 08:42:11.000000000 -0800
+++ perl/embed.fnc      2006-04-08 11:07:27.000000000 -0700
@@ -1087,6 +1087,9 @@
 sR     |OP*    |no_fh_allowed|NN OP *o
 sR     |OP*    |too_few_arguments|NN OP *o|NN const char* name
 sR     |OP*    |too_many_arguments|NN OP *o|NN const char* name
+#if defined(PERL_FLEXIBLE_EXCEPTIONS)
+s      |void*  |vcall_runops   |va_list args
+#endif
 #endif
 #if defined(PL_OP_SLAB_ALLOC)
 Apa    |void*  |Slab_Alloc     |int m|size_t sz

==== //depot/maint-5.8/perl/embed.h#102 (text+w) ====
Index: perl/embed.h
--- perl/embed.h#101~27512~     2006-03-15 12:21:52.000000000 -0800
+++ perl/embed.h        2006-04-08 11:07:27.000000000 -0700
@@ -1109,6 +1109,11 @@
 #define too_few_arguments      S_too_few_arguments
 #define too_many_arguments     S_too_many_arguments
 #endif
+#if defined(PERL_FLEXIBLE_EXCEPTIONS)
+#ifdef PERL_CORE
+#define vcall_runops           S_vcall_runops
+#endif
+#endif
 #endif
 #if defined(PL_OP_SLAB_ALLOC)
 #define Slab_Alloc             Perl_Slab_Alloc
@@ -3128,6 +3133,11 @@
 #define too_few_arguments(a,b) S_too_few_arguments(aTHX_ a,b)
 #define too_many_arguments(a,b)        S_too_many_arguments(aTHX_ a,b)
 #endif
+#if defined(PERL_FLEXIBLE_EXCEPTIONS)
+#ifdef PERL_CORE
+#define vcall_runops(a)                S_vcall_runops(aTHX_ a)
+#endif
+#endif
 #endif
 #if defined(PL_OP_SLAB_ALLOC)
 #define Slab_Alloc(a,b)                Perl_Slab_Alloc(aTHX_ a,b)

==== //depot/maint-5.8/perl/op.c#126 (text) ====
Index: perl/op.c
--- perl/op.c#125~27742~        2006-04-08 10:28:28.000000000 -0700
+++ perl/op.c   2006-04-08 11:07:27.000000000 -0700
@@ -2059,6 +2059,15 @@
     return o;
 }
 
+#ifdef PERL_FLEXIBLE_EXCEPTIONS
+STATIC void *
+S_vcall_runops(pTHX_ va_list args)
+{
+    CALLRUNOPS(aTHX);
+    return NULL;
+}
+#endif
+
 OP *
 Perl_fold_constants(pTHX_ register OP *o)
 {
@@ -2143,11 +2152,17 @@
            PL_in_eval = EVAL_INEVAL;
            sv_setpvn(ERRSV,"",0);
        }
-    JMPENV_PUSH(ret);
 
+#ifdef PERL_FLEXIBLE_EXCEPTIONS
+    CALLPROTECT(aTHX_ pcur_env, &ret, MEMBER_TO_FPTR(S_vcall_runops));
+#else
+    JMPENV_PUSH(ret);
+#endif
     switch (ret) {
     case 0:
+#ifndef PERL_FLEXIBLE_EXCEPTIONS
        CALLRUNOPS(aTHX);
+#endif
        sv = *(PL_stack_sp--);
        if (o->op_targ && sv == PAD_SV(o->op_targ))     /* grab pad temp? */
            pad_swipe(o->op_targ,  FALSE);

==== //depot/maint-5.8/perl/proto.h#124 (text+w) ====
Index: perl/proto.h
--- perl/proto.h#123~27623~     2006-03-28 08:42:11.000000000 -0800
+++ perl/proto.h        2006-04-08 11:07:27.000000000 -0700
@@ -1624,6 +1624,9 @@
 STATIC OP*     S_too_many_arguments(pTHX_ OP *o, const char* name)
                        __attribute__warn_unused_result__;
 
+#if defined(PERL_FLEXIBLE_EXCEPTIONS)
+STATIC void*   S_vcall_runops(pTHX_ va_list args);
+#endif
 #endif
 #if defined(PL_OP_SLAB_ALLOC)
 PERL_CALLCONV void*    Perl_Slab_Alloc(pTHX_ int m, size_t sz)
End of Patch.

Reply via email to