× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



-----Original Message-----
From: mi400-admin@midrange.com [mailto:mi400-admin@midrange.com]On
Behalf Of Paul Godtland

>W-Code is MUCH more optimizable, for at least two key reasons. First, it's
>expression-based instead of storage-based. That is, results are viewed as
>being returned to a logical (not necessarily physical) stack, not to the
>storage location specified as an operand on the instruction.

Does that mean the results can be retained in the registers of the cpu ?

>Secondly, the
>exception handling semantics are very different. One example: in W-Code
>there is no concept of handling an exception by transferring control to the
>"next" MI (or W-Code) instruction.

So exceptions are only handled on scope boundaries ?  Is that where
lumpiness comes in ?

This matters because the optimized code may execute more than 1 stmt at a
time or out of sequence and if an exception occurs, all the out of sequence
and parallel instruction changes have to be rolled back to as of the
instruction that caused the exception. If all the variables are on the scope
stack, the changes can all be undone by poping the stack and throwing the
exception back to the scope caller.

Is that correct ?  And if so, are pointer based variables not optimizable ?
So that in the following code:

void ChangeNumbers( int* pnNumber1, int* pnNumber2, int* pnNumber3 )
  {
  *pnNumber1 = 5 ;
  *pnNumber2 = 10 ;
  *pnNumber3 = 15 ;
  }

in case of an exception on the 2nd stmt ( pointer not set ), stmt1 must have
completed execution and stmt 3 must not be executed.

thank you Paul,

Steve Richter




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.