[Issue 3462] Add a clean way to exit a process.
http://d.puremagic.com/issues/show_bug.cgi?id=3462 Sean Kelly s...@invisibleduck.org changed: What|Removed |Added Status|NEW |ASSIGNED --- Comment #3 from Sean Kelly s...@invisibleduck.org 2009-10-31 23:15:05 PDT --- This is tricky. If multiple threads are running then the app has to either forcibly terminate the threads or wait for them to complete. Even trickier if the ProcessExit exception isn't thrown from the main thread. One could send a signal to all executing threads, telling them to throw an exception except that it isn't legal to throw an exception from a signal handler. Sadly, I haven't come up with a way to do this that doesn't risk deadlocks or other Bad Things from happening. As far as I know, the easiest thing is still to call cstdlib exit(). If a clean, safe option presents itself I'd gladly add a Runtime.exit() routine. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 3462] Add a clean way to exit a process.
http://d.puremagic.com/issues/show_bug.cgi?id=3462 --- Comment #4 from Leandro Lucarella llu...@gmail.com 2009-11-01 10:37:39 PST --- Here is the NG discussion: http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.Darticle_id=99876 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 3463] Integrate Precise Heap Scanning Into the GC
http://d.puremagic.com/issues/show_bug.cgi?id=3463 --- Comment #1 from David Simcha dsim...@yahoo.com 2009-11-01 10:46:03 PST --- Created an attachment (id=488) Templates to generate bit masks, documentation of format. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 3463] Integrate Precise Heap Scanning Into the GC
http://d.puremagic.com/issues/show_bug.cgi?id=3463 David Simcha dsim...@yahoo.com changed: What|Removed |Added Attachment #487 is|0 |1 obsolete|| --- Comment #2 from David Simcha dsim...@yahoo.com 2009-11-01 10:48:54 PST --- Created an attachment (id=489) Correct patch. Accidentally attached the wrong one. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 3463] Integrate Precise Heap Scanning Into the GC
http://d.puremagic.com/issues/show_bug.cgi?id=3463 Leandro Lucarella llu...@gmail.com changed: What|Removed |Added CC||llu...@gmail.com --- Comment #3 from Leandro Lucarella llu...@gmail.com 2009-11-01 11:38:16 PST --- The patch looks nice. I have some questions: * Why did you choose to store the bitmask after the SENTINEL_POST and not before? I think that storing the bitmask before the SENTINEL could let you detect a corrupted bitmaks when version SENTINEL is compiled. * In the bitMaskMixin string mixin you have a nested function setBitMask() that's used only once. I wonder if you reused that function before or if you put that code in a nested function just because you you think it's more clear that way. It kind of confused me at first. * Why is the bitMaskMixin a mixin and not just a plain function? I can't see any reason to make it a string mixin, I am missing something? I find this very confusing and makes the code harder to follow, since some variables appear from nowhere. Thanks for the good work. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 3463] Integrate Precise Heap Scanning Into the GC
http://d.puremagic.com/issues/show_bug.cgi?id=3463 --- Comment #4 from David Simcha dsim...@yahoo.com 2009-11-01 11:49:58 PST --- 1. I chose to store the bitmask after SENTINEL_POST so that none of the assumptions of the sentinel code (such as that the sentinel is immediately after the data) changes. 2. The fact that setBitMask() is a nested function is a minor holdover from when the design was a little different. If anyone really hates it a lot, it can be refactored. 3. The mixin is because I needed a lot of the same logic in realloc() and extend() and it was complicated enough that I felt it was the lesser of two evils to use a mixin, even with the variables appearing out of nowhere magic, rather than duplicate that logic. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 3463] Integrate Precise Heap Scanning Into the GC
http://d.puremagic.com/issues/show_bug.cgi?id=3463 --- Comment #5 from Leandro Lucarella llu...@gmail.com 2009-11-01 12:31:57 PST --- (In reply to comment #4) 1. I chose to store the bitmask after SENTINEL_POST so that none of the assumptions of the sentinel code (such as that the sentinel is immediately after the data) changes. Seems reasonable, the SENTINEL version is not very used anyway. 2. The fact that setBitMask() is a nested function is a minor holdover from when the design was a little different. If anyone really hates it a lot, it can be refactored. I agree is not terrible, but since it's a pretty trivial change I guess it could be nice to remove it, to improve readability (I don't think is a performance problem, readability and complexity is my only concern). If you don't feel like changing it yourself I can upload an amended patch. 3. The mixin is because I needed a lot of the same logic in realloc() and extend() and it was complicated enough that I felt it was the lesser of two evils to use a mixin, even with the variables appearing out of nowhere magic, rather than duplicate that logic. Sure, duplicating code is never a good idea. The question is, why it can't be done with a plain-old function? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 3463] Integrate Precise Heap Scanning Into the GC
http://d.puremagic.com/issues/show_bug.cgi?id=3463 --- Comment #6 from David Simcha dsim...@yahoo.com 2009-11-01 12:36:22 PST --- 3. The mixin is because I needed a lot of the same logic in realloc() and extend() and it was complicated enough that I felt it was the lesser of two evils to use a mixin, even with the variables appearing out of nowhere magic, rather than duplicate that logic. Sure, duplicating code is never a good idea. The question is, why it can't be done with a plain-old function? Because I needed to dump a whole bunch of variables (not just 1) into the stack frames of realloc() and extend() and the only way this could have been done with a plain old function would be to create a struct, create a function that returns the struct, etc. or to use lots and lots of out paramters. I really felt the mixin was the least unclear way that this logic could be injected into both extend() and realloc(). -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 3464] New: is( void function() == function) is false
http://d.puremagic.com/issues/show_bug.cgi?id=3464 Summary: is( void function() == function) is false Product: D Version: 2.035 Platform: Other OS/Version: Windows Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: dsim...@yahoo.com --- Comment #0 from David Simcha dsim...@yahoo.com 2009-11-01 15:21:27 PST --- pragma(msg, is( void delegate() == delegate).stringof); // true pragma(msg, is( void function() == function).stringof); // false -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 2862] ICE(template.c) using type tuple as function argument
http://d.puremagic.com/issues/show_bug.cgi?id=2862 Leandro Lucarella llu...@gmail.com changed: What|Removed |Added CC||llu...@gmail.com --- Comment #4 from Leandro Lucarella llu...@gmail.com 2009-11-01 18:48:36 PST --- SVN commit: http://www.dsource.org/projects/dmd/changeset/233 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 3465] New: isIdeographic can be wrong in std.xml
http://d.puremagic.com/issues/show_bug.cgi?id=3465 Summary: isIdeographic can be wrong in std.xml Product: D Version: 2.035 Platform: Other OS/Version: All Status: NEW Severity: minor Priority: P2 Component: Phobos AssignedTo: nob...@puremagic.com ReportedBy: y0uf00...@gmail.com --- Comment #0 from hed010gy y0uf00...@gmail.com 2009-11-01 21:51:25 PST --- The std.xml functionisIdeographic failed my parser on one of the xml conformance tests for the character 0x4E00. // As implemented in XML Piece Parser Project, http://source.miryn.org/ // but I took it from std.xml //WRONG in std.xml //invariant IdeographicTable=[0x4E00,0x9FA5,0x3007,0x3007,0x3021,0x3029]; //RIGHT, because for lookup function, // the table data range pairs should be ordered! dchar[] IdeographicTable=[0x3007,0x3007,0x3021,0x3029,0x4E00,0x9FA5]; // PERFORMANCE SUGGESTION // also lookup is best done for tables that are larger // for smaller tables, like this one, or character, // surely a hard coded search will be faster // Surely not much more code, is generated for this. // and faster, since no function call to lookup, and no array slices used. bool isIdeographic(dchar c) { if (c == 0x3007) return true; if (c = 0x3007 c = 0x3029) return true; if (c = 0x4E00 c = 0x9FA5) return true; return false; } // Only suggestion here.. // isChar has to be called for every single character in the document, and //it must be worth a bit of optimisation, // especially for common cases. /** * Returns true if the character is a character according to the XML standard * Character references must refer to one of these. * Any unicode character, excluding surrogate blocks FFFE and . * #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x1-#x10] * Avoid [#x7F-#x84], [#x86-#x9F], [#xFDD0-#xFDEF], * Standards: $(LINK2 http://www.w3.org/TR/1998/REC-xml-19980210, XML 1.0) * * Params: *c = the character to be tested *The standard ASCII case gets at most 3 value comparisons. */ bool isChar(dchar c) { if (c = 0xD7FF) { if (c = 0x20) { if (c = 0x7F) { if (c = 0x84) return false; if (c = 0x86) { if (c = 0x9F) return false; } } return true; } switch(c) { case 0xA: case 0x9: case 0xD: return true; default: return false; } } else if (c = 0xE000) { if (c 0xFFFE) { if (c = 0xFDD0 c = 0xFDEF) return false; return true; } if (c = 0x1) { if (c = 0x10) { /* some conformance tests have the 0x10 if ((c 0xFFFE) == 0xFFFE) { return false; } */ return true; } } } return false; } // Most digits are expected to be ASCII ones bool isDigit(dchar c) { if (c = 0x0039 c = 0x0030) return true; else return lookup(DigitTable,c); } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 3465] isIdeographic can be wrong in std.xml
http://d.puremagic.com/issues/show_bug.cgi?id=3465 --- Comment #1 from hed010gy y0uf00...@gmail.com 2009-11-01 21:58:11 PST --- // A check on my code indicates afternoon doziness, so here is the better version bool isIdeographic(dchar c) { if (c == 0x3007) return true; if (c = 0x3029 c = 0x3021 ) return true; if (c = 0x9FA5 c = 0x4E00) return true; return false; } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---