Deprecation of the freebasic assembler back end

For other topics related to the FreeBASIC project or its community.
AGS
Posts: 1284
Joined: Sep 25, 2007 0:26
Location: the Netherlands

Deprecation of the freebasic assembler back end

Postby AGS » May 13, 2012 7:57

During the past months a lot has happened regarding the development of two back ends.
-- Inheritance was added to the gcc back end and numerous bugs were removed from that same back end.
-- A whole new back end was written. It produces an intermediate format that can be parsed by LLVM .

New features (like inheritance) are getting added to the gcc back end but not to the assembler back end. Which means that with the next release the gcc back end will be able to handle freebasic constructs having to do with inheritance. The assembler
back end will not be able to handle such constructs.

While not directly obvious the LLVM back end can be used to generate code for some unexpected platforms. Apple uses a LLVM based objective C compiler (objective C is used to create programs for ipad/iphone) which means the objective C compiler uses the same intermediate format as produced by the freebasic LLVM back end.

In theory the LLVM back end can generate code for the ipad/iphone (non - portable parts of the fb runtime library need to be ported to ipad/iphone). The LLVM back end is very new but still, it looks like a good idea to target as many platforms as possible.

With the combination of the gcc back end/LLVM back end there is only one more back end needed to make freebasic usable on as many devices as possible: a java back end. At this time there are no plans to create a java back end but you never know what the future might bring.

Back to the assembler back end. Development of the assembler back end has come to an end. As more fb programmers start using the new features of the freebasic language (most notably inheritance but more are to come) the less usable the assembler back end
will become. When the gcc back end becomes stable (which could be with the next release of the fbc or the one after that) it could be used as the default back end. If all goes well use of the assembler back end could be deprecated somewhere in 2013.

Goodbye assembler, hello C.
TJF
Posts: 3502
Joined: Dec 06, 2009 22:27
Location: N47°, E15°
Contact:

Re: Deprecation of the freebasic assembler back end

Postby TJF » May 13, 2012 9:05

I wish your words come true.

I really appreciate to target more platforms with FB. But IMO it's far too early to say
AGS wrote:Goodbye assembler, hello C.

The last time I tested -gen gcc option (fbc 0.23) simple code like

Code: Select all

#INCLUDE ONCE "vbcompat.bi"

?FORMAT(NOW, "yy-mm-dd hh:mm:ss")

couldn't be compiled. Error:
test.bas(3) error 41: Variable not declared, FORMAT in '?FORMAT(NOW, "yy-mm-dd hh:mm:ss")'


I think we shouldn't press the FB developers too hard. Coding a new backend (or two) is a lot of work and needs a lot of testing.

And we shouldn't forget that the gcc backend is much slower than gas. I like to have the gas backend in future releases (at least in the current state, may be in a dynamic linked library, loaded by fbc on runtime).
marcov
Posts: 2824
Joined: Jun 16, 2005 9:45
Location: Eindhoven, NL
Contact:

Re: Deprecation of the freebasic assembler back end

Postby marcov » May 13, 2012 10:05

So one new backend is not yet in production yet, and two more (LLVM and Java) are on the cards?

IMHO there is a bit overfocus on number of targets, which makes me wonder about the quality. Spreading oneself too thin, one bird in the hand vs ten in the sky, and all the usual platitudes.
MOD
Posts: 555
Joined: Jun 11, 2009 20:15

Re: Deprecation of the freebasic assembler back end

Postby MOD » May 13, 2012 10:37

Inheritance wasn't added to the gcc backend, it was added to the compiler. It is available with -gen gas, too.
fxm
Posts: 9477
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Re: Deprecation of the freebasic assembler back end

Postby fxm » May 13, 2012 11:18

MOD wrote:Inheritance wasn't added to the gcc backend, it was added to the compiler. It is available with -gen gas, too.

Obviously I confirm.
For one year now, I am testing the new fbc branch 'Inheritance', and I always use the -gen gas (selected per default).
Mihail_B
Posts: 271
Joined: Jan 29, 2008 11:20
Location: Romania
Contact:

Re: Deprecation of the freebasic assembler back end

Postby Mihail_B » May 13, 2012 14:07

AGS wrote:Goodbye assembler, hello C.

Cr4p ... we're still slaves to C/C++ ... [hope multi-platform to balance this ...]

I'm still dreaming o'FBC bcming a w.w. super used $$$ compiler like d'big ones ...
roook_ph
Posts: 402
Joined: Apr 01, 2006 20:50
Location: philippines
Contact:

Re: Deprecation of the freebasic assembler back end

Postby roook_ph » May 16, 2012 21:33

I do not know why there is so much interest in gcc and why every one wants to get spend their time on c port . Most of freebasic programs are games and most or around 70% of games out there runs on java.
marcov
Posts: 2824
Joined: Jun 16, 2005 9:45
Location: Eindhoven, NL
Contact:

Re: Deprecation of the freebasic assembler back end

Postby marcov » May 17, 2012 10:21

roook_ph wrote:I do not know why there is so much interest in gcc and why every one wants to get spend their time on c port . Most of freebasic programs are games and most or around 70% of games out there runs on java.


Interesting, care to share your resources for that figure ?
roook_ph
Posts: 402
Joined: Apr 01, 2006 20:50
Location: philippines
Contact:

Re: Deprecation of the freebasic assembler back end

Postby roook_ph » May 17, 2012 11:36

It was just an assumption of course , but if you look at android or mobile apps ,those that require less number of codes, they all run java. C language's heyday was in the 80's and 90's when microsoft was experimenting with gui's and wyswigs . All those those bloated programs are rarely on the tech news now. again just an assumption.
marcov
Posts: 2824
Joined: Jun 16, 2005 9:45
Location: Eindhoven, NL
Contact:

Re: Deprecation of the freebasic assembler back end

Postby marcov » May 17, 2012 12:20

roook_ph wrote:It was just an assumption of course , but if you look at android or mobile apps ,those that require less number of codes, they all run java.


Android is not even half of the mobile market. And iOS (Iphone) doesn't run java. And the IPhone app market is bigger than the android one. So one doesn't even need paper or sources to figure out that assumption is way off.

C language's heyday was in the 80's and 90's when microsoft was experimenting with gui's and wyswigs . All those those bloated programs are rarely on the tech news now. again just an assumption.


What is on the news, and what sells are two different things. And keep in mind that the bulk is sold by a very select group of mostly silicon valley tech giants (and one Seattle one).

I wouldn't bother too much about what those very few big enterprises use for your own programming, that probably doesn't have the same scale and tradeoffs.


For the rest, I can only say I had very much fun because it was the first time in twenty years that something else than Java was considered more bloated than Java:-)
1000101
Posts: 2556
Joined: Jun 13, 2005 23:14
Location: SK, Canada

Re: Deprecation of the freebasic assembler back end

Postby 1000101 » May 17, 2012 18:48

Back to the backends...

I've never used the -gen gcc backend. If I wanted to have a C/C++ program I would program in C/C++.
I always use the -gen gas backend. Largely because anything which does require the speed can be done in inlined asm or as a naked asm function without having to separately compile an asm module. Further, anything like logic which is a high-level abstract is usually not as influenced by the backend but by the algorithms used and thus it makes development of additional backends moot in this regard.

I really don't care about developing crappy phone apps, desktop gadgets, or any other gimick-ware (and 99.99999% of them are crap, but that is a matter of opinion) so all the effort on x number of backends and almost 0 progress of the compiler and language as a whole makes me think it's a largely wasted effort.

Anyway, dropping the -gen gas backend would mean a few fb programmers would simply drop fb and move just use the better native tools instead of monkeying around with a language translator. Although, the LLVM backend would be the best option as a secondard backend. I'm still not sure why people thought a c backend was a good idea, maybe they found a copy of qb2c and said, "hmmm."

Long story short:
4 backends - useless
dropping gas backend - stupid
codeFoil
Posts: 255
Joined: Dec 22, 2011 4:45
Location: United States
Contact:

Re: Deprecation of the freebasic assembler back end

Postby codeFoil » May 17, 2012 19:42

1000101 wrote:Anyway, dropping the -gen gas backend would mean a few fb programmers would simply drop fb ....


Or make due with the the last version that still included the assembly back end. Such a change (which does not seem likely) would probably lead to the first significant fork in the code base.
roook_ph
Posts: 402
Joined: Apr 01, 2006 20:50
Location: philippines
Contact:

Re: Deprecation of the freebasic assembler back end

Postby roook_ph » May 17, 2012 22:22

@marcov
You where talking about profits and market share I was talking about volume . You are talking about IOS , I was talking about HTC, Nokia, Samsung etc, I was hoping that android would overtake IOS. You are hoping that freebasic would turn into C , I brushed c because I think it is overrated, I do not know there are others who think of it of just as a language but some kind of religion or something. But this forum is still about BASIC so be it.
marcov
Posts: 2824
Joined: Jun 16, 2005 9:45
Location: Eindhoven, NL
Contact:

Re: Deprecation of the freebasic assembler back end

Postby marcov » May 17, 2012 22:42

roook_ph wrote:@marcov
You where talking about profits and market share I was talking about volume.


Even in absolute downloads afaik the iOS stores top Android.

But that was just to highlight an obvious flaw in your reasoning. I tried to use that to steer it into the coding that went into it, and who is doing that kind of coding, since that is more relevant for FB.

See the bulk of the mobile and the hipper parts of the online world in general are governed by a few big companies (be it Apple or any of the ones that you name plus say Google, Microsoft, and let's give Oracle the benefit of the doubt due to your Java reference) and a few bloated startups like Zynga and Rovio.

If you sincerely think that sb who is going to join those ranks is lurking on THESE forums, well, there is nothing much to say then :_)

FB is small potato (and there is nothing wrong with that), but one simply has to be realistic and consider that as a given, and go after audiences that you CAN get, not throw around worldwide figures of markets of which even 0.01% is forever beyond FB's reach (be it for technical or non technical reasons).

I think these kinds of discussions should be more about the coming period, and less about theoretical world dominance in the (too far) future.

You are talking about IOS , I was talking about HTC, Nokia, Samsung etc, I was hoping that android would overtake IOS.


Could happen, could not happen.

You are hoping that freebasic would turn into C


No I'm not. Just search the forum, and you'll see me criticize C and LLVM backends several times. Mostly because I think they support Windows relatively badly, and because most tools that go that way seem to never go the beyond DIY kit stage, and never mature into wellrounded products (again specially on Windows)

See e.g. my first post in this very thread.

, I brushed c because I think it is overrated, I do not know there are others who think of it of just as a language but some kind of religion or something.


I questioned some obvious flaws in your reasoning. I never promoted any religion (real one or language centric) in this thread.
Last edited by marcov on Jul 31, 2012 21:11, edited 1 time in total.
1000101
Posts: 2556
Joined: Jun 13, 2005 23:14
Location: SK, Canada

Re: Deprecation of the freebasic assembler back end

Postby 1000101 » May 19, 2012 20:51

hrm, after re-reading this thread I started wondering, AGS, where did you get your information? The .24 gas backend supports inheritance which v1ctor added, it supports class related functionality equally with the gcc and gas backends (as far as classes go which isn't very far). Also, I read no mention of possible deprecation in any of the logs and heard no dev mention such and you're not listed as a dev on the sf page.

Right now I'm using the April 25th, 2012 svn build of .24 as it does support classes with the gas backend. So again I ask, can you link to an official source for your information?

Return to “Community Discussion”

Who is online

Users browsing this forum: No registered users and 2 guests