While looking at the code in dbg_main(), I saw that pike uses longjmps. I suspect the use for this is the exception handling stuff. Am I on the right track?
Can someone elaborate a bit on the usage as to where it is used in pike and how things are supposed to interact..?
Pike uses longjmp and setjmp to implement the exception system.
Pike_error does a longjmp to the first item in the error recovery list, that beeing the last place anyone did SETJMP (equivalent to catch in this context).
It then removes the item from the list.
There is also a list of functions that should be called when an error is encoutered (the *ONERROR macros in pike_error.h), those are called to clean up resources allocated but not yet anchored in any pike structures.
/ Per Hedbor ()
Previous text:
2004-10-15 14:11: Subject: longjmps in pike
While looking at the code in dbg_main(), I saw that pike uses longjmps. I suspect the use for this is the exception handling stuff. Am I on the right track?
Can someone elaborate a bit on the usage as to where it is used in pike and how things are supposed to interact..?
/ Marcus Agehall (PacketFront)
While looking at the code in dbg_main(), I saw that pike uses longjmps. I suspect the use for this is the exception handling stuff. Am I on the right track?
More or less. {set,long}jmp(3C) are used to implement catch/throw.
Can someone elaborate a bit on the usage as to where it is used in pike and how things are supposed to interact..?
What's to say? Look in pike_error.h for details.
/ Henrik Grubbström (Lysator)
Previous text:
2004-10-15 14:11: Subject: longjmps in pike
While looking at the code in dbg_main(), I saw that pike uses longjmps. I suspect the use for this is the exception handling stuff. Am I on the right track?
Can someone elaborate a bit on the usage as to where it is used in pike and how things are supposed to interact..?
/ Marcus Agehall (PacketFront)
What do I need to think of when using those functions? I've started to reorganize main.c a bit to make the main function a bit more modular.
The goal for the whole thing is to make pike embeddable. The first step is to make the main function a bit more modular so that another application can setup a master and execute pike-code using a couple of functions from main.c.
/ Marcus Agehall (PacketFront)
Previous text:
2004-10-15 14:16: Subject: longjmps in pike
While looking at the code in dbg_main(), I saw that pike uses longjmps. I suspect the use for this is the exception handling stuff. Am I on the right track?
More or less. {set,long}jmp(3C) are used to implement catch/throw.
Can someone elaborate a bit on the usage as to where it is used in pike and how things are supposed to interact..?
What's to say? Look in pike_error.h for details.
/ Henrik Grubbström (Lysator)
Nice move :) Like the idea of embeddable pike
Marcus Agehall (PacketFront) @ Pike (-) developers forum wrote:
What do I need to think of when using those functions? I've started to reorganize main.c a bit to make the main function a bit more modular.
The goal for the whole thing is to make pike embeddable. The first step is to make the main function a bit more modular so that another application can setup a master and execute pike-code using a couple of functions from main.c.
/ Marcus Agehall (PacketFront)
Previous text:
2004-10-15 14:16: Subject: longjmps in pike
While looking at the code in dbg_main(), I saw that pike uses longjmps. I suspect the use for this is the exception handling stuff. Am I on the right track?
More or less. {set,long}jmp(3C) are used to implement catch/throw.
Can someone elaborate a bit on the usage as to where it is used in pike and how things are supposed to interact..?
What's to say? Look in pike_error.h for details.
/ Henrik Grubbström (Lysator)
Well, it's one of the things that's on (at least my) wishlist for 8.0, so it's time to start working on it..
I made a prototype a few months back and it worked like a charm then. But I never tested it so much and I didn't have the time to clean the code and bring it up to stnadards, so I decided to start all over again.
/ Marcus Agehall (PacketFront)
Previous text:
2004-10-15 15:35: Subject: Re: longjmps in pike
Nice move :) Like the idea of embeddable pike
Marcus Agehall (PacketFront) @ Pike (-) developers forum wrote:
What do I need to think of when using those functions? I've started to reorganize main.c a bit to make the main function a bit more modular.
The goal for the whole thing is to make pike embeddable. The first step is to make the main function a bit more modular so that another application can setup a master and execute pike-code using a couple of functions from main.c.
/ Marcus Agehall (PacketFront)
Previous text:
2004-10-15 14:16: Subject: longjmps in pike
While looking at the code in dbg_main(), I saw that pike uses longjmps. I suspect the use for this is the exception handling stuff. Am I on the right track?
More or less. {set,long}jmp(3C) are used to implement catch/throw.
Can someone elaborate a bit on the usage as to where it is used in pike and how things are supposed to interact..?
What's to say? Look in pike_error.h for details.
/ Henrik Grubbström (Lysator)
/ Brevbäraren
pike-devel@lists.lysator.liu.se