summary refs log tree commit diff stats
path: root/compiler/options.nim
Commit message (Expand)AuthorAgeFilesLines
...
* the compiler is now aware of packagesAraq2014-03-021-19/+9
* better handling of packages, still incompleteAraq2014-03-021-13/+44
* resolved conflicts with masterAraq2014-01-181-0/+1
|\
| * Added --noBabelPath override.Dominik Picheta2013-12-251-0/+1
* | clean-up some obsolete code; close #602Zahary Karadjov2013-12-311-2/+0
* | case consistency: cs:partial bootstraps on windowsAraq2013-12-291-4/+4
* | case consistency: next stepsAraq2013-12-291-6/+6
* | case consistency part 4Araq2013-12-271-7/+7
* | case consistency part 1Araq2013-12-271-1/+1
|/
* Added jsondoc compiler switchErik O'Leary2013-12-121-0/+1
* bugfix: package names should not contain '.'Araq2013-10-071-2/+4
* the compiler can now deal with multiple modules of the same nameAraq2013-09-261-4/+9
* JS codegen: supports more builtinsAraq2013-09-241-10/+19
* support for multiple modules of the same name; niminst supports 'platforms'; ...Araq2013-09-241-1/+13
* -d:nocaas mode for easier bootstrapping on exotic OSes (Haiku)Araq2013-09-011-0/+1
* pass-through of static int generic params to arrays when late instantiation i...Zahary Karadjov2013-08-231-1/+1
* Experimental support for delayed instantiation of genericsZahary Karadjov2013-08-231-0/+2
* new scoping rules for 'if' now activeAraq2013-06-041-1/+1
* better error message for subtle nil errorsAraq2013-05-311-1/+1
* Merge branch 'master' into newparserAraq2013-05-071-0/+6
|\
| * support suggest after compile in caas modeZahary Karadjov2013-05-051-0/+6
* | Merge branch 'master' into newparserAraq2013-05-041-2/+2
|\|
| * nimrod dump can now produce a machine readable json reportZahary Karadjov2013-05-011-2/+2
* | revert new scope for 'if'Araq2013-05-021-1/+2
|/
* experimental support for outputting code snippets in error messages; implemen...Zahary Karadjov2013-04-091-0/+6
* bugfix: fix linking when symbol files are usedZahary Karadjov2013-04-081-0/+3
* implemented --dynlibOverride option for static linking of 'dynlib'Araq2013-04-081-0/+15
* Removes executable bit for text files.Grzegorz Adam Hankiewicz2013-03-161-0/+0
* added isServing parameterSimon Hafner2013-02-261-0/+1
* Merge branch 'master' of github.com:Araq/NimrodAraq2013-02-161-1/+1
|\
| * EcmaScript => JS. Fixes #330Simon Hafner2013-02-151-1/+1
* | preparations for a generational GCAraq2013-02-161-2/+2
|/
* first version of a simple mark&sweep GC; activate with --gc:markAndSweepAraq2013-02-071-3/+2
* cleaner GC switchingAraq2013-01-311-4/+8
* the `mainmodule` option has effect only when no explicit module is givenZahary Karadjov2013-01-281-1/+2
* merged upstream masterZahary Karadjov2013-01-271-8/+38
|\
| * implements #295Araq2013-01-081-1/+3
| * implemented --listFullPaths option for aporiaAraq2012-12-271-0/+1
| * first steps for FFI support at compile timeAraq2012-12-191-0/+12
| * lazy paths for Babel supportAraq2012-12-111-7/+22
* | adds an option to interleave the generated code with snippets from the origin...Zahary Karadjov2012-12-021-1/+4
* | track the "owner" heap object in the ref write barrierZahary Karadjov2012-12-011-4/+4
* | CaaS in-memory cachingZahary Karadjov2012-11-281-0/+3
* | caas is now drivable through stdinZahary Karadjov2012-11-281-1/+1
|/
* doc2 improvements; small lexer bugfix: backslashes in commentsAraq2012-11-201-0/+2
* next steps for exception trackingAraq2012-11-031-1/+1
* bugfix: exception tracking (still disabled)Araq2012-11-011-0/+1
* syntax compatibility between do blocks and stmt blocksZahary Karadjov2012-10-041-2/+4
* next steps towards term rewriting macros; simple examples workAraq2012-08-301-2/+4
* made compiler more robust for idetools; implemented idetools.usagesAraq2012-07-301-0/+1
zeroes 25/and-eax 0xf/imm32 # . AL = to-hex-char(AL) e8/call to-hex-char/disp32 # append-byte(f, AL) # . . push args 50/push-eax ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 8/disp8 . # push *(ebp+8) # . . call e8/call append-byte/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp # AL = convert lower nibble to hex 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 0/r32/eax 0xc/disp8 . # copy *(ebp+12) to eax 25/and-eax 0xf/imm32 # . AL = to-hex-char(AL) e8/call to-hex-char/disp32 # append-byte(f, AL) # . . push args 50/push-eax ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 8/disp8 . # push *(ebp+8) # . . call e8/call append-byte/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp $append-byte-hex:end: # . restore registers 58/pop-to-eax # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-append-byte-hex: # - check that append-byte-hex adds the hex textual representation # setup # . clear-stream(_test-stream) # . . push args 68/push _test-stream/imm32 # . . call e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp # append-byte-hex(_test-stream, 0xa) # exercises digit, non-digit as well as leading zero # . . push args 68/push 0xa/imm32 68/push _test-stream/imm32 # . . call e8/call append-byte-hex/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp # check-stream-equal(_test-stream, "0a", msg) # . . push args 68/push "F - test-append-byte-hex"/imm32 68/push "0a"/imm32 68/push _test-stream/imm32 # . . call e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp # . end c3/return # print the hex representation for the lowest byte of a number write-byte-hex-buffered: # f: (addr buffered-file), n: int # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers 50/push-eax # AL = convert upper nibble to hex 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 0/r32/eax 0xc/disp8 . # copy *(ebp+12) to eax c1/shift 5/subop/logic-right 3/mod/direct 0/rm32/eax . . . . . 4/imm8 # shift eax right by 4 bits, while padding zeroes 25/and-eax 0xf/imm32 # . AL = to-hex-char(AL) e8/call to-hex-char/disp32 # write-byte-buffered(f, AL) # . . push args 50/push-eax ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 8/disp8 . # push *(ebp+8) # . . call e8/call write-byte-buffered/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp # AL = convert lower nibble to hex 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 0/r32/eax 0xc/disp8 . # copy *(ebp+12) to eax 25/and-eax 0xf/imm32 # . AL = to-hex-char(AL) e8/call to-hex-char/disp32 # write-byte-buffered(f, AL) # . . push args 50/push-eax ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 8/disp8 . # push *(ebp+8) # . . call e8/call write-byte-buffered/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp $write-byte-hex-buffered:end: # . restore registers 58/pop-to-eax # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-write-byte-hex-buffered: # - check that write-byte-hex-buffered prints the hex textual representation # setup # . clear-stream(_test-stream) # . . push args 68/push _test-stream/imm32 # . . call e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp # . clear-stream($_test-buffered-file->buffer) # . . push args 68/push $_test-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp # write-byte-hex-buffered(_test-buffered-file, 0xa) # exercises digit, non-digit as well as leading zero # . . push args 68/push 0xa/imm32 68/push _test-buffered-file/imm32 # . . call e8/call write-byte-hex-buffered/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp # flush(_test-buffered-file) # . . push args 68/push _test-buffered-file/imm32 # . . call e8/call flush/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp # check-stream-equal(_test-stream, "0a", msg) # . . push args 68/push "F - test-write-byte-hex-buffered"/imm32 68/push "0a"/imm32 68/push _test-stream/imm32 # . . call e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp # . end c3/return write-int32-hex: # f: (addr stream byte), n: int # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp $write-int32-hex:hex-prefix: # write(f, "0x") # . . push args 68/push "0x"/imm32 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 8/disp8 . # push *(ebp+8) # . . call e8/call write/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp $write-int32-hex:rest: # write-int32-hex-bits(f, n, 32) # . . push args 68/push 0x20/imm32 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0xc/disp8 . # push *(ebp+12) ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 8/disp8 . # push *(ebp+8) # . . call e8/call write-int32-hex-bits/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp $write-int32-hex:end: # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return # print rightmost 'bits' of 'n' # bits must be multiple of 4 write-int32-hex-bits: # f: (addr stream byte), n: int, bits: int # pseudocode: # bits -= 4 # while true # if (bits < 0) break # eax = n >> bits # eax = eax & 0xf # append-byte(f, AL) # bits -= 4 # # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers 50/push-eax 51/push-ecx # ecx = bits-4 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 1/r32/ecx 0x10/disp8 . # copy *(ebp+16) to ecx 81 5/subop/subtract 3/mod/direct 1/rm32/ecx . . . . . 4/imm32 # subtract from ecx $write-int32-hex-bits:loop: # if (bits < 0) break 81 7/subop/compare 3/mod/direct 1/rm32/ecx . . . . . 0/imm32 # compare ecx 7c/jump-if-< $write-int32-hex-bits:end/disp8 # eax = n >> bits 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 0/r32/eax 0xc/disp8 . # copy *(ebp+12) to eax d3/>>ecx 5/subop/pad-zeroes 3/mod/direct 0/rm32/eax . . . . . . # shift eax right by ecx bits, padding zeroes # eax = to-hex-char(AL) 25/and-eax 0xf/imm32 e8/call to-hex-char/disp32 # append-byte(f, AL) # . . push args 50/push-eax ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 8/disp8 . # push *(ebp+8) # . . call e8/call append-byte/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp # bits -= 4 81 5/subop/subtract 3/mod/direct 1/rm32/ecx . . . . . 4/imm32 # subtract from ecx eb/jump $write-int32-hex-bits:loop/disp8 $write-int32-hex-bits:end: # . restore registers 59/pop-to-ecx 58/pop-to-eax # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-write-int32-hex: # - check that write-int32-hex prints the hex textual representation # setup # . clear-stream(_test-stream) # . . push args 68/push _test-stream/imm32 # . . call e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp # write-int32-hex(_test-stream, 0x8899aa) # . . push args 68/push 0x8899aa/imm32 68/push _test-stream/imm32 # . . call e8/call write-int32-hex/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp # check-stream-equal(_test-stream, "0x008899aa", msg) # . . push args 68/push "F - test-write-int32-hex"/imm32 68/push "0x008899aa"/imm32 68/push _test-stream/imm32 # . . call e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp # . end c3/return write-int32-hex-buffered: # f: (addr buffered-file), n: int # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp $write-int32-hex-buffered:hex-prefix: # write-buffered(f, "0x") # . . push args 68/push "0x"/imm32 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 8/disp8 . # push *(ebp+8) # . . call e8/call write-buffered/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp $write-int32-hex-buffered:rest: # write-int32-hex-bits-buffered(f, n, 32) # . . push args 68/push 0x20/imm32 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0xc/disp8 . # push *(ebp+12) ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 8/disp8 . # push *(ebp+8) # . . call e8/call write-int32-hex-bits-buffered/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp $write-int32-hex-buffered:end: # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return # print rightmost 'bits' of 'n' # bits must be multiple of 4 write-int32-hex-bits-buffered: # f: (addr buffered-file), n: int, bits: int # pseudocode: # bits -= 4 # while true # if (bits < 0) break # eax = n >> bits # eax = eax & 0xf # write-byte-buffered(f, AL) # bits -= 4 # # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers 50/push-eax 51/push-ecx # ecx = bits-4 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 1/r32/ecx 0x10/disp8 . # copy *(ebp+16) to ecx 81 5/subop/subtract 3/mod/direct 1/rm32/ecx . . . . . 4/imm32 # subtract from ecx $write-int32-hex-bits-buffered:loop: # if (bits < 0) break 81 7/subop/compare 3/mod/direct 1/rm32/ecx . . . . . 0/imm32 # compare ecx 7c/jump-if-< $write-int32-hex-bits-buffered:end/disp8 # eax = n >> bits 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 0/r32/eax 0xc/disp8 . # copy *(ebp+12) to eax d3/>>ecx 5/subop/pad-zeroes 3/mod/direct 0/rm32/eax . . . . . . # shift eax right by ecx bits, padding zeroes # eax = to-hex-char(AL) 25/and-eax 0xf/imm32 e8/call to-hex-char/disp32 # write-byte-buffered(f, AL) # . . push args 50/push-eax ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 8/disp8 . # push *(ebp+8) # . . call e8/call write-byte-buffered/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp # bits -= 4 81 5/subop/subtract 3/mod/direct 1/rm32/ecx . . . . . 4/imm32 # subtract from ecx eb/jump $write-int32-hex-bits-buffered:loop/disp8 $write-int32-hex-bits-buffered:end: # . restore registers 59/pop-to-ecx 58/pop-to-eax # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-write-int32-hex-buffered: # - check that write-int32-hex-buffered prints the hex textual representation # setup # . clear-stream(_test-stream) # . . push args 68/push _test-stream/imm32 # . . call e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp # . clear-stream($_test-buffered-file->buffer) # . . push args 68/push $_test-buffered-file->buffer/imm32 # . . call e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp # write-int32-hex-buffered(_test-buffered-file, 0x8899aa) # . . push args 68/push 0x8899aa/imm32 68/push _test-buffered-file/imm32 # . . call e8/call write-int32-hex-buffered/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp # flush(_test-buffered-file) # . . push args 68/push _test-buffered-file/imm32 # . . call e8/call flush/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp #? # dump line {{{ #? # . write-stream(2/stderr, line) #? # . . push args #? 68/push _test-stream/imm32 #? 68/push 2/imm32/stderr #? # . . call #? e8/call write-stream/disp32 #? # . . discard args #? 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp #? # . write(2/stderr, "$\n") #? # . . push args #? 68/push "$\n"/imm32 #? 68/push 2/imm32/stderr #? # . . call #? e8/call write/disp32 #? # . . discard args #? 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp #? # }}} # check-stream-equal(_test-stream, "0x008899aa", msg) # . . push args 68/push "F - test-write-int32-hex-buffered"/imm32 68/push "0x008899aa"/imm32 68/push _test-stream/imm32 # . . call e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp # . end c3/return # . . vim:nowrap:textwidth=0