Doug Coleman [Sat, 29 Oct 2011 22:10:42 +0000 (15:10 -0700)]
Clean up editors.*vim so that it runs detached with gvim and there is less
code duplication. Use mvim on mac. Remove gvim.unix vocabulary since it
doesn't do anything besides return "gvim" as the path.
Doug Coleman [Sat, 29 Oct 2011 06:39:40 +0000 (23:39 -0700)]
Cleanup vocab name validation. Vocab names and vocab prefixes are the same concept, and by disallowing slashes, spaces, and colon, we automatically check for absolute paths. Unit test this.
Slava Pestov [Sat, 29 Oct 2011 04:52:24 +0000 (21:52 -0700)]
io.launcher: change kill-process to also close the pipe, if there is one, so that try-output-process can timeout even if the process spawns a subprocess which inherits the pipe. This fixes part of #307
Joe Groff [Thu, 27 Oct 2011 00:19:23 +0000 (17:19 -0700)]
vm: win32 GetCurrentThread is a fake thread handle
Open a real thread handle with the necessary permissions to dispatch a handler from the the Ctrl-C handler thread.
Joe Groff [Thu, 27 Oct 2011 00:04:11 +0000 (17:04 -0700)]
vm: change factorbug "q" to quit process
Also change the docs around so the useful commands are all listed under "Basic commands", and rename the more arcane "s" and "r" dumps to "ds" and "dr".
Joe Groff [Wed, 26 Oct 2011 23:22:42 +0000 (16:22 -0700)]
vm: move dispatch_signal_handler to cpu-x86.cpp
The new signal handler dispatch is logic is CISC-centric; defer fixing it until we find someone who cares
Joe Groff [Mon, 24 Oct 2011 21:26:58 +0000 (14:26 -0700)]
vm: dispatch signal handlers through subprimitive
We also need to save C ABI volatile registers before calling the signal handler in order to be able to reliably resume. Add signal-handler and leaf-signal-handler subprimitives to preserve volatile registers before invoking the signal handler C function.
Joe Groff [Fri, 21 Oct 2011 17:53:44 +0000 (10:53 -0700)]
cpu.x86.(32,64).bootstrap: get rid of PUSH malarky
In the function prologue, move the stack pointer once after the stack frame is set up instead of PUSHing the stack frame piece by piece.
Joe Groff [Fri, 21 Oct 2011 06:21:36 +0000 (23:21 -0700)]
vm: allocate an extra canary page before callstack
This will let us safely unguard the callstack overflow guard page as a grace page so the callstack overflow handler can do its business without discarding frames.
Joe Groff [Fri, 21 Oct 2011 06:19:32 +0000 (23:19 -0700)]
vm: add factorbug command to throw exception
Also rename "q" to "c" because it "c"ontinues, remove the useless "im" command, and rename the less useful "t" to "trim" so we can use "t" to mean "throw"
Joe Groff [Fri, 21 Oct 2011 04:00:25 +0000 (21:00 -0700)]
vm: fep on SIGINT or SIGQUIT instead of exception
It's not robust currently to raise an exception because a lot of our code that isn't already written with exceptions in mind breaks. Also, a signal is likely to be received by an FFI callback installed on the IO multiplexer, which will cause Factor to die since the callback cannot handle the exception. We need a more robust solution to dealing with SIGINT.
Also lay some groundwork for counting profile samples and reporting non-interrupting asynchronous signals.
Joe Groff [Fri, 21 Oct 2011 03:55:55 +0000 (20:55 -0700)]
vm: clean up signal handler dispatch
Remove the weird and broken functions fix_callstack_top and scrub_return_address. Instead, simply decrement the SP and store the PC from the front end of the signal handler so that the back end can return back into the original context normally. Currently aborts for leaf procedure frames pending a more robust solution.
Joe Groff [Tue, 18 Oct 2011 00:11:12 +0000 (17:11 -0700)]
cpu.x86.assembler: add MOVABS instruction
MOVABS generates the one-byte opcode version of MOV eAX, [absolute] or MOV [absolute], eAX, which saves a byte per safepoint on x86-32.
Doug Coleman [Mon, 24 Oct 2011 00:05:22 +0000 (19:05 -0500)]
Factor out ``no-roots no-prefixes'' into its own word. Add load-root, load-from-root, vocabs-in-root and implement load in terms of load-from-root.
Add error checking for append-vocab-dir and (child-vocabs) in case someone tries to pass them the wrong parameters.
Rename: vocab-dir+ to append-vocab-dir
Document load-from-root and load-root