1. Source Code Question ?

Bernie

My files in archive:
WMOTOR, XMOTOR, W32ENGIN, MIXEDLIB, EU_ENGIN, WIN32ERU, WIN32API 

Can be downloaded here:
http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&win=on&lnx=on&gen=on&keywords=bernie+ryan

new topic     » topic index » view message » categorize

2. Re: Source Code Question ?

Whoops !

In file be_machine.e :

This piece of code does not make sense it is always going to be included ?

I also think it should have a simple user message like:

" Your program is using an illegal poke or peek in a reserved
memory location ! "

because the average user does not know what a machine-level exception is.
  
-------------------------------

#ifdef ERUNTIME
void Machine_Handler(int sig_no)
/* illegal instruction, segmentation violation */
{
RTFatal("A machine-level exception occurred during execution of your
    program");
}
#else
void Machine_Handler(int sig_no)
/* illegal instruction, segmentation violation */
{
RTFatal("A machine-level exception occurred during execution of this
    statement");
}
#endif
    
-----------------------------------------------------


Bernie

My files in archive:
WMOTOR, XMOTOR, W32ENGIN, MIXEDLIB, EU_ENGIN, WIN32ERU, WIN32API 

Can be downloaded here:
http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&win=on&lnx=on&gen=on&keywords=bernie+ryan

new topic     » goto parent     » topic index » view message » categorize

3. Re: Source Code Question ?

Bernie Ryan wrote:
> 
> 
> Bernie
> 
> My files in archive:
> WMOTOR, XMOTOR, W32ENGIN, MIXEDLIB, EU_ENGIN, WIN32ERU, WIN32API 
> 
> Can be downloaded here:
> <a
> href="http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&win=on&lnx=on&gen=on&keywords=bernie+ryan">http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&win=on&lnx=on&gen=on&keywords=bernie+ryan</a>

new topic     » goto parent     » topic index » view message » categorize

4. Re: Source Code Question ?

Bernie Ryan wrote:
> 
> Whoops !
> 
> In file be_machine.e :
> 
> This piece of code does not make sense it is always going to be included ?
> 
> I also think it should have a simple user message like:
> 
> " Your program is using an illegal poke or peek in a reserved
> memory location ! "
> 
> because the average user does not know what a machine-level exception is.
>   
> -------------------------------
> 
> #ifdef ERUNTIME
> void Machine_Handler(int sig_no)
> /* illegal instruction, segmentation violation */
> {
>     RTFatal("A machine-level exception occurred during execution of your
>     program");
> }
> #else
> void Machine_Handler(int sig_no)
> /* illegal instruction, segmentation violation */
> {
>     RTFatal("A machine-level exception occurred during execution of this
>     statement");
> }
> #endif
>     
> -----------------------------------------------------
> 
> 




That should be be_machine.c


Bernie

My files in archive:
WMOTOR, XMOTOR, W32ENGIN, MIXEDLIB, EU_ENGIN, WIN32ERU, WIN32API 

Can be downloaded here:
http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&win=on&lnx=on&gen=on&keywords=bernie+ryan

new topic     » goto parent     » topic index » view message » categorize

5. Re: Source Code Question ?

Bernie Ryan wrote:
> 
> Whoops !
> 
> In file be_machine.e :
> 
> This piece of code does not make sense it is always going to be included ?
> 
> I also think it should have a simple user message like:
> 
> " Your program is using an illegal poke or peek in a reserved
> memory location ! "
> 
> because the average user does not know what a machine-level exception is.
>   
> -------------------------------
> 
> #ifdef ERUNTIME
> void Machine_Handler(int sig_no)
> /* illegal instruction, segmentation violation */
> {
>     RTFatal("A machine-level exception occurred during execution of your
>     program");
> }
> #else
> void Machine_Handler(int sig_no)
> /* illegal instruction, segmentation violation */
> {
>     RTFatal("A machine-level exception occurred during execution of this
>     statement");
> }
> #endif

When ERUNTIME is defined, it means that the backend library for translating
is being built.  In the translator, all sorts of crazy stuff can cause a
machine-level exception that would normally be caught by the interpreter,
like an index out of bounds.

The translator doesn't do this sort of checking.  You're assumed to have 
thoroughly debugged your program before you translate.  And there's no
way to tell which statement has caused this error.  In the interpreter,
however, we can tell which statement was last executed, so the message
is a bit different.

Matt

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu