summaryrefslogtreecommitdiff
path: root/pod
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1998-06-15 08:51:54 +0000
committerGurusamy Sarathy <gsar@cpan.org>1998-06-15 08:51:54 +0000
commit6224f72bf639f0ca7f774fe2738f2408b3e430ac (patch)
treed09466217844d04a8289a2d2d15377ce38987426 /pod
parent1163b5c41f1e1e2856ca82fef1598bfbb6c54d72 (diff)
downloadperl-6224f72bf639f0ca7f774fe2738f2408b3e430ac.tar.gz
back out previous change (it breaks PERL_OBJECT)
p4raw-id: //depot/perl@1136
Diffstat (limited to 'pod')
-rw-r--r--pod/perldiag.pod9
-rw-r--r--pod/perlguts.pod73
2 files changed, 1 insertions, 81 deletions
diff --git a/pod/perldiag.pod b/pod/perldiag.pod
index e35ad46619..8dd2f823a0 100644
--- a/pod/perldiag.pod
+++ b/pod/perldiag.pod
@@ -1380,11 +1380,6 @@ ignored.
(F) Your machine apparently doesn't implement ioctl(), which is pretty
strange for a machine that supports C.
-=item JMPENV_JUMP(%d) is bogus
-
-(S) Either some extension is trying to raise an exception type that is not
-supported by the JMPENV API, or memory has been corrupted. See L<perlguts>.
-
=item junk on end of regexp
(P) The regular expression parser is confused.
@@ -1920,9 +1915,7 @@ was string.
=item panic: top_env
-(X) An attempt was made to throw some sort of exception when there
-was no exception stack. Either perl failed to initialize properly, or
-the JMPENV API is being misused. See L<perlguts>.
+(P) The compiler attempted to do a goto, or something weird like that.
=item panic: yylex
diff --git a/pod/perlguts.pod b/pod/perlguts.pod
index dce6ca5752..fb52ecfcb7 100644
--- a/pod/perlguts.pod
+++ b/pod/perlguts.pod
@@ -1252,79 +1252,6 @@ is being used.
For a complete description of the PerlIO abstraction, consult L<perlapio>.
-=head2 Exception Trapping (JMPENV API)
-
-As of 5.005, the internal exception trapping mechanism is replaceable
-at run-time.
-
-For a concrete example of usage, see perl.c in the perl source
-distribution. Only a general outline is presented here.
-
-The C<TRYBLOCK()> macro is used to set up a exception handling switch.
-C<TRYBLOCK()> takes two arguments. The first argument is a table of
-exception handlers:
-
- struct tryvtbl {
- /* [0] executed before JMPENV_POP
- [1] executed after JMPENV_POP
- (NULL pointers are OK) */
- char *try_context;
- void (*try_normal [2]) _((CPERLproto_ void*));
- void (*try_abnormal [2]) _((CPERLproto_ void*));
- void (*try_exception [2]) _((CPERLproto_ void*));
- void (*try_myexit [2]) _((CPERLproto_ void*));
- };
- typedef struct tryvtbl TRYVTBL;
-
-Each of the functions correspond to the exception types that
-are currently supported. The two functions in each array are meant
-to be run before and after the exception context is exited, respectively,
-via C<JMPENV_POP()>.
-
-The second argument to C<TRYBLOCK()> is an opaque pointer that is passed
-as a first argument to each of the handler functions. This is usually
-a structure specific to each particular exception switch containing both
-the return value and the arguments to the handler functions.
-
-Any of the handler function pointers can be C<NULL> except for
-C<try_normal[0]>, which is the only thing executed by C<TRYBLOCK()>
-after setting up the exception context. Any code executed by
-C<try_normal[0]> is free to throw one of the three supported exceptions
-using C<JMPENV_JUMP()>. C<JMPENV_JUMP()> can be called with one of the
-following values:
-
- #define JMP_ABNORMAL 1 /* shouldn't happen */
- #define JMP_MYEXIT 2 /* exit */
- #define JMP_EXCEPTION 3 /* die */
-
-Control then resumes at the exception switch, which calls the handler
-corresponding to the type of exception that was thrown. More exceptions
-can be thrown while in the handler, and the process repeats until one of
-the handlers return normally.
-
-In other words, depending on how C<JMPENV_JUMP()> is called, either
-C<try_abnormal[0]>, C<try_exception[0]>, or C<try_myexit[0]> are executed.
-If C<JMPENV_JUMP()> is invoked yet again before the try handler completes
-then execution will B<restart> at the try handler which corresponds to the
-most recent C<JMPENV_JUMP()>. Care should be taken to avoid infinite
-loops.
-
-Once the try handler[0] finishes, execution moves on to one of the try
-handlers that are run after the exception context is exited (i.e.
-handler[1]). However, the difference between the two types of handlers
-is that exceptions raised in handlers run after exiting the exception
-context are no longer caught by the C<TRYBLOCK()>. Of course, they may
-be caught at some outer exception trap set up for the purpose. Therefore,
-C<JMPENV_JUMP()> at this point will not be trapped; it will jump to the
-previous C<TRYBLOCK()>. This is useful for propagating exceptions to the
-top of the stack.
-
-WARNING: At the time of this writing, the C<CC.pm> compiler backend
-does not support exception traps that are configurable at runtime. It
-only knows how to handle exceptions thrown with longjmp() (which is what
-the default exception mechanism in perl provides). This will be corrected
-in a future release.
-
=head2 Putting a C value on Perl stack
A lot of opcodes (this is an elementary operation in the internal perl