Recent

Author Topic: What about making freepascal virtual machine (FPVM)?  (Read 16139 times)

Basile B.

  • Guest
Re: What about making freepascal virtual machine (FPVM)?
« Reply #15 on: December 31, 2014, 02:37:16 pm »
LLVM is not a VM, it's a backend / code generator.

Afaik it has a JIT.  gcc is also working on a JIT (it is actually done, maybe already in release 5.0).

But anyway, their runtimes are not widely deployed yet, since their JIT usage is a sideshow, not the main use of the respective suites

I think that DWS uses the JIT features, but it's the modern LLVM usage is as backend. Even Apple langs use it as backend, Delphi for the mobile things, Ldc as backend, etc. Actually if I'd wrote a lang I couldn't imagine writing a code gen and LLVM would be the first thing coming in mind.

TinSoldier

  • Newbie
  • Posts: 4
Re: What about making freepascal virtual machine (FPVM)?
« Reply #16 on: December 31, 2014, 04:10:54 pm »
Julia uses llvm as a JIT backend for an interpreter.

Not advocating one way or another, I like FPC/Lazarus' cross-platform abilities.

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 12899
  • FPC developer.
Re: What about making freepascal virtual machine (FPVM)?
« Reply #17 on: December 31, 2014, 05:35:34 pm »
Mostly used as compiler backend. Did you use it as VM ? I know it exists, but not how mature it is.

I don't need a VM. But a good code generator would be nice.

Than work on the current LLVM backend. I don't believe in it, but if you do, by all means work on it.

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 12899
  • FPC developer.
Re: What about making freepascal virtual machine (FPVM)?
« Reply #18 on: December 31, 2014, 05:38:47 pm »
I think that DWS uses the JIT features, but it's the modern LLVM usage is as backend.

I'm not sure what you mean hear. You seem to want to push LLVM, but it is not really clear why, and what you expect from it.

Quote
Even Apple langs use it as backend,
Delphi for the mobile things,

DUH! Apple is the core LLVM supported and always has been. Delphi has been banking on Apple support in recent years to get some sales (not that I really have the feeling that is working out though)

Quote
Ldc as backend, etc. Actually if I'd wrote a lang I couldn't imagine writing a code gen and LLVM would be the first thing coming in mind.

Freely Translated:
You basically have no experience in compiler building and decided LLVM would be best based on bullet lists and spins, not own experiences.

I'm sorry, but I'm not impressed by your arguments. They echo some vague sentiments and hope, but few facts.

Leledumbo

  • Hero Member
  • *****
  • Posts: 8836
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: What about making freepascal virtual machine (FPVM)?
« Reply #19 on: December 31, 2014, 06:03:38 pm »
Mostly used as compiler backend. Did you use it as VM ? I know it exists, but not how mature it is.

I don't need a VM. But a good code generator would be nice.

Than work on the current LLVM backend. I don't believe in it, but if you do, by all means work on it.
And to get you started: http://svn.freepascal.org/svn/fpc/branches/llvm/ (is this the correct branch, Marco?)

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 12899
  • FPC developer.
Re: What about making freepascal virtual machine (FPVM)?
« Reply #20 on: December 31, 2014, 06:42:11 pm »
Than work on the current LLVM backend. I don't believe in it, but if you do, by all means work on it.
And to get you started: http://svn.freepascal.org/svn/fpc/branches/llvm/ (is this the correct branch, Marco?)

Afaik it was merged to trunk. Then it was partially redone on top of the highlevel codegenerator framework.  I don't know what the current state exactly is, best ask on fpc-devel maillist if you are interested in working on it.

Basile B.

  • Guest
Re: What about making freepascal virtual machine (FPVM)?
« Reply #21 on: January 01, 2015, 01:12:46 am »
I think that DWS uses the JIT features, but it's the modern LLVM usage is as backend.

I'm not sure what you mean hear. You seem to want to push LLVM, but it is not really clear why, and what you expect from it.

Quote
Even Apple langs use it as backend,
Delphi for the mobile things,

DUH! Apple is the core LLVM supported and always has been. Delphi has been banking on Apple support in recent years to get some sales (not that I really have the feeling that is working out though)

Quote
Ldc as backend, etc. Actually if I'd wrote a lang I couldn't imagine writing a code gen and LLVM would be the first thing coming in mind.

Freely Translated:
You basically have no experience in compiler building and decided LLVM would be best based on bullet lists and spins, not own experiences.

I'm sorry, but I'm not impressed by your arguments. They echo some vague sentiments and hope, but few facts.

Common...just calm down...I was just saying that over the small dozen of project using LLVM (that I know) most of them use it as a backend, not as JIT.

Why do you become agressive like that ? Are you a creepy schizo or something ?

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 12899
  • FPC developer.
Re: What about making freepascal virtual machine (FPVM)?
« Reply #22 on: January 01, 2015, 01:35:39 am »
Why do you become agressive like that ? Are you a creepy schizo or something ?

No, I just get tired sometimes when people push something popular without much practical knowledge about it. After having the same discussion for the n'th time you get a bit tense. Sorry for that.

exdatis

  • Hero Member
  • *****
  • Posts: 668
    • exdatis
Re: What about making freepascal virtual machine (FPVM)?
« Reply #23 on: January 01, 2015, 12:02:35 pm »

I just get tired sometimes when people push something popular without much practical knowledge about it.

Just like that...

Laksen

  • Hero Member
  • *****
  • Posts: 802
    • J-Software
Re: What about making freepascal virtual machine (FPVM)?
« Reply #24 on: January 01, 2015, 12:35:06 pm »
The list of supported platforms for LLVM is pretty small too. And the fpc optimizer isn't that bad compared to. I've seen fpc win over llvm many times.

Plus it's written in the worst kind of C++ one could imagine. It's spaghetti relying on generated code to an extreme degree.

Leledumbo

  • Hero Member
  • *****
  • Posts: 8836
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: What about making freepascal virtual machine (FPVM)?
« Reply #25 on: January 01, 2015, 04:50:41 pm »
The list of supported platforms for LLVM is pretty small too.
From here, practically only x86 is complete. Everything else requires external tools. More or less the same as FPC.
And the fpc optimizer isn't that bad compared to.
We do lack some advanced optimizations they have, but I believe in Florian, Jonas and other optimizer developers we have.
I've seen fpc win over llvm many times.
Haven't tested myself, but fpc sometimes win sometimes lose against gcc. gcc is like that too against clang (instead of llvm, I refer clang as concrete implementation). So it could be that fpc sometimes win sometimes lose as well against clang.
Plus it's written in the worst kind of C++ one could imagine. It's spaghetti relying on generated code to an extreme degree.
Now this one I agree, they really make a good use of C++ templates and OOP features. As a side effect: Bindings go slllllllow to develop, even C one is incomplete.

typo

  • Hero Member
  • *****
  • Posts: 3051
Re: What about making freepascal virtual machine (FPVM)?
« Reply #26 on: January 01, 2015, 11:17:20 pm »
@Basile B.

Schizos are open minded people, they only have problems with relationship.

Basile B.

  • Guest
Re: What about making freepascal virtual machine (FPVM)?
« Reply #27 on: January 02, 2015, 06:25:27 pm »
Why do you become agressive like that ? Are you a creepy schizo or something ?

No, I just get tired sometimes when people push something popular without much practical knowledge about it. After having the same discussion for the n'th time you get a bit tense. Sorry for that.

You make me think to someone else in this post:

http://forum.lazarus.freepascal.org/index.php/topic,26579.msg163562.html#msg163562

You couldn't know but you're almost right, not to fall into the bias "who has the biggest", I would say that I master lexing, I know what is an AST, I've myself written a script engine a few years ago, but I was too young so it was a bit "crazy". Since this time I've read a bit the dragon book, I follow from near the commits of several open sourced compilers...I'm not an expert you're right, but I'm mature enough in experience to have a POV.

Peace. ;)


 

TinyPortal © 2005-2018