473,657 Members | 2,414 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Delphi to bytecode compiler

Hi all!

I'm wondering what would be involved in making a Delphi to bytecode
compiler... Does anyone have any experience writing compilers, that
could give me some advice?

The reason I think this would be useful, is that it would broaden the
scope of the Java platform, enabling many languages to be used (just
like .NET). There are already several langages (e.g. Java, Jython,
Groovy, and perhaps others), but it would be nice to have a language as
close as possible to Delphi syntax that could likewise compile into
bytecode. This would greatly facilitate converting projects from Delphi
to Java.

Any ideas?

Thanks!
Joanthan Neve.
Jul 17 '05 #1
3 3026
Jonathan Neve wrote:
I'm wondering what would be involved in making a Delphi to bytecode
compiler... Does anyone have any experience writing compilers, that
could give me some advice?


An ambitious project.

You might want to look for the book:

Programming for the Java Virtual Machine
Joshua Engel

which talks quite a lot about compiling non-Java to run on the JVM.

It might be that the book

Compiling for the .NET Common Language Runtime (CLR)
John Gough

would be even better in some ways. It largely focuses on running Component
Pascal on the CLR, and although the CRL is not the same as the JVM, there are
many similarities. The same implementation (gpcp) is also able to generate
Java bytecodes, so the author is JVM-aware and occasionally mentions JVM issues
in the book. The implementation is on the Web somewhere (you can Google for
"Component Pascal" and "gpcp" as easily as I) so you may be able to find
material about the JVM implementation if you look around a bit.

-- chris
Jul 17 '05 #2
Hi,
I wanted to do the same for my own language and wrote a library (still
working on it)
in C that allows to read/write Java bytecode
You can find out more at
http://sourceforge.net/projects/myfriend/
You could also check out the whole project
cvs -z3 -d:pserver:an*** ****@cvs.source forge.net:/cvsroot/myfriend co
myfriend/friend2java

"Jonathan Neve" <jo******@micro tec.fr> wrote in message
news:bd******** *************** ***@posting.goo gle.com...
Hi all!

I'm wondering what would be involved in making a Delphi to bytecode
compiler... Does anyone have any experience writing compilers, that
could give me some advice?

The reason I think this would be useful, is that it would broaden the
scope of the Java platform, enabling many languages to be used (just
like .NET). There are already several langages (e.g. Java, Jython,
Groovy, and perhaps others), but it would be nice to have a language as
close as possible to Delphi syntax that could likewise compile into
bytecode. This would greatly facilitate converting projects from Delphi
to Java.

Any ideas?

Thanks!
Joanthan Neve.

Jul 17 '05 #3
A couple of years ago Borland actually developed a prototype of a
Delphi->Java Bytecode compiler. But as far as I remember they never got
beyond console applications and considered the effort of translating VCL
code to Swing as too much. You could google the Borland newsgroups for
information about this project.

Kai

Jonathan Neve wrote:
Hi all!

I'm wondering what would be involved in making a Delphi to bytecode
compiler... Does anyone have any experience writing compilers, that
could give me some advice?

The reason I think this would be useful, is that it would broaden the
scope of the Java platform, enabling many languages to be used (just
like .NET). There are already several langages (e.g. Java, Jython,
Groovy, and perhaps others), but it would be nice to have a language as
close as possible to Delphi syntax that could likewise compile into
bytecode. This would greatly facilitate converting projects from Delphi
to Java.

Any ideas?

Thanks!
Joanthan Neve.


Jul 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2135
by: zku | last post by:
how to create java bytecode without using javac?
46
6266
by: Jon Perez | last post by:
Can one run a 1.5 .pyc file with the 2.x version interpreters and vice versa? How about running a 2.x .pyc using a 2.y interpreter?
33
2001
by: Maurice LING | last post by:
Hi, I've been using Python for about 2 years now, for my honours project and now my postgrad project. I must say that I am loving it more and more now. From my knowledge, Python bytecodes are not back-compatible. I must say that my technical background isn't strong enough but is there any good reason for not being back-compatible in bytecodes? My problem is not about pure python modules or libraries but the problem is with 3rd party...
11
2503
by: M1st0 | last post by:
where I can find the grammar of python bytecode ? ( better if is in BCF ).
0
2025
by: Andrew Lambert | last post by:
Hi, I've been trying to compile perl scripts into bytecode. Now, from what I understand I can use either perlcc -B script.pl or perl -MO=bytecode script.pl to do this (whats the difference between these two methods anyway ?). If I use perl -MO=bytecode, both versions I've tried dump seemingly random ascii characters to the screen. ActivePerl-5.8 completes with 'script syntax OK' while the standard redhat perl completes with 'No...
0
1199
by: sxanth | last post by:
>What puzzles me, though, are bytecodes 17, 39 and 42 - surely these aren't >reachable? Does the compiler just throw in a default 'return None' >epilogue, with routes there from every code path, even when it's not >needed? If so, why? Hi. pyc (http://freshmeat.net/projects/pyc) can already remove that unused code since June.
4
1259
by: Fabiano Sidler | last post by:
Hi folks! I'm looking for a way to compile python source to bytecode instead of code-objects. Is there a possibility to do that? The reason is: I want to store pure bytecode with no additional data. The second question is, therefore: How can I get the correct values for a given bytecode, such as the stacksize and flags attributes of the correspondent code object?
3
3245
by: Rob De Almeida | last post by:
Hi, I would like to compile an AST to bytecode, so I can eval it later. I tried using parse.compileast, but it fails: Traceback (most recent call last): File "<stdin>", line 1, in ? TypeError: compilest() argument 1 must be parser.st, not instance Any hints?
11
1432
by: Michael Spencer | last post by:
Announcing: compiler2 --------------------- For all you bytecode enthusiasts: 'compiler2' is an alternative to the standard library 'compiler' package, with several advantages. Improved pure-python compiler - Produces identical bytecode* to the built-in compile function for all /Lib and Lib/test modules, including 'peephole' optimizations
0
8402
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8315
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8829
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8608
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7341
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5633
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4323
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2733
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1962
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.