www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Exceptional News

reply "David Nadlinger" <see klickverbot.at> writes:
Looks like we are finally getting somewhere. :)

---
version (Windows) {} else static assert(false);
void main() {
     try {
     	throw new Exception("This exception...");
     } catch (Exception e) {
     	import std.stdio;
     	writeln(e.msg, " ... has been caught for you by ", 
__VENDOR__, ".");
     }
}
---
This exception... ... has been caught for you by LDC.
---

David
Feb 11 2013
next sibling parent Iain Buclaw <ibuclaw ubuntu.com> writes:
--20cf3074b2461be82c04d572e4ed
Content-Type: text/plain; charset=ISO-8859-1

On 11 February 2013 13:00, David Nadlinger <see klickverbot.at> wrote:

 Looks like we are finally getting somewhere. :)

 ---
 version (Windows) {} else static assert(false);
 void main() {
     try {
         throw new Exception("This exception...");
     } catch (Exception e) {
         import std.stdio;
         writeln(e.msg, " ... has been caught for you by ", __VENDOR__,
 ".");
     }
 }
 ---
 This exception... ... has been caught for you by LDC.
 ---

 David

Rather amusing. :-) -- Iain Buclaw *(p < e ? p++ : p) = (c & 0x0f) + '0'; --20cf3074b2461be82c04d572e4ed Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div class=3D"gmail_extra"><div class=3D"gmail_quote">On 1= 1 February 2013 13:00, David Nadlinger <span dir=3D"ltr">&lt;<a href=3D"mai= lto:see klickverbot.at" target=3D"_blank">see klickverbot.at</a>&gt;</span>= wrote:<br> <blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p= x #ccc solid;padding-left:1ex">Looks like we are finally getting somewhere.= :)<br> <br> ---<br> version (Windows) {} else static assert(false);<br> void main() {<br> =A0 =A0 try {<br> =A0 =A0 =A0 =A0 throw new Exception(&quot;This exception...&quot;);<br> =A0 =A0 } catch (Exception e) {<br> =A0 =A0 =A0 =A0 import std.stdio;<br> =A0 =A0 =A0 =A0 writeln(e.msg, &quot; ... has been caught for you by &quot;= , __VENDOR__, &quot;.&quot;);<br> =A0 =A0 }<br> }<br> ---<br> This exception... ... has been caught for you by LDC.<br> ---<br> <br> David<br> </blockquote></div><br><br></div><div class=3D"gmail_extra">Rather amusing.= :-)<br clear=3D"all"></div><div class=3D"gmail_extra"><br>-- <br>Iain Bucl= aw<br><br>*(p &lt; e ? p++ : p) =3D (c &amp; 0x0f) + &#39;0&#39;; </div></div> --20cf3074b2461be82c04d572e4ed--
Feb 11 2013
prev sibling next sibling parent Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> writes:
On 2/11/13 8:00 AM, David Nadlinger wrote:
 Looks like we are finally getting somewhere. :)

 ---
 version (Windows) {} else static assert(false);
 void main() {
 try {
 throw new Exception("This exception...");
 } catch (Exception e) {
 import std.stdio;
 writeln(e.msg, " ... has been caught for you by ", __VENDOR__, ".");
 }
 }
 ---
 This exception... ... has been caught for you by LDC.
 ---

 David

Awesome!!! Andrei
Feb 11 2013
prev sibling next sibling parent Iain Buclaw <ibuclaw ubuntu.com> writes:
--047d7bb70dfebcf62404d572f344
Content-Type: text/plain; charset=ISO-8859-1

On 11 February 2013 13:29, Andrei Alexandrescu <
SeeWebsiteForEmail erdani.org> wrote:

 On 2/11/13 8:00 AM, David Nadlinger wrote:

 Looks like we are finally getting somewhere. :)

 ---
 version (Windows) {} else static assert(false);
 void main() {
 try {
 throw new Exception("This exception...");
 } catch (Exception e) {
 import std.stdio;
 writeln(e.msg, " ... has been caught for you by ", __VENDOR__, ".");
 }
 }
 ---
 This exception... ... has been caught for you by LDC.
 ---

 David

Awesome!!! Andrei

This feature has been around for some time (somewhere in lexer.c iirc) - have you really only just added LDC into it David? -- Iain Buclaw *(p < e ? p++ : p) = (c & 0x0f) + '0'; --047d7bb70dfebcf62404d572f344 Content-Type: text/html; charset=ISO-8859-1 <div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 11 February 2013 13:29, Andrei Alexandrescu <span dir="ltr">&lt;<a href="mailto:SeeWebsiteForEmail erdani.org" target="_blank">SeeWebsiteForEmail erdani.org</a>&gt;</span> wrote:<br> <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class=""><div class="h5">On 2/11/13 8:00 AM, David Nadlinger wrote:<br> <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> Looks like we are finally getting somewhere. :)<br> <br> ---<br> version (Windows) {} else static assert(false);<br> void main() {<br> try {<br> throw new Exception(&quot;This exception...&quot;);<br> } catch (Exception e) {<br> import std.stdio;<br> writeln(e.msg, &quot; ... has been caught for you by &quot;, __VENDOR__, &quot;.&quot;);<br> }<br> }<br> ---<br> This exception... ... has been caught for you by LDC.<br> ---<br> <br> David<br> </blockquote> <br></div></div> Awesome!!!<span class=""><font color="#888888"><br> <br> Andrei<br> </font></span></blockquote></div><br></div><div class="gmail_extra">This feature has been around for some time (somewhere in lexer.c iirc) - have you really only just added LDC into it David?<br clear="all"></div><div class="gmail_extra"> <br>-- <br>Iain Buclaw<br><br>*(p &lt; e ? p++ : p) = (c &amp; 0x0f) + &#39;0&#39;; </div></div> --047d7bb70dfebcf62404d572f344--
Feb 11 2013
prev sibling next sibling parent =?UTF-8?B?U8O2bmtlIEx1ZHdpZw==?= <sludwig outerproduct.org> writes:
Am 11.02.2013 14:00, schrieb David Nadlinger:
 Looks like we are finally getting somewhere. :)
 
 ---
 version (Windows) {} else static assert(false);
 void main() {
     try {
         throw new Exception("This exception...");
     } catch (Exception e) {
         import std.stdio;
         writeln(e.msg, " ... has been caught for you by ", __VENDOR__, ".");
     }
 }
 ---
 This exception... ... has been caught for you by LDC.
 ---
 
 David

Great news! How is it implemented? SEH? Did LLVM get any recent additions in this area?
Feb 11 2013
prev sibling next sibling parent Dmitry Olshansky <dmitry.olsh gmail.com> writes:
11-Feb-2013 17:00, David Nadlinger пишет:
 Looks like we are finally getting somewhere. :)

 ---
 version (Windows) {} else static assert(false);
 void main() {
      try {
          throw new Exception("This exception...");
      } catch (Exception e) {
          import std.stdio;
          writeln(e.msg, " ... has been caught for you by ", __VENDOR__,
 ".");
      }
 }
 ---
 This exception... ... has been caught for you by LDC.
 ---

Nice one! There got to be size_t.sizeof printed somewhere ... :) -- Dmitry Olshansky
Feb 11 2013
prev sibling next sibling parent Nick Sabalausky <SeeWebsiteToContactMe semitwist.com> writes:
On Mon, 11 Feb 2013 14:00:17 +0100
"David Nadlinger" <see klickverbot.at> wrote:

 Looks like we are finally getting somewhere. :)
 
 ---
 version (Windows) {} else static assert(false);
 void main() {
      try {
      	throw new Exception("This exception...");
      } catch (Exception e) {
      	import std.stdio;
      	writeln(e.msg, " ... has been caught for you by ", 
 __VENDOR__, ".");
      }
 }
 ---
 This exception... ... has been caught for you by LDC.
 ---
 
 David

I took my mind a minute to process the point of that ("Is __VENDOR__ a new thing? Is it something about nested exceptions? What's with the version(Windows)...?") ...and then my thoughts jumped straight to: Holy shit!! :) Fantastic news!
Feb 11 2013
prev sibling next sibling parent "David Nadlinger" <see klickverbot.at> writes:
On Monday, 11 February 2013 at 17:19:16 UTC, Dmitry Olshansky 
wrote:
 Nice one!

 There got to be size_t.sizeof printed somewhere ... :)

It would be 4; MinGW for Win64 uses SEH, and LLVM still doesn't support that (although there is hope). David
Feb 14 2013
prev sibling next sibling parent "David Nadlinger" <see klickverbot.at> writes:
On Monday, 11 February 2013 at 21:50:35 UTC, Nick Sabalausky 
wrote:
 ...and then my thoughts jumped straight to: Holy shit!!

 :)

 Fantastic news!

Don't get too excited. ;) There is still a lot to do, several test cases/unit tests still fail (mainly FP precision and ABI related). But, yes, now there is a real chance of Windows being a "first-class target" for LDC in the near future. I would very much appreciate any help on crushing the remaining bugs (it's not rocket science), see http://wiki.dlang.org/Building_LDC_on_MinGW_x86 for build instructions. David
Feb 14 2013
prev sibling next sibling parent "Jesse Phillips" <Jessekphillips+D gmail.com> writes:
On Monday, 11 February 2013 at 13:33:28 UTC, Iain Buclaw wrote:
 This feature has been around for some time (somewhere in 
 lexer.c iirc) -
 have you really only just added LDC into it David?

LLVM hasn't had support for Exceptions in Windows, Hence the begining version (Windows) {} else static assert(false);
Feb 14 2013
prev sibling next sibling parent "bearophile" <bearophileHUGS lycos.com> writes:
David Nadlinger:

 I would very much appreciate any help on crushing the remaining 
 bugs (it's not rocket science), see 
 http://wiki.dlang.org/Building_LDC_on_MinGW_x86 for build 
 instructions.

Why don't you create one zip or rar, that a user unpacks, adds a path, and tries the compiler? Bye, bearophile
Feb 14 2013
prev sibling next sibling parent "David Nadlinger" <see klickverbot.at> writes:
On Thursday, 14 February 2013 at 23:19:38 UTC, bearophile wrote:
 David Nadlinger:

 I would very much appreciate any help on crushing the 
 remaining bugs (it's not rocket science), see 
 http://wiki.dlang.org/Building_LDC_on_MinGW_x86 for build 
 instructions.

Why don't you create one zip or rar, that a user unpacks, adds a path, and tries the compiler?

Because it's not ready for general consumption yet. For binary packages for the other platforms, see the last release announcement: http://forum.dlang.org/thread/yxklohfbaltbcdnkpnqw forum.dlang.org. David
Feb 14 2013
prev sibling next sibling parent Andrej Mitrovic <andrej.mitrovich gmail.com> writes:
On 2/14/13, David Nadlinger <see klickverbot.at> wrote:
 I would very much appreciate any help on crushing the remaining
 bugs (it's not rocket science), see
 http://wiki.dlang.org/Building_LDC_on_MinGW_x86 for build
 instructions.

I suppose I'll give this a try tonight. However these steps should really be part of a nice and simple D script that does this automatically. Only then can we be sure the instructions are up to date, + it will save time for potential contributors. If I get a working build done I'll try writing such a script. I'm eager to escape the wrath of Optlink on win32. :p
Feb 14 2013
prev sibling next sibling parent "bearophile" <bearophileHUGS lycos.com> writes:
David Nadlinger:

 Because it's not ready for general consumption yet.

If trying the compiler is so complex/hard/time consuming as it looks, I will probably not try it. And maybe other people will do the same. So it will take even more time to find its bugs. Bye, bearophile
Feb 14 2013
prev sibling next sibling parent "David Nadlinger" <see klickverbot.at> writes:
On Friday, 15 February 2013 at 00:02:00 UTC, bearophile wrote:
 David Nadlinger:

 Because it's not ready for general consumption yet.

If trying the compiler is so complex/hard/time consuming as it looks, I will probably not try it. And maybe other people will do the same. So it will take even more time to find its bugs.

If you don't want to contribute to LDC development, you shouldn't try it on MinGW yet. Simple as that. When the test suite has turned green or near-green, we will of course release binary packages. David
Feb 14 2013
prev sibling next sibling parent "jerro" <a a.com> writes:
 http://wiki.dlang.org/Building_LDC_on_MinGW_x86 for build 
 instructions.

It seems there is a bug in the MinGW TLS support patch linked from that page. This line: + DAG.getExternalSymbol("_tls_array"), getPointerTy()); should be + DAG.getExternalSymbol("_tls_array", getPointerTy()));
Feb 14 2013
prev sibling parent "David Nadlinger" <see klickverbot.at> writes:
On Friday, 15 February 2013 at 02:41:47 UTC, jerro wrote:
 http://wiki.dlang.org/Building_LDC_on_MinGW_x86 for build 
 instructions.

It seems there is a bug in the MinGW TLS support patch linked from that page. This line: + DAG.getExternalSymbol("_tls_array"), getPointerTy()); should be + DAG.getExternalSymbol("_tls_array", getPointerTy()));

Yes, always those last-minute refactorings… I fixed the Gist an hour or so ago. David
Feb 14 2013