Shop OBEX P1 Docs P2 Docs Learn Events
Propeller Java — Parallax Forums

Propeller Java



Randomly found a tool that translates Java bytecode into native machine code. Also for Prop 1.
Maybe it's interesting for someone here

http://www.mikekohn.net/micro/java_grinder.php

Comments

  • Heater.Heater. Posts: 21,230
    Wow. How did that stay out of the radar here for such a long time?

    I'm no Java fan but that's impressive.

  • Heater.Heater. Posts: 21,230
    It only generates PASM to run in COG.
  • Uh oh, there is the Propeller chip alright, lumped in with venerable 6502/65816 and interesting to note an SBC based on the W65C256 as well as TMS9900 and other ancient chips (all of which I have of course).

    But is this a good thing? Well, for my part I'm off to explore naken asm.
  • TorTor Posts: 2,010
    edited 2018-02-20 11:40
    I cloned the grinder from github and built it. So, it translates Java, but it's written in C++, not Java.. that's a plus in my book! :)
    naken asm is interesting as well. Michael (and Joe, responsible for the 6502/65816 versions) checked in on 6502.org some time ago, and I had a look at it back then.
  • It's impressive, but the 6502 is not a good target for Java. It's hardware stack is too small for C family languages, so most compilers implement one in software and the results are less than stellar.
  • TorTor Posts: 2,010
    edited 2018-02-20 11:41
    Yes, but Michael tries to compensate for that to some extent:
    "For example, despite Java being a stack based language, for most of the implemented CPUs, Java Grinder keeps values in registers. "
Sign In or Register to comment.