--- Alan Burlison <[EMAIL PROTECTED]> wrote: > Benjamin Stuhl wrote: > > > Let me be more specific: if you're holding a mutex over > a > > call back into parrot, it's your own fault. Parrot > itself > > knows which functions may croak() and which won't, so > it > > can use utility funtions that return a status in places > > where it'd be unsafe to croak(). (And true panics > probably > > should not be croak()s the way they are in perl5 - > there's > > not much an application can do with "Bizarre copy of > > ARRAY") > > Just because parrot knows what functions can croak, it > doesn't mean that > it can possibly know which locks have been taken out all > the way back up > the stack between the call to longjmp and the > corresponding setjmp. And, > under your scheme we would potentially end up with two > copies of every > utility function - one croak_safe and one croak_unsafe.
Not very likely - the only reason I can find for most utility functions (other than possibly string coercions) to fail is either panic("out of memory!") or panic("data structures hopelessly confused!") (or maybe panic("mutexes not working!")) - anything likely to throw a programmatic exception would be at the opcode level, and so not be open to being called by random code. > > > Are we talking 'expensive in C' or 'expensive in > parrot?' > > > > Expensive in C (wasted memory bandwidth, code bloat -> > > cache waste), which translates to a slower parrot. > > So one that dumps core faster and more frequently is what > you seem to be > proposing. Great. Not at all. I have never seen a bug report of perl 5 dumping core due to a setjump() error. > > > As far as I'm aware, trading correctness for speed is > not > > > an option. > > > > This is true, which is why I asked if there were any > > platforms that have a nonfunctional (set|long)jump. > > Assume that Solaris has a non-functional setjmp if your > program is > threaded. How is this an ANSI-compliant C library if setjump() doesn't work? (No offense intended, I'm just curious.) -- BKS __________________________________________________ Do You Yahoo!? Listen to your Yahoo! Mail messages from any phone. http://phone.yahoo.com