U++ framework
Do not panic. Ask here before giving up.

Home » Developing U++ » U++ Developers corner » Little experiment compiling to function pointer calls...
Re: Little experiment compiling to function pointer calls... [message #34361 is a reply to message #34352] Fri, 18 November 2011 14:51 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 14291
Registered: November 2005
Ultimate Member
koldo wrote on Fri, 18 November 2011 03:13

Hello Mirek

I understand the results of your test but, could you explain a little further this Smile :
Quote:

I believe this approach would scale up to complete compiler of e.g. C. The advantage over TCC is that such code is 100% portable, no need to emit assembler opcodes...



Well, TCC produces CPU opcodes. That is definitely faster, but also CPU dependent and a little bit harder to interface with 'host' platform (in this case U++).

Using this, you can more easily create 'runtime compiler' for most scripting languages, which would be slower than one producing CPU opcodes, but very likely faster than interpreted bytecode. And very easily interfacable with host (see how 'x' and 'y' variables are easily iterfaced).

The only problem I can see is jumps. 'goto' is likely out of question and I am still unsure if 'break' is possible (maybe the one way is to implement it using exceptions).

Mirek
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: upp GTK compatibility for Ubuntu broken?
Next Topic: Trouble with SizePos...
Goto Forum:
  


Current Time: Mon Jun 22 05:32:42 GMT+2 2026

Total time taken to generate the page: 0.00460 seconds