Commit Graph

22968 Commits (6cca0ea46888a442aaa3d0bdccdfbc85398c3883)

Author SHA1 Message Date
Doug Coleman 6cca0ea468 compiler.cfg: Rename <##foo> to ##foo, in the low-level IR 2011-11-11 19:48:38 -08:00
Doug Coleman 1d84f5e190 benchmark.udp-echo0: Fix the memory leak. 2011-11-11 17:58:45 -08:00
Joe Groff 1c99568492 io.sockets.windows: plug receive-from memory leak
Should fix #387.
2011-11-11 17:56:04 -08:00
Joe Groff 69f35b36aa math.parser: undo some inlining to shrink size
For #318.
2011-11-11 15:49:53 -08:00
Joe Groff 2c5014e74e vm: "edges" command for factorbug 2011-11-11 10:12:36 -08:00
Joe Groff 88bbffd838 tools.deploy: label small-enough? tests
Put a no-op "vocab name" drop in the small-enough? tests so that it's immediately apparent from build farm errors which vocabs are deploying over the limit.
2011-11-10 19:34:36 -08:00
Joe Groff 316426e1ec tools.profiler.sampling: better test quots
Bump up the iota lengths so the tests don't sporadically fail with no data.
2011-11-10 19:29:20 -08:00
John Benediktsson 7b28e60e0e hashtables: fix docs for new-key@, and note that quadratic probing is used now. 2011-11-10 16:20:59 -08:00
Joe Groff 3552ade9b1 bootstrap.primitives: remove counting "profiling" 2011-11-10 16:04:42 -08:00
Joe Groff c31530caec vm: strip out call-counting profiler
This makes the separate "code" and "entry_point" fields in word and quotation redundant, so also remove them to reclaim an additional cell per word and quotation object, which should help with #318.
2011-11-10 16:01:07 -08:00
Joe Groff 139c9ca38c init signals or console after stage2 init
A signal during early bootstrap is certainly an error, and the environment isn't there yet for Factor's signal handlers to work, so it makes no sense to install Factor's signal handlers beforehand. They'll just crash.
2011-11-10 16:01:07 -08:00
Joe Groff 9e4a51c55f vm: don't SIGQUIT on unix or Ctrl-Break on windows
This gives us an escape hatch for when things go way south and ^C can't be handled. Also unmask SIGQUIT and SIGTERM from the stdin_loop thread so the thread doesn't keep the process alive after those signals.
2011-11-10 16:01:07 -08:00
John Benediktsson e29c4589c4 hashtables: allow re-using deleted tombstones. Fixes #381. 2011-11-10 13:05:51 -08:00
Joe Groff 433b8e6b6b sequences.parser: fix load error 2011-11-10 12:33:10 -08:00
Joe Groff c8fd36bbdb kill tools.profiler.counting and ui.tools.profiler
Load tools.profiler.sampling from bootstrap/tools instead.
2011-11-10 12:33:10 -08:00
John Benediktsson 27b96452ee combinators: fix docs for case. 2011-11-10 11:20:28 -08:00
Joe Groff 82e01fb58c new module typed.namespaces: get/set + type check 2011-11-10 10:47:21 -08:00
Doug Coleman ab2e4ae5e6 factor.sh: print more docs in usage() 2011-11-09 22:56:59 -08:00
Slava Pestov 98d98ab04a io.ports: clean up 2011-11-10 00:40:31 -05:00
Joe Groff d685cb6502 io.ports: make read-step inline 2011-11-09 19:59:46 -08:00
Joe Groff 47cedd8d3d slice boa -> <slice-unsafe>
If you didn't define it, don't boa it
2011-11-09 19:22:09 -08:00
Joe Groff 0cf0b91aad io: clean up some mess 2011-11-09 19:11:04 -08:00
Joe Groff b4947a62f6 io: fix each-block-slice typo 2011-11-09 18:06:58 -08:00
Joe Groff 4f4bbd3304 io: more hot-rodding for #376
* Change the interface of read-into to return a slice and an eof boolean separately so the compiler can optimize the slice.
* Add an each-stream-block-slice combinator that behaves like each-block but reuses a preallocated buffer for every iteration.
* Pull some strings in the stream-read-into implementation to further improve type propagation and bounds check elimination.
2011-11-09 17:22:01 -08:00
Joe Groff a67931b7c5 io.ports: fix bootstrap
Apparently can't use TYPED: or have HINTS: in the wrong place.
2011-11-09 16:32:47 -08:00
Joe Groff 9443f30b7d io.backend.unix: hints on M\ fd refill
Trims some low-order dispatch overhead for #376.
2011-11-09 16:32:47 -08:00
John Benediktsson 22e9109631 sequences: improve docs for map-sum. 2011-11-09 15:00:08 -08:00
Joe Groff 5a3537b90a io.files: add file-reader, file-writer mixins
This lets us do some trickery so that the stream-element-type propagates from <file-reader>/<file-writer>. For #376.
2011-11-09 14:43:39 -08:00
Joe Groff f31fb8a968 io:read: don't resize output buffer if unnecessary
Even with a short-circuit test in the VM primitives, resize still has an overly high runtime cost in tight loops. For #376.
2011-11-09 14:29:12 -08:00
Joe Groff bab801b321 io.ports: make read-step TYPED:
Eliminates more dispatch. For #376.
2011-11-09 14:13:41 -08:00
Joe Groff 63c48aa952 io.buffers, io.ports: trim some dispatch
For #376. Still some work to do.
2011-11-09 13:31:02 -08:00
Joe Groff 2dd31f4602 tools.profiler.sampling: preliminary docs 2011-11-09 11:34:31 -08:00
Joe Groff 2e9552d98a vm: hand SIGALRM to signal pipe if not sampling 2011-11-08 23:37:22 -08:00
Joe Groff 97a048fdc1 deques: fix help-lint 2011-11-08 23:27:33 -08:00
Joe Groff c0094186a1 vm: fix build on windows 2011-11-08 23:17:51 -08:00
Joe Groff 466d41c341 unix.signals: documentation and metadata 2011-11-08 23:12:10 -08:00
Joe Groff 5f3cd4079c vm: make signal pipe nonblocking
On the off chance the Factor end of the signal handler mechanism isn't listening, we don't want to tie up the VM because the pipe's buffer got full.
2011-11-08 22:07:22 -08:00
Joe Groff 637af2eedd tools.profiler.sampling: top-down-max-depth report
Fixes #366
2011-11-08 14:35:25 -08:00
Joe Groff d2b39269d8 tools.profiler.sampling: change some names around
Rename the versions of top-down etc. that take sample data to "top-down*" (from "(top-down)") so they don't look so scary to use. Change "get-raw-profile-data" to "most-recent-profile-data".
2011-11-08 14:11:53 -08:00
Joe Groff 820fd6417d vm: don't send foreign samples to outer space 2011-11-08 14:00:33 -08:00
John Benediktsson 786bba8a63 deques: adding ?peek-front and ?peek-back. 2011-11-08 13:20:56 -08:00
Joe Groff feb8c6149a io.backend: start signal thread after io-backend
The c-io-backend can't handle input-ports and raises an error during bootstrap.
2011-11-08 11:54:54 -08:00
Joe Groff 90609cc5d8 vm: don't pass this to safepoint constructor
It's bad juju and MSVC calls us out on it.
2011-11-08 11:06:00 -08:00
Joe Groff 8b9c9a5c63 unix.process: take raise from unix.ffi
And fix introduced ambiguity between unix.ffi:kill and unix.process:kill
2011-11-08 10:42:51 -08:00
Joe Groff fc7c175c9f new module unix.signals: app-level signal handlers
example:

IN: scratchpad USING: unix.ffi unix.signals ;
Loading resource:basis/unix/signals/signals.factor
IN: scratchpad [ V{ "Me not that kind of orc!" "Me busy, leave me alone!" "Work work" "Zug zug" } pop print flush ] SIGINFO add-signal-handler
IN: scratchpad load: 0.60  cmd: factor 41541 running 0.28u 0.16s
Zug zug
load: 0.71  cmd: factor 41541 running 0.28u 0.16s
Work work
load: 0.71  cmd: factor 41541 running 0.28u 0.16s
Me busy, leave me alone!
load: 0.73  cmd: factor 41541 running 0.28u 0.16s
Me not that kind of orc!
2011-11-08 10:21:49 -08:00
Joe Groff 0c58fd5c26 vm: more commentary on lock_console() stuff 2011-11-08 08:52:52 -08:00
Joe Groff 8337b08d0d io.backend.unix: startup hook for signal-pipe 2011-11-08 08:42:48 -08:00
Joe Groff 5f811c0573 vm: don't mask SIGTTIN from stdin_loop
Fixes #360
2011-11-08 08:42:48 -08:00
Joe Groff ed24890dce io.backend.unix: init-signal-pipe function
Currently just reads off signal numbers and drops them.
2011-11-08 08:42:48 -08:00
Joe Groff f9aa0419c4 vm: interrupt stdin_loop when entering fep
The stdin_loop thread will keep trying to consume input unless we stop it by sending it a signal. Use SIGUSR2 to stop the read syscall and a mutex to hold up the loop while the fep is active.
2011-11-08 08:42:48 -08:00