473,405 Members | 2,282 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

targeting the PVM

I wan't to write a small compiler for a small language with some experimental
features. I want the target to be portable. I'm evaluating both JVM and Python
Virtual Machine, both of which seem to be appropriate. I have found that the
format of the "JVM machine language" (i.e. class files) is well documented.
However I was not able to find some good documentation on "Python's machine
language".

Can someone provide with pointers?


-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/

Jul 18 '05 #1
1 1588

<an**@post.tau.ac.il> wrote in message
news:ma************************************@python .org...
I wan't to write a small compiler for a small language with some experimental features. I want the target to be portable. I'm evaluating both JVM and Python Virtual Machine, both of which seem to be appropriate.
Since it is a somewhat 'private' implementation device for CPython,
the developers retain the right to change the byte code or even
switch, for instance, to a register rather than stack machine.
However, the Python license will allow you to distribute any
particular interpreter (PVM) version for as long as you want.
However I was not able to find some good documentation on "Python's machine language".


Lib Reg 18.10 dis -- Disassembler for Python byte code
Lib Ref 18.10.1 Python Byte Code Instructions

To learn acual usage, experiment with dis.dis and defed functions or
compile()ed code objects. Example:
import dis
def bd(code): return dis.dis(compile(code,'<S>', 'eval')) .... bd('1+2')

0 SET_LINENO 0
3 LOAD_CONST 0 (1)
6 LOAD_CONST 1 (2)
9 BINARY_ADD
10 RETURN_VALUE
Jul 18 '05 #2

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

Similar topics

1
by: mark | last post by:
Adding an applet to a web page through the <object> tag, allows you to target the JVM in 2 ways. (ref. http://java.sun.com/products/plugin/versions.html ) 1. "Dynamic Versioning", which ...
3
by: John Bailo | last post by:
This week, the week of Linux Expo It's all about the desktop and it's all about Novell. Can there be any doubt that Parmisano is gonna sandpaper Bill Gate ass with Suse? With IBM hiring...
2
by: Todd Brown | last post by:
I'm building a .NET application that I want to be as compatible as possible. Hence, I want to target .NET 1.0. I followed the instructions in the VS online documentation which basically consisted...
5
by: Hemanth | last post by:
Hello there, I'm running a script that opens a popup window (which is basically a form with checkboxes and a submit button). When I click the submit button I want to run a PHP script and target...
2
by: Özden Irmak | last post by:
Hello, I've read in some websites that you need some sort of tweak (a config file) to do this... Let me give you a specific example...I'm mostly interested in developing components and user...
1
by: sundarvenkata | last post by:
Is multi-targeting possible using Visual Studio Express? If not, do I have any other options to target a 1.1 framework using Visual Studio Express? Thanks for your help, Sundar
0
by: bharathreddy | last post by:
Vs 2008 is the MS latest IDE for developing Windows, Web, Smart Device Applications. It comes along with .NET Framework 3.5, C# 3.0, LINQ, ASP.NET AJAX and VSTO . Now with the power of VS 2008 we can...
4
by: peege0102 | last post by:
I'm trying to write a script so that every time a check box is clicked the entire tr in the table changes color. I wrote this one for targeting a paragraph so that every time its clicked it changes...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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,...
0
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,...

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.