April 06, 2009 Re: D, so it happend... | ||||
|---|---|---|---|---|
| ||||
Posted in reply to bearophile | bearophile Wrote: > Jarrett Billingsley: > > Why would someone rewrite the D compiler in C# - > > For fun, I guess :-) Or maybe as a programming exercise, etc. So there are already four D compilers, (and no one of them is "high quality"). > > >- Faster overall application execution speed. - Tested against existing benchmarks.< > > I'd like to know what benchmarks are used, and against what compiler, etc. > > Bye, > bearophile Follow the reference ... <http://www.digitalmars.com/d/archives/digitalmars/D/Re_D_compiler_benchmarks_85657.html> | |||
April 06, 2009 Re: D, so it happend... | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Bass | Bass wrote:
> downs Wrote:
>
>> Ellery Newcomer wrote:
>>> Baas wrote:
>>>> Tech info:
>>>> - Parse the code into XML using Regular Expressions.
>>> *double take*
>> It's all about the better optimizations that are now possible!
>
> I've only provide a brief description upfront.
> It basically is now more "dynamic" to do optimization since you're working with straight XML content, which is easier to analyze, manipulate, etc.
No. Just .. no.
On the off chance that you're serious about that - XML is a data format that encodes tree-like hierarchical information.
But if your parser isn't already using a tree-like structure internally, you're doing something wrong.
And if it is, there's absolutely no reason to use XML as some weird sort of intermediary stage.
| |||
April 06, 2009 Re: D, so it happend... | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Jason House | Jason House Wrote:
> Any plans for release?
>
> It looks like you made many language changes according to personal style preferences...
As I've mentioned, it's possoble for the developer to change it back to his/her style.
- Release?
I'm busy finalizing the release version and will drop it in GNU/sourceforge or somewhere. (about end of May)
I'm still clearing a few (minor) agreement issues with my ex-employer regarding intellectual property etc.
| |||
April 06, 2009 Re: D, so it happend... | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Jason House | Hello Jason,
> Any plans for release?
>
> It looks like you made many language changes according to personal
> style preferences...
My thought exactly. It's not sounding like D anymore...
| |||
April 06, 2009 Re: D, so it happend... | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Bass | Bass schrieb:
> Tom S Wrote:
>
>> How is compilar formed? How is compilar formed? How executable get maked?
>
> Well, it (the D code) is simply converted to HLA (High Level Assembler) files.
> HLA take it from there and compile it into .obj files.
> From there you can bassically choose your favourite linker to create exe etc.
what has HLA todo with C# - this type of assembler code isn't optimizable anymore - or do you mean CLI?
| |||
April 06, 2009 Re: D, so it happend... | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Baas | Baas wrote:
> In the past 10 motnhs, I completly rewrote the D Compiler in C#!
>
> Motivations:
> - LOVE THE D LANGUAGE!!
> - To be fully able to develop in a VS.NET like environment using D, with no limmitations.
>
> Cons:
> - Requires Windows platforms (XP and above).
> - Requires P4+ CPU.
> - 2-4 times slower compiler (still need to be optimized).
> - No "_Identifier" allowed! (I hate that _ s##t!)
> - Removed "auto" types.
> - Removed some data types.
> - No documentation available :(
>
> Pros:
> - Faster overall application execution speed.
> - Tested against existing benchmarks.
> - Implemented full debug functionality. - No more creapy asm stuff.
> - View/Modify ALL datatypes without any limitations or hassles.
> - Complete 128 bit ints/reals
> - Added Custom 256 bit ints/reals. (...who's gonna use it anyway?)
> - Dynamic keywords:
> - For example:
> - Can rename "else if" to ElseIf etc.
> - Can rename "{}" code block indicators to Begin/End etc.
> - Remain compatible with any older/newer "keyword set".
> - Can basically change keywords to adopt your style.
> - Includes "event handler" functionality
> - Includes dynamic binary modules (.ddbm)
> - Can automaticaly optimize itself on a target environment.
> - Can restructure its own code pattern (32/64/Multi-CPU)
> - Can physically relocate itself.
> - Can defrag itself in memory/disk.
> - Magnitudes faster then normal DLLs.
> - Can bind/execute across networks.
> - Can be initiated from a remote machine.
> - Includes full security features.
> - Includes pre-set configuration templates:
> - Custom Mode
> - Console Mode (exe)
> - Windows Mode (exe)
> - GL Mode (exe)
> - Library Mode (dll)
> - Dynamic Binary Module Mode (ddbm)
> - Windows Service Mode (exe)
> - Device Driver Mode (drv/sys)
> - Includes Code Convertion Utility (from C# to D).
> Tech info:
> - Parse the code into XML using Regular Expressions.
> - More code optimization is now possible.
> - Replaced the backend with HLA.
> - Code > HLA > OBJ > EXE/DLL
> - Removed GC, ...don't need it.
> - Variables allocate/deallocate themselfs.
> - Manual allocation/deallocation still possible.
> - Package/Module now require code block indicators
> - package somepackage.somewhere
> {
> module somemodule
> {
> ....
> module deep.beneath
> {
> ....
> }
> ....
> }
>
> module another.module
> {
> ....
> }
> }
> - More than one module per file is now possible.
> - Added inline HLA
> - Can now use asm{} or hla{}
> - Changed property syntax (similar to C#)
> - int something
> {
> get { return somevariable; }
> set { somevariable = value; }
> }
> - Renamed "mixin" to "macro"
> - Removed "imaginary" and "complex" types.
> - Changed/Added Types
> * ubyte > byte
> * byte > sbyte
> * char > compiler options determine which type to use (1/2/4 bytes)
> * short > short/int16
> * ushort > ushort/uint16
> * int > int/int32
> * uint > uint/uint32
> * long > long/int63
> * ulong > ulong/uint64
> * float > float/single/real32
> * double > double/real64
> + int128/decimal
> + uint128/udecimal
> + int256
> + uint256
> + real128
> + real256
> + string > compiler options determine which type to use (1/2 bytes)
> + date/time/datetime
>
> In Progress:
> - "native" .NET framework.
>
> Plan for the Future:
> - "VS.NET-like" IDE.
> - "true" Generic functionality.
>
> Sorry...
> NO CODE OR BINARIES INCLUDED WITH THIS MESSAGE! (yet)
>
> Baas
>
Technically cool, but I'm not sure it can be considered 'D' if you won't be able to compile D 1.0 code with it. Sounds like a language fork.
| |||
April 06, 2009 Re: D, so it happend... | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Baas | Baas wrote:
> In the past 10 motnhs, I completly rewrote the D Compiler in C#!
Wtf. No you didn't.
| |||
April 06, 2009 Re: D, so it happend... | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Baas | 在 Mon, 06 Apr 2009 22:29:26 +0800,Baas <hacker@webmail.co.za> 写道: > In the past 10 motnhs, I completly rewrote the D Compiler in C#! > > Motivations: > - LOVE THE D LANGUAGE!! > - To be fully able to develop in a VS.NET like environment using D, with no limmitations. > > Cons: > - Requires Windows platforms (XP and above). > - Requires P4+ CPU. > - 2-4 times slower compiler (still need to be optimized). > - No "_Identifier" allowed! (I hate that _ s##t!) > - Removed "auto" types. > - Removed some data types. > - No documentation available :( > > Pros: > - Faster overall application execution speed. > - Tested against existing benchmarks. > - Implemented full debug functionality. > - No more creapy asm stuff. > - View/Modify ALL datatypes without any limitations or hassles. > - Complete 128 bit ints/reals > - Added Custom 256 bit ints/reals. (...who's gonna use it anyway?) > - Dynamic keywords: > - For example: > - Can rename "else if" to ElseIf etc. > - Can rename "{}" code block indicators to Begin/End etc. > - Remain compatible with any older/newer "keyword set". > - Can basically change keywords to adopt your style. > - Includes "event handler" functionality > - Includes dynamic binary modules (.ddbm) > - Can automaticaly optimize itself on a target environment. > - Can restructure its own code pattern (32/64/Multi-CPU) > - Can physically relocate itself. > - Can defrag itself in memory/disk. > - Magnitudes faster then normal DLLs. > - Can bind/execute across networks. > - Can be initiated from a remote machine. > - Includes full security features. > - Includes pre-set configuration templates: > - Custom Mode > - Console Mode (exe) > - Windows Mode (exe) > - GL Mode (exe) > - Library Mode (dll) > - Dynamic Binary Module Mode (ddbm) > - Windows Service Mode (exe) > - Device Driver Mode (drv/sys) > - Includes Code Convertion Utility (from C# to D). > Tech info: > - Parse the code into XML using Regular Expressions. > - More code optimization is now possible. > - Replaced the backend with HLA. > - Code > HLA > OBJ > EXE/DLL > - Removed GC, ...don't need it. > - Variables allocate/deallocate themselfs. > - Manual allocation/deallocation still possible. > - Package/Module now require code block indicators > - package somepackage.somewhere > { > module somemodule > { > .... > module deep.beneath > { > .... > } > .... > } > > module another.module > { > .... > } > } > - More than one module per file is now possible. > - Added inline HLA > - Can now use asm{} or hla{} > - Changed property syntax (similar to C#) > - int something > { > get { return somevariable; } > set { somevariable = value; } > } > - Renamed "mixin" to "macro" > - Removed "imaginary" and "complex" types. > - Changed/Added Types > * ubyte > byte > * byte > sbyte > * char > compiler options determine which type to use (1/2/4 bytes) > * short > short/int16 > * ushort > ushort/uint16 > * int > int/int32 > * uint > uint/uint32 > * long > long/int63 > * ulong > ulong/uint64 > * float > float/single/real32 > * double > double/real64 > + int128/decimal > + uint128/udecimal > + int256 > + uint256 > + real128 > + real256 > + string > compiler options determine which type to use (1/2 bytes) > + date/time/datetime > > In Progress: > - "native" .NET framework. > > Plan for the Future: > - "VS.NET-like" IDE. > - "true" Generic functionality. > > Sorry... > NO CODE OR BINARIES INCLUDED WITH THIS MESSAGE! (yet) > > Baas > I hope the final release won't disappoint many peope. Though, the property change is a good thing. -- 使用 Opera 革命性的电子邮件客户程序: http://www.opera.com/mail/ | |||
April 06, 2009 Re: D, so it happend... | ||||
|---|---|---|---|---|
| ||||
Posted in reply to downs | > No. Just .. no.
>
> On the off chance that you're serious about that - XML is a data format that encodes tree-like hierarchical information.
>
> But if your parser isn't already using a tree-like structure internally, you're doing something wrong.
>
> And if it is, there's absolutely no reason to use XML as some weird sort of intermediary stage.
I've used the "Analysis-Synthesis Model" for the overall design (to "re-invent the wheel" :) ), as I've done lots of times in the past.
The Analysis-Synthesis Model is clearly based on a tree-structure.
- Lexical Analysis
- Parsing/Syntax Analysis
- Semantic Analysis
- Intermediate Code Generator
- Code Optimizer
- Code Generator
Lexical- and Syntax Analysis is handled in a single pass. (just a reminder)
Instead of writing a lot of additional code to work with and to identify the source/tokens, I simply dump all the tokens into a xml format using Regular Expressions search/replace.
This takes up to 30 passes for completion and, yes, this is where most of the time is used.
From there on it's straight forward to do any kind of analysis with the code/tokens.
The key is when it gets to the phase of optimization.
In this case, the compiler (or should I be fair and call it "the converter"), has a complete "engine" behind it which takes care of all the information in a proper manner.
Cutting, moving, merging, passing referenses and occasionally adding additional code is done with ease.
It's already possible at that stage to systematically assign (and measure) a "Unit of Fitness" (Genetic Analysis), if I may call it that, to the individual code blocks.
By measuring the fitness, the converter knows where to focus to improve performance.
After optimization, converting it to HLA obviously opens a Pandora's box of a different kind. You know the rest...
To summarize, optimization is taken care of even before convertion to HLA takes place, and that's why I use xml (it's a matter of preference).
Technically, thats the basic overview of the operation, and yes, I AM SERIOUS ABOUT THIS!
So, be positive... :)
| |||
April 06, 2009 Re: D, so it happend... | ||||
|---|---|---|---|---|
| ||||
Posted in reply to dennis luehring | > what has HLA todo with C# - this type of assembler code isn't optimizable anymore - or do you mean CLI?
"D" code gets optimized first then converted to HLA...
| |||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply