This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Xplatform C
- To: gcc at gcc dot gnu dot org
- Subject: Xplatform C
- From: Paton Wong <patonw at mail dot com>
- Date: Thu, 13 Jul 2000 04:15:57 -0400 (EDT)
I really don't like java. I was wondering if it would be possible to build a system to compile C code into some binary format and have it run on any system and even have a gui toolkit with widgets and stuff and a plug-in for netscape. I know it sound ambitious, but I don't plan to implement it, at least not if I have to do such a thing my self. So if someone were to use gcc as a starting point to produce half bytecode/half assembly/and .00001 linkage-info files where would you modify gcc to output this sort of file. The goal would be to have a encoding that would translate to different basic assembly instructions addl, subl, imull, jmp, etc. and have the ability to call functions from libraries on the native platform. So one could link to libc, then distribute the binary. A user would download the binary and run it on his machine using either an special assembler or a virtual machine. If an assembler is used, Function calls and any platform dependent features are translated to something that will assemble on the platform, then the code is translated to machine language and linked using the linkage information in the file with a native linker and then the application is launched. If a virtual machine the linked names are looked up in a database of local libraries and those libraries are dynamically opened. Then the virtual machine steps through the program, recognizing the assembly instructions and the function calls, determining if the function is to be found within the file or if one of the libraries needs to be called.
The advantage of this is that gcc is already highly developed and highly regarded. It even has optimization, which I probably would not bother to put in if I were to write a compiler from scratch. So if you love c/c++ help me out here :-) because I find java, as a language, revolting (the drink is okay) and I do not trust micro$not one bit. How can you trust a company that engineers defects and thinks base64 encoding is strong encryption?
Oh, in terms of web languages, is C/C++ suitable for the task or should we just let another language like python or tcl/tk challenge java. I haven't seen tcl/tk have that much success even though the plugin is a lot more stable than java's and the language has been around longer. As for python, I really like the language, even though it isn't compiled and is a little slow but I haven't seen any plugins yet.
______________________________________________
FREE Personalized Email at Mail.com
Sign up at http://www.mail.com/?sr=signup