February 28, 2016 Re: LDC 1.0.0-alpha1 has been released! Please help testing! | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jacob Carlborg | Jacob Carlborg <doob@me.com> writes:
> On 2016-02-28 09:46, Dan Olson wrote:
>
>> Well, it isn't pretty but can pass the dmd testsuite for objc. I'll organize it a litte better, get a pull going to show work in progress.
>
> That was quick :). Please let me know when you have a pull request available, I can help with the code review.
>
> Would be inserting to enable all tests in objc_objc_msgSend.d and see if they work in LDC.
I uncommented lines in main (I think that is what you mean) to this:
void main()
{
test_stret();
test_fp2ret();
test_fpret();
test_float32();
test_double64();
}
And it works. I was unsure if the fp2ret and C++/D complex types would work, but for this test they do.
|
February 28, 2016 Re: LDC 1.0.0-alpha1 has been released! Please help testing! | ||||
---|---|---|---|---|
| ||||
Posted in reply to Dan Olson | Hi Kai ! I wonder if there plans to convert driver and gen parts into d too, to get rid of c++ code. Thanks for a reply. |
February 28, 2016 Re: LDC 1.0.0-alpha1 has been released! Please help testing! | ||||
---|---|---|---|---|
| ||||
Posted in reply to Temtaime | On Sunday, 28 February 2016 at 21:54:22 UTC, Temtaime wrote:
> I wonder if there plans to convert driver and gen parts into d too, to get rid of c++ code.
Some code has already been converted to D (out of necessity / ease of transitioning to DDMD). At least for code that does not interface with LLVM, it'd be nice to convert it to D (imho).
cheers,
Johan
|
February 29, 2016 Re: LDC 1.0.0-alpha1 has been released! Please help testing! | ||||
---|---|---|---|---|
| ||||
Posted in reply to Dan Olson | On 2016-02-28 20:33, Dan Olson wrote: > I uncommented lines in main (I think that is what you mean) to this: > > void main() > { > test_stret(); > test_fp2ret(); > test_fpret(); > test_float32(); > test_double64(); > } > > And it works. I was unsure if the fp2ret and C++/D complex types would > work, but for this test they do. Awesome :) -- /Jacob Carlborg |
February 29, 2016 Re: LDC 1.0.0-alpha1 has been released! Please help testing! | ||||
---|---|---|---|---|
| ||||
Posted in reply to Kai Nacke | On Friday, 26 February 2016 at 21:12:43 UTC, Kai Nacke wrote:
> Again, we need to help to test this alpha release! Every feedback is welcomed!
It takes me a lot to understand what's wrong in a parser code.
I finally reduced code to this:
size_t inc(size_t* v)
{
(*v)++;
return 10;
}
size_t pos = 10;
immutable tst = pos + inc(&pos); // <-- this
writeln(tst);
writeln(pos);
The marked line was an unintended mistake inside original code.
Anyway it gives different result with dmd and ldc2 1.0. I neither know if is a undefined behaviour.
|
February 29, 2016 Re: LDC 1.0.0-alpha1 has been released! Please help testing! | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrea Fontana | On Monday, 29 February 2016 at 11:51:31 UTC, Andrea Fontana wrote:
> It takes me a lot to understand what's wrong in a parser code.
> I finally reduced code to this:
>
> size_t inc(size_t* v)
> {
> (*v)++;
> return 10;
> }
>
> size_t pos = 10;
>
> immutable tst = pos + inc(&pos); // <-- this
> writeln(tst);
> writeln(pos);
>
> The marked line was an unintended mistake inside original code.
> Anyway it gives different result with dmd and ldc2 1.0. I neither know if is a undefined behaviour.
I hope LDC computes tst = 20. ;)
Iirc, there were some inconsistencies wrt. this. LDC and GDC do it one way (the proper one imo), dmd another way.
|
February 29, 2016 Re: LDC 1.0.0-alpha1 has been released! Please help testing! | ||||
---|---|---|---|---|
| ||||
Posted in reply to kink | On Monday, 29 February 2016 at 13:36:59 UTC, kink wrote:
> I hope LDC computes tst = 20. ;)
> Iirc, there were some inconsistencies wrt. this. LDC and GDC do it one way (the proper one imo), dmd another way.
"Proper" depends on specs. If is an undefined behaviour i think it should be defined or a warning should be triggered
|
February 29, 2016 Re: LDC 1.0.0-alpha1 has been released! Please help testing! | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrea Fontana | On Monday, 29 February 2016 at 11:51:31 UTC, Andrea Fontana wrote: > On Friday, 26 February 2016 at 21:12:43 UTC, Kai Nacke wrote: >> Again, we need to help to test this alpha release! Every feedback is welcomed! > > > It takes me a lot to understand what's wrong in a parser code. Another problem. Reduced code: http://dpaste.dzfl.pl/33434c9ba374 This print "LEN:3" with dmd and "LEN:0" with ldc2 1.0. (using online compiler ldc 0.12, it prints LEN:3) |
February 29, 2016 Re: LDC 1.0.0-alpha1 has been released! Please help testing! | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrea Fontana | On Monday, 29 February 2016 at 14:49:44 UTC, Andrea Fontana wrote:
> On Monday, 29 February 2016 at 11:51:31 UTC, Andrea Fontana wrote:
>> On Friday, 26 February 2016 at 21:12:43 UTC, Kai Nacke wrote:
>>> Again, we need to help to test this alpha release! Every feedback is welcomed!
>>
>>
>> It takes me a lot to understand what's wrong in a parser code.
>
> Another problem. Reduced code:
> http://dpaste.dzfl.pl/33434c9ba374
>
> This print "LEN:3" with dmd and "LEN:0" with ldc2 1.0. (using online compiler ldc 0.12, it prints LEN:3)
(please notice that if "auto" is used instead of "enum", len is computed correctly)
|
February 29, 2016 Re: LDC 1.0.0-alpha1 has been released! Please help testing! | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrea Fontana | On Monday, 29 February 2016 at 14:47:58 UTC, Andrea Fontana wrote: > On Monday, 29 February 2016 at 13:36:59 UTC, kink wrote: >> I hope LDC computes tst = 20. ;) >> Iirc, there were some inconsistencies wrt. this. LDC and GDC do it one way (the proper one imo), dmd another way. > > "Proper" depends on specs. If is an undefined behaviour i think it should be defined or a warning should be triggered Spec: https://dlang.org/spec/expression.html#order-of-evaluation Strict left-to-right order evaluation, as the spec prescribes, would give tst=20. Is there a DMD bug report for this? I didn't test with DMD, but if tst!=20, it is a pretty severe issue. |
Copyright © 1999-2021 by the D Language Foundation