× 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.


  • Subject: Re: Bitwise ops in RPG
  • From: Scott Klement <klemscot@xxxxxxxxxxxx>
  • Date: Thu, 16 Nov 2000 15:08:27 -0600 (CST)


Thanks for the info, Hans!  I find this sort of thing interesting...

Some day I'm going to try my hand at writing a compiler for something :)



On Thu, 16 Nov 2000 boldt@ca.ibm.com wrote:

> Scott wrote:
> >Just out of curiosity, how much work would it be to add
> >these BIFs into the compiler?  From my point of view
> >(keeping in mind that I've never written a compiler) they
> >seem like one of the more basic things that a computer
> >can do...
> 
> Well, first, there's the scan phase which has to parse the
> new built-in functions.  This can be the most work since
> we have to allow the BIF's in D-Specs as well as in
> expressions.  Allowing these BIF's as operands to keyword
> INZ requires evaluation of the BIF's at compile-time.
> 
> Then there's the relational diagnostics phase which checks
> the types of the operands.
> 
> Then the code generation phase.  Code gen isn't just a
> matter of emitting the ANDI, ORI, COM, and XORI W-Code
> instructions.  It also has to handle unequal sized operands,
> as well as operands that are longer than what the W-Codes
> normally support (depending on how the BIFs are defined).
> 
> Add onto that writing and running unit and component
> testcases, as well as design and code inspections for all
> of this.
> 
> Fortunately, these BIF's should be relatively straight-
> forward to design and implement.  Some enhancements,
> though, require lots of thinking and analysis and heavy
> debugging.  One good example in V5R1 was allowing the
> argument to keyword DIM to be forward-defined.  In V4R4,
> one change that required some heavy-duty design and
> analysis was the enhancements to keyword OVERLAY.
> 
> Cheers!  Hans
> 
> Hans Boldt, ILE RPG Development, IBM Toronto Lab, boldt@ca.ibm.com
> 

+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

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.