November 17, 2016 Re: D front end implementation | ||||
---|---|---|---|---|
| ||||
Posted in reply to Stefan Koch | On 17.11.2016 03:52, Stefan Koch wrote:
> On Wednesday, 16 November 2016 at 09:11:50 UTC, Timon Gehr wrote:
>>
>> I want to get there eventually. :)
>> Unfortunately I haven't had a lot of time to spend on this lately.
>> Also, DMD 2.060 has quite many annoying bugs that slow down development.
>
> Sounds to me like you should rewrite the compiler a little to get it
> working under 2.07x.
>
"A little" is probably not enough.
|
November 17, 2016 Re: D front end implementation | ||||
---|---|---|---|---|
| ||||
Posted in reply to Timon Gehr | On Thursday, 17 November 2016 at 21:39:15 UTC, Timon Gehr wrote:
> On 17.11.2016 03:52, Stefan Koch wrote:
>> On Wednesday, 16 November 2016 at 09:11:50 UTC, Timon Gehr wrote:
>>>
>>> I want to get there eventually. :)
>>> Unfortunately I haven't had a lot of time to spend on this lately.
>>> Also, DMD 2.060 has quite many annoying bugs that slow down development.
>>
>> Sounds to me like you should rewrite the compiler a little to get it
>> working under 2.07x.
>>
>
> "A little" is probably not enough.
I'm interested to know what the big differences were that make updating particularly hard?
|
November 17, 2016 Re: D front end implementation | ||||
---|---|---|---|---|
| ||||
Posted in reply to John Colvin | On 17.11.2016 22:41, John Colvin wrote:
> On Thursday, 17 November 2016 at 21:39:15 UTC, Timon Gehr wrote:
>> On 17.11.2016 03:52, Stefan Koch wrote:
>>> On Wednesday, 16 November 2016 at 09:11:50 UTC, Timon Gehr wrote:
>>>>
>>>> I want to get there eventually. :)
>>>> Unfortunately I haven't had a lot of time to spend on this lately.
>>>> Also, DMD 2.060 has quite many annoying bugs that slow down
>>>> development.
>>>
>>> Sounds to me like you should rewrite the compiler a little to get it
>>> working under 2.07x.
>>>
>>
>> "A little" is probably not enough.
>
> I'm interested to know what the big differences were that make updating
> particularly hard?
The forward reference bugs are different.
|
November 18, 2016 Re: D front end implementation | ||||
---|---|---|---|---|
| ||||
Posted in reply to Timon Gehr | On Thursday, 17 November 2016 at 22:46:33 UTC, Timon Gehr wrote:
> On 17.11.2016 22:41, John Colvin wrote:
>> On Thursday, 17 November 2016 at 21:39:15 UTC, Timon Gehr wrote:
>>> On 17.11.2016 03:52, Stefan Koch wrote:
>>>> On Wednesday, 16 November 2016 at 09:11:50 UTC, Timon Gehr wrote:
>>>>>
>>>>> I want to get there eventually. :)
>>>>> Unfortunately I haven't had a lot of time to spend on this lately.
>>>>> Also, DMD 2.060 has quite many annoying bugs that slow down
>>>>> development.
>>>>
>>>> Sounds to me like you should rewrite the compiler a little to get it
>>>> working under 2.07x.
>>>>
>>>
>>> "A little" is probably not enough.
>>
>> I'm interested to know what the big differences were that make updating
>> particularly hard?
>
> The forward reference bugs are different.
His compiler is filled with templates.
I have never seen anything like it.
|
November 18, 2016 Re: D front end implementation | ||||
---|---|---|---|---|
| ||||
Posted in reply to Timon Gehr | On 16.11.2016 10:11, Timon Gehr wrote: > On 15.11.2016 14:11, Rainer Schuetze wrote: >> >> >> >> Coincidentally, I've tried compiling your front end with latest dmd just >> yesterday. There is one file missing, though: cent_.d. Could you please >> commit this, too? >> ... > > Oops. Thanks for pointing this out, I have committed it. (It's just a > stub anyway: It's a wrapper around a long.) Thanks. > >> The cent code commented out, I noticed your code is suffering from the >> same issue as the OP (also happens for AAs, e.g. T[int]). A workaround >> is to use void[] and wrap it in property functions. >> >> I've fixed/worked around a number of issues in dmd with respect to >> incomplete semantic analysis that happen with template mixins, but more >> still pop up afterwards. >> ... > > DMD 2.060 is the only version of DMD that builds the code. I've read that, but I don't want to go back that much in time... > >> Are there limitations to what the front end understands? > > Yup. There are many features missing that are quite easy to implement > but require work, and a few that are somewhat messy to specify (e.g. > 'protected'). An incomplete list: > > * UDA's > * Built-in members (init, stringof, min, max, ...) > * various forms of import statements > - static, selective, renaming, ... > * Initialization of union fields > * anonymous structs & unions > - Analysis & Lowering > * additional import paths & implicit object.d > * implicit inheritance from Object > * version declarations > * Associative arrays/Associative array literals > * module declarations > * (implicit) super constructor calls > - default constructor call insertion > - flow analysis > * Destructor and postblit calls > - use flow analysis to optimize moves > * with statements > * associative arrays > * foreach statements > - automatic decoding for string types > - foreach over associative arrays > - foreach over delegates > - foreach over AliasSeq > * pattern matching in old-style template constraints > * explicit casts from/to class references > - eg. to/from void* and to bool > * try-catch-finally statements > * scope guards > * initialization crossing check > * multi-argument struct constructors. > * struct postblit & destructors > * finish operator overloading support > * opDispatch > * member alias declarations aliasing members > - correctly provide a this pointer > * visibility > - package, protected > * alias this Quite a list, but the issues that are likely to affect symbol lookup might not be too complicated to implement. I'm looking for candidates that might replace the semantic engine in Visual D, as D_Parser is unlikely to be developed further at the moment. >> Is it able to digest itself? > > Not yet. (Mostly because of missing language features.) > >> That would be pretty impressive ;-) > > I want to get there eventually. :) > Unfortunately I haven't had a lot of time to spend on this lately. Also, > DMD 2.060 has quite many annoying bugs that slow down development. > I hope to get the forward reference bugs solved in current dmd. That might also help your motivation to continue the front end ;-) |
November 18, 2016 Re: D front end implementation | ||||
---|---|---|---|---|
| ||||
Posted in reply to Rainer Schuetze | On Friday, 18 November 2016 at 10:18:21 UTC, Rainer Schuetze wrote:
> I'm looking for candidates that might replace the semantic engine in Visual D, as D_Parser is unlikely to be developed further at the moment.
>
Hmm I plan on cleaning DDMD up a bunch.
Any chance you could use the DDMD frontend ?
|
November 18, 2016 Re: D front end implementation | ||||
---|---|---|---|---|
| ||||
Posted in reply to Stefan Koch |
On 18.11.2016 11:33, Stefan Koch wrote:
> On Friday, 18 November 2016 at 10:18:21 UTC, Rainer Schuetze wrote:
>
>> I'm looking for candidates that might replace the semantic engine in
>> Visual D, as D_Parser is unlikely to be developed further at the moment.
>>
>
> Hmm I plan on cleaning DDMD up a bunch.
> Any chance you could use the DDMD frontend ?
That's also an option, but I don't think it is in a state (yet) to be used as a completion engine.
|
November 18, 2016 Re: D front end implementation | ||||
---|---|---|---|---|
| ||||
Posted in reply to Rainer Schuetze | On Friday, 18 November 2016 at 11:37:40 UTC, Rainer Schuetze wrote:
>
>
> On 18.11.2016 11:33, Stefan Koch wrote:
>> On Friday, 18 November 2016 at 10:18:21 UTC, Rainer Schuetze wrote:
>>
>>> I'm looking for candidates that might replace the semantic engine in
>>> Visual D, as D_Parser is unlikely to be developed further at the moment.
>>>
>>
>> Hmm I plan on cleaning DDMD up a bunch.
>> Any chance you could use the DDMD frontend ?
>
> That's also an option, but I don't think it is in a state (yet) to be used as a completion engine.
Completion engine. Indeed it's not usable as that.
What about DCD ?
|
November 18, 2016 Re: D front end implementation | ||||
---|---|---|---|---|
| ||||
Posted in reply to Stefan Koch |
On 18.11.2016 12:39, Stefan Koch wrote:
> On Friday, 18 November 2016 at 11:37:40 UTC, Rainer Schuetze wrote:
>>
>>
>> On 18.11.2016 11:33, Stefan Koch wrote:
>>> On Friday, 18 November 2016 at 10:18:21 UTC, Rainer Schuetze wrote:
>>>
>>>> I'm looking for candidates that might replace the semantic engine in
>>>> Visual D, as D_Parser is unlikely to be developed further at the
>>>> moment.
>>>>
>>>
>>> Hmm I plan on cleaning DDMD up a bunch.
>>> Any chance you could use the DDMD frontend ?
>>
>> That's also an option, but I don't think it is in a state (yet) to be
>> used as a completion engine.
>
> Completion engine. Indeed it's not usable as that.
> What about DCD ?
Reading its feature list, I suspect it would be a step backward. D_Parser comes with pretty good template, CTFE, UFCS and mixin support.
|
November 18, 2016 Re: D front end implementation | ||||
---|---|---|---|---|
| ||||
Posted in reply to Rainer Schuetze | On Friday, 18 November 2016 at 12:50:30 UTC, Rainer Schuetze wrote:
>
>
> On 18.11.2016 12:39, Stefan Koch wrote:
>> On Friday, 18 November 2016 at 11:37:40 UTC, Rainer Schuetze wrote:
>>>
>>>
>>> On 18.11.2016 11:33, Stefan Koch wrote:
>>>> On Friday, 18 November 2016 at 10:18:21 UTC, Rainer Schuetze wrote:
>>>>
>>>>>[...]
>>>>
>>>> Hmm I plan on cleaning DDMD up a bunch.
>>>> Any chance you could use the DDMD frontend ?
>>>
>>> That's also an option, but I don't think it is in a state (yet) to be
>>> used as a completion engine.
>>
>> Completion engine. Indeed it's not usable as that.
>> What about DCD ?
>
> Reading its feature list, I suspect it would be a step backward. D_Parser comes with pretty good template, CTFE, UFCS and mixin support.
Then I'd say try to keep dparser :)
I wonder how it does mixins though ...
|
Copyright © 1999-2021 by the D Language Foundation