Path: news.daimi.aau.dk!news!legolas From: legolas@quercus.daimi.aau.dk (Anders Jacob Truelsen) Newsgroups: comp.lang.beta Subject: Re: combining interpreted and compiled beta Date: 10 May 1995 07:13:18 GMT Organization: DAIMI, Computer Science Dept. of Aarhus Univ. Lines: 92 Message-ID: References: <3odc7a$dac@belfort.daimi.aau.dk> Reply-To: anders.truelsen@daimi.aau.dk NNTP-Posting-Host: quercus.daimi.aau.dk In-reply-to: eernst@quercus.daimi.aau.dk's message of 09 May 1995 16:51:03 GMT >>>>> "EE" == Erik Ernst writes: EE> In article <3odc7a$dac@belfort.daimi.aau.dk> Hans Erik Martino Hansen writes: EE> As a computerscientist student I have expirienced interpreted languages EE> as well as compiled ones. I am convinced one can develop faster in an EE> interpreted language than a compiled one. EE> Why not combine the two things in beta, the idea is as follows: EE> Compile a complete beta interpreter into the executable. EE> Have you checked out the PhD-thesis of Jawahar Malhotra? He EE> investigated this idea, designed an interpreter which can be linked EE> into any BETA-program, and implemented a version of it for an HP EE> platform. EE> I'm not quite sure which versions of OS and compiler it will work EE> with, but it is not likely to support all platforms supported by the EE> compiler, and perhaps it only works with an older version of the EE> compiler. Also, there could be parts of the language that are not yet EE> supported (I know that there has been problems related to 'leave EE> ' for cases where both compiled and interpreted code is EE> 'un-wound' from the stack. Somebody else should know much more about EE> this). I couldn't even find the thesis or any mention of it in the EE> ftp-able files reachable from the BETA www home pages; EE> .. "contrib"? .. "papers"? The easy part first, the thesis is called Tailorable systems: Design, Support, Techniques, and Applications DAIMI PS - 466 ISSN 0105-8517 (if that means anything to anybody) About the interpreter: Apart from the leave construct that Erik mentions above, which does not work for interpreted code inside compiled code, like 'loop' or 'cycle' :( the interpreter implements the same part of the BETA language as does the beta5.0 compiler. Before you start asking for it I'll note that Erik also is correct in his assumptions about available platforms. The interpreter is only running on a HP370 (mc68030) running hpux8 (maybe hpux9). There has not been made any attempts to port it to any other platforms as this process would be rather cumbersome and time consuming, as substantial parts of the code is _very_ macine dependent. eg: ---------------------------------------- AllocateItemVirtualBody:ObjectDescriptor ---------------------------------------- (# objAddr : @integer; do (code 'mov.l 8(%a0), %a1 # move to origin object i.e. the AllocateItemVirtual pat. mov.l 12(%a1), %a3 # put vdtEntry into %a3 mov.l 16(%a1), %d7 # put origin into %d7 AJT 15.06.94 jsr (%a3) # execute vdt entry code; sets up a1 = proto, a2 = origin jsr AlloI # inst in %a1 mov.l %a1, 12(%a0) # save obj in >objAddr<' code); (@@theObject, objAddr) -> assignRef; #) Any volunteers ??? Given a meta object protocol it might be possible to write a machine independent compiler, but for the time being it is not possible to support all five (HP,SUN,SGI,MAC,Intel) platforms that the beta compiler supports. As to my knowledge the interpreter will not be updated to 'match' beta5.1 either. cheers /anders -- _0 ,\ \ (*)/ ' Anders Truelsen email : legolas@daimi.aau.dk /%%\(*) CS. Dept. http://www.daimi.aau.dk/~legolas /%%%#%%\ University of Aarhus phone : +45 8942 3358 /%#%%%%%%#%\ 8000 Aarhus fax : +45 8942 3255 /%###% %%##%#%%\__ DENMARK Priv. : +45 8618 8915 /%%%## %%%% %####%% (these are my opinions only...) (design by M.Harvey )