summary refs log tree commit diff stats
Commit message (Collapse)AuthorAgeFilesLines
* fixes #7187 sequtils.toSeq produces the sequence from the iterator twice (#8586)Timothee Cour2018-08-161-14/+26
| | | | | * cleanups refs #8584 * fixes #7187
* fixes #8653Andreas Rumpf2018-08-163-3/+6
|
* Genode fixes (#8501)Emery Hemingway2018-08-169-18/+42
| | | | | | | | | | | | | * Genode fixes - wrap strings in "Genode::Cstring" when logging - define SIGABRT for Genode - disable GCC -fstack-protector - use log RPC for fatal messages - add --os:genode build to appveyor - define paramStr and paramCount * Select fixups for Genode POSIX
* added a variant of quoteShellCommand that takes an openArray of arguments ↵Timothee Cour2018-08-161-0/+14
| | | | (#8272)
* Merge branch 'araq-misc' into develAraq2018-08-16122-882/+772
|\
| * attempt to make travis greenAndreas Rumpf2018-08-161-2/+0
| |
| * Merge branch 'devel' into araq-miscAndreas Rumpf2018-08-1628-71/+286
| |\
| * | minor edit to the changelogAndreas Rumpf2018-08-161-1/+1
| | |
| * | implements 'case statement macros' in order to encourage the development of ↵Andreas Rumpf2018-08-164-79/+172
| | | | | | | | | | | | pattern matching mechanisms that are not terrible to look at
| * | put the new for loop macros under an experimental switch named 'forLoopMacros'Andreas Rumpf2018-08-154-5/+13
| | |
| * | implement the --nilseqs switch properlyAndreas Rumpf2018-08-152-2/+4
| | |
| * | changes how the now illegal 'string == nil' comparison is detectedAndreas Rumpf2018-08-155-7/+12
| | |
| * | make more tests greenAndreas Rumpf2018-08-145-38/+8
| | |
| * | make nimweb compile againAraq2018-08-142-2/+2
| | |
| * | renames threadpool.await to blockUntil; refs #7853pre { line-height: 125%; } td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } .highlight .hll { background-color: #ffffcc } .highlight .c { color: #888888 } /* Comment */ .highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */ .highlight .k { color: #008800; font-weight: bold } /* Keyword */ .highlight .ch { color: #888888 } /* Comment.Hashbang */ .highlight .cm { color: #888888 } /* Comment.Multiline */ .highlight .cp { color: #cc0000; font-weight: bold } /* Comment.Preproc */ .highlight .cpf { color: #888888 } /* Comment.PreprocFile */ .highlight .c1 { color: #888888 } /* Comment.Single */ .highlight .cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */ .highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */ .highlight .ge { font-style: italic } /* Generic.Emph */ .highlight .ges { font-weight: bold; font-style: italic } /* Generic.EmphStrong */ .highlight .gr { color: #aa0000 } /* Generic.Error */ .highlight .gh { color: #333333 } /* Generic.Heading */ .highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */ .highlight .go { color: #888888 } /* Generic.Output */ .highlight .gp { color: #555555 } /* Generic.Prompt */ .highlight .gs { font-weight: bold } /* Generic.Strong */ .highlight .gu { color: #666666 } /* Generic.Subheading */ .highlight .gt { color: #aa0000 } /* Generic.Traceback */ .highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ .highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ .highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ .highlight .kp { color: #008800 } /* Keyword.Pseudo */ .highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ .highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */ .highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */ .highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */ .highlight .na { color: #336699 } /* Name.Attribute */ .highlight .nb { color: #003388 } /* Name.Builtin */ .highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */ .highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Flions'>+2
| | | |
| * | | fixes more nil handling regressionsAraq2018-08-1313-60/+49
| | | |
| * | | build Nimble with --nilseqs:on until Nimble is fixedAraq2018-08-131-2/+2
| | | |
| * | | make the vccexe helper tool compile againAraq2018-08-132-7/+7
| | | |
| * | | make more tests greenAndreas Rumpf2018-08-135-19/+19
| | | |
| * | | make generic tests green againAndreas Rumpf2018-08-131-2/+2
| | | |
| * | | make JS tests greenAndreas Rumpf2018-08-133-3/+3
| | | |
| * | | testament: change how JS tests are disable for travis on OSXAndreas Rumpf2018-08-132-3/+5
| | | |
| * | | make more tests greenAndreas Rumpf2018-08-1316-102/+39
| | | |
| * | | WIP: disallow 'nil' for strings and seqsAndreas Rumpf2018-08-1343-173/+207
| | | |
| * | | make tests green againAndreas Rumpf2018-08-102-2/+2
| | | |
| * | | Merge branch 'araq-misc' of github.com:nim-lang/Nim into araq-miscAndreas Rumpf2018-08-103-6/+7
| |\ \ \
| | * | | rename SystemError to CatchableError in order to avoid breaking Nimble and ↵Araq2018-08-103-6/+7
| | | | | | | | | | | | | | | | | | | | probably lots of other code
| * | | | fixes #8599Andreas Rumpf2018-08-102-2/+2
| | | | |
| * | | | Merge branch 'devel' into araq-miscAndreas Rumpf2018-08-1013-17/+193
| |\ \ \ \ | | |/ / / | |/| | |
| * | | | rework the exception hierarchy; refs #8363Andreas Rumpf2018-08-105-106/+45
| | | | |
| * | | | cleanup nimsuggest tests a bitAndreas Rumpf2018-08-103-11/+11
| | | | |
| * | | | make nimsuggest go up in the directory tree in order to determine the main ↵Andreas Rumpf2018-08-101-12/+16
| | | | | | | | | | | | | | | | | | | | .nim file
| * | | | update the 'float' spec; refs #8589Andreas Rumpf2018-08-101-2/+2
| | | | |
| * | | | change the VM's max instruction count to 3_000_000Andreas Rumpf2018-08-102-2/+2
| | | | |
| * | | | deprecated regionized pointersAraq2018-08-105-68/+9
| | | | |
| * | | | deprecate the .this pragmaAraq2018-08-095-51/+48
| | | | |
| * | | | fixes more nil string bugsAraq2018-08-083-8/+10
| | | | |
| * | | | make async tests green for LinuxAraq2018-08-081-2/+0
| | | | |
| * | | | make test green againAraq2018-08-081-6/+6
| | | | |
| * | | | codegen improvement: map the empty string to 'nil' since it's now allowed to ↵Araq2018-08-081-3/+3
| | | | | | | | | | | | | | | | | | | | do that
| * | | | fixes a long standing nil bug in substrAraq2018-08-081-0/+1
| | | | |
| * | | | strutils: minor code cleanupAraq2018-08-081-4/+1
| | | | |
| * | | | deprecate isNil for strings and seqsAraq2018-08-082-5/+5
| | | | |
| * | | | Merge branch 'devel' into araq-miscAraq2018-08-080-0/+0
| |\ \ \ \
| * | | | | fixes the new nimcache handlingAraq2018-08-071-1/+2
| | | | | |
pan class="w"> cell) <- lookup *c1 create-child c2 } fn create-child node: (addr cell) { var n/ecx: (addr cell) <- copy node var child/esi: (addr handle cell) <- get n, first-child { var tmp/eax: (addr cell) <- lookup *child compare tmp, 0 break-if-= child <- get tmp, next-sibling loop } allocate child } ####################################################### # Tree drawing ####################################################### fn render root: (addr cell) { clear-screen var depth/eax: int <- tree-depth root var viewport-width/ecx: int <- copy 0x64 # col2 viewport-width <- subtract 5 # col1 var column-width/eax: int <- try-divide viewport-width, depth render-tree root, column-width, 5, 5, 0x20, 0x64 } fn render-tree c: (addr cell), column-width: int, row-min: int, col-min: int, row-max: int, col-max: int { var root-max/ecx: int <- copy col-min root-max <- add column-width draw-box row-min, col-min, row-max, root-max var c2/eax: (addr cell) <- copy c # render child if possible { var child/edx: (addr handle cell) <- get c2, first-child var child-addr/eax: (addr cell) <- lookup *child { compare child-addr, 0 break-if-= increment row-min decrement row-max render-tree child-addr, column-width, row-min, root-max, row-max, col-max } } # otherwise render sibling if possible (in the same column) { var sib/edx: (addr handle cell) <- get c2, next-sibling var sib-addr/eax: (addr cell) <- lookup *sib { compare sib-addr, 0 break-if-= increment row-min decrement row-max render-tree sib-addr, column-width, row-min, root-max, row-max, col-max } } } fn tree-depth node-on-stack: (addr cell) -> result/eax: int { var tmp-result/edi: int <- copy 0 var node/eax: (addr cell) <- copy node-on-stack var child/ecx: (addr handle cell) <- get node, first-child var child-addr/eax: (addr cell) <- lookup *child { compare child-addr, 0 break-if-= { var tmp/eax: int <- tree-depth child-addr compare tmp, tmp-result break-if-<= tmp-result <- copy tmp } child <- get child-addr, next-sibling child-addr <- lookup *child loop } result <- copy tmp-result result <- increment } fn draw-box row1: int, col1: int, row2: int, col2: int { draw-horizontal-line row1, col1, col2 draw-vertical-line row1, row2, col1 draw-horizontal-line row2, col1, col2 draw-vertical-line row1, row2, col2 } fn draw-horizontal-line row: int, col1: int, col2: int { var col/eax: int <- copy col1 move-cursor-on-screen row, col { compare col, col2 break-if->= print-string-to-screen "-" col <- increment loop } } fn draw-vertical-line row1: int, row2: int, col: int { var row/eax: int <- copy row1 { compare row, row2 break-if->= move-cursor-on-screen row, col print-string-to-screen "|" row <- increment loop } } # slow, iterative divide instruction # preconditions: _nr >= 0, _dr > 0 fn try-divide _nr: int, _dr: int -> result/eax: int { # x = next power-of-2 multiple of _dr after _nr var x/ecx: int <- copy 1 { #? print-int32-hex-to-screen x #? print-string-to-screen "\n" var tmp/edx: int <- copy _dr tmp <- multiply x compare tmp, _nr break-if-> x <- shift-left 1 loop } #? print-string-to-screen "--\n" # min, max = x/2, x var max/ecx: int <- copy x var min/edx: int <- copy max min <- shift-right 1 # narrow down result between min and max var i/eax: int <- copy min { #? print-int32-hex-to-screen i #? print-string-to-screen "\n" var foo/ebx: int <- copy _dr foo <- multiply i compare foo, _nr break-if-> i <- increment loop } result <- copy i result <- decrement #? print-string-to-screen "=> " #? print-int32-hex-to-screen result #? print-string-to-screen "\n" } fn test-try-divide-1 { var result/eax: int <- try-divide 0, 2 check-ints-equal result, 0, "F - try-divide-1\n" } fn test-try-divide-2 { var result/eax: int <- try-divide 1, 2 check-ints-equal result, 0, "F - try-divide-2\n" } fn test-try-divide-3 { var result/eax: int <- try-divide 2, 2 check-ints-equal result, 1, "F - try-divide-3\n" } fn test-try-divide-4 { var result/eax: int <- try-divide 4, 2 check-ints-equal result, 2, "F - try-divide-4\n" } fn test-try-divide-5 { var result/eax: int <- try-divide 6, 2 check-ints-equal result, 3, "F - try-divide-5\n" } fn test-try-divide-6 { var result/eax: int <- try-divide 9, 3 check-ints-equal result, 3, "F - try-divide-6\n" } fn test-try-divide-7 { var result/eax: int <- try-divide 0xc, 4 check-ints-equal result, 3, "F - try-divide-7\n" } fn test-try-divide-8 { var result/eax: int <- try-divide 0x1b, 3 # 27/3 check-ints-equal result, 9, "F - try-divide-8\n" } fn test-try-divide-9 { var result/eax: int <- try-divide 0x1c, 3 # 28/3 check-ints-equal result, 9, "F - try-divide-9\n" }