1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-11 00:00:49 +02:00
Commit graph

20154 commits

Author SHA1 Message Date
pcpa
2da31e82fa Correct reference to dangling pointer and better note bounds checking
lib/jit_note.c: Correct bounds check and wrong code keeping
	a pointer that could be changed after a realloc call.
2013-01-18 18:26:14 -02:00
pcpa
9e86ef12cf Add the new jit_name call to mark function boundaries
* check/3to2.tst, check/add.tst, check/allocai.tst, check/bp.tst,
	check/call.tst, check/ccall.c, check/clobber.tst, check/divi.tst,
	check/fib.tst, check/ldsti.tst, check/ldstr-c.tst, check/ldstr.tst,
	check/ldstxi-c.tst, check/ldstxi.tst, check/ldstxr-c.tst,
	check/ldstxr.tst, check/lightning.c, check/rpn.tst, check/stack.tst,
	check/varargs.tst, include/lightning.h,
	include/lightning/jit_private.h, lib/jit_arm.c, lib/jit_disasm.c,
	lib/jit_mips.c, lib/jit_note.c, lib/jit_ppc.c, lib/jit_print.c,
	lib/jit_x86.c, lib/lightning.c:	Extend the "jit_note" abstraction
	with the new "jit_name" call, that receives a string argument, and
	should usually be called to mark boundaries of functions of code
	generating jit (that is, it is not expected that the language
	generating jit map its functions to jit functions).
2013-01-18 18:05:57 -02:00
pcpa
c5421a8c76 Make JIT_RET, JIT_FRET and JIT_SP private.
* check/add.tst, check/allocai.tst, check/bp.tst, check/divi.tst,
	check/fib.tst, check/lightning.c, include/lightning/jit_arm.h,
	include/lightning/jit_mips.h, include/lightning/jit_ppc.h,
	include/lightning/jit_private.h, include/lightning/jit_x86.h:
	Make JIT_RET, JIT_FRET and JIT_SP private. These should not be
	used in any operations due to frequently having special
	constraints (usually JIT_FRET). JIT_FP must be made available
	because it must be used as the base register to access stack
	space allocated with jit_allocai.
2013-01-17 16:13:29 -02:00
Andy Wingo
c12fa33415 guile 2.2 will require libgc 7.2 or greater
* configure.ac: Bump required libgc version to 7.2, released March
  2012.
2013-01-17 16:52:58 +01:00
Andy Wingo
a796d0a954 warn on multithreaded fork
* libguile/posix.c (scm_fork): Issue a warning on a multithreaded fork.
* doc/ref/posix.texi (Processes): Add note about multithreaded fork.

* test-suite/tests/00-socket.test: Moved here, from socket.test, so as
  to run before any threads are created.
* test-suite/Makefile.am: Adapt.
2013-01-17 12:38:56 +01:00
Andy Wingo
22cdf986db warning instead of error on multithreaded fork
* libguile/posix.c (scm_fork): Issue a warning instead of an error on a
  multithreaded fork.
* doc/ref/posix.texi (Processes): Add note about multithreaded fork.
2013-01-17 12:25:52 +01:00
Andy Wingo
36c210d14e trace: limit length of "| | | "... prefix
* module/system/vm/trace.scm (build-prefix): New helper.
  (print-application, print-return): Use the helper.
  (trace-calls-to-procedure, trace-calls-in-procedure):
  (trace-instructions-in-procedure, call-with-trace): Add #:max-indent
  argument, defaulting to the terminal width less 40 characters.

* doc/ref/scheme-using.texi: Update `trace' docs.

Based on a patch by Nala Ginrut.
2013-01-16 18:11:47 +01:00
Andy Wingo
3404ada0a6 peval-introduced gensyms infix " "
* module/language/tree-il/peval.scm (peval): Gensyms use whitespace as
  an infix, not a dash.  Helps gensym?-like procedures like those in the
  unused lexical analysis.
2013-01-16 13:27:55 +01:00
Noah Lavine
94027fe6ec Remove 'define-grammar-f'
* module/ice-9/peg.scm: don't re-export 'define-grammar-f'
* module/ice-9/peg/string-peg.scm: don't export 'define-grammar-f'
2013-01-16 10:11:50 +01:00
Noah Lavine
fee87b821f PEG Renames
* module/ice-9/peg.scm: rename 'peg-sexp-compile' to
 'compile-peg-pattern'
* module/ice-9/peg/codegen.scm: same
* module/ice-9/peg/string-peg.scm: same
* module/ice-9/peg/using-parsers.scm: same
* doc/ref/api-peg.texi: same
2013-01-16 10:11:50 +01:00
Noah Lavine
3ebd578616 PEG Renames
* module/ice-9/peg.scm: rename 'define-grammar' to
 'define-peg-string-patterns'
* module/ice-9/peg/string-peg.scm: same
* doc/ref/api-peg.texi: same
* test-suite/tests/peg.bench: same
* test-suite/tests/peg.test: same
2013-01-16 10:11:49 +01:00
Noah Lavine
40ebbd64c4 PEG Renames
* module/ice-9/peg.scm: rename 'define-nonterm' to 'define-peg-pattern'
* module/ice-9/peg/using-parsers.scm: same
* module/ice-9/peg/string-peg.scm: same
* test-suite/tests/peg.test: same
* doc/ref/api-peg.texi: same
2013-01-16 10:11:49 +01:00
Noah Lavine
8022f5023e PEG Renames
* module/ice-9/peg.scm: rename 'peg-parse' to 'match-pattern'
* module/ice-9/peg/string-peg.scm: same
* module/ice-9/peg/using-parsers.scm: same
* doc/ref/api-peg.texi: same
* test-suite/tests/peg.test: same
* test-suite/tests/peg.bench: same
2013-01-16 10:11:49 +01:00
Noah Lavine
d7e2f5e3c2 PEG Renames
* doc/ref/api-peg.texi: rename 'peg-match' to 'search-for-pattern'
* module/ice-9/peg.scm: same
* module/ice-9/peg/using-parsers.scm: same
* test-suite/tests/peg.test: same
2013-01-16 10:11:48 +01:00
Noah Lavine
ecaa261a20 Document PEGs at Runtime
doc/ref/api-peg.texi: suggest a cleaner method of generating PEG parsers
  at runtime.
2013-01-16 10:11:48 +01:00
Noah Lavine
e0d140251a Update PEG Documentation
Change the PEG documentation to use the new style of s-expression PEGs.
2013-01-16 10:11:47 +01:00
Noah Lavine
680f1dee0c Comments in PEG
module/ice-9/peg/string-peg.scm: add comments explaining the format of some
  of the parsed PEG forms.
2013-01-16 10:11:47 +01:00
Noah Lavine
cdeb5a7826 Remove 'body' PEG
module/ice-9/peg/string-peg.scm: update S-expression generators to use the
  new *, +, ?, followed-by, and not-followed-by forms.
module/ice-9/peg/codegen.scm: remove the 'body' form in the PEG s-expression
  representation.
2013-01-16 10:11:47 +01:00
Noah Lavine
72287411e9 Add 'not-followed-by' PEG
The PEG s-expression syntax now uses '(not-followed-by ...)' instead of
'(body ! ... 1)'.
2013-01-16 10:11:46 +01:00
Noah Lavine
66ba3de0a6 Add 'followed-by' PEG
The PEG s-expression syntax now uses '(followed-by ...)' instead of
'(body & ... 1)'.
2013-01-16 10:11:46 +01:00
Noah Lavine
8e97edd5d3 Add '?' PEG
The PEG s-expression syntax now uses '(? ...)' instead of '(body lit ... ?)'.
2013-01-16 10:11:46 +01:00
Noah Lavine
3d19969d74 Add '+' PEG
The PEG s-expression syntax now uses '(+ ...)' instead of '(body lit ... +)'.
2013-01-16 10:11:46 +01:00
Noah Lavine
f310a111de Add '*' PEG
The s-expression representation of PEG grammars now uses a '(* ...)' form
instead of '(body lit ... *)'.
2013-01-16 10:11:46 +01:00
Noah Lavine
5c3f2da81f Clean Up PEG Codegen
* module/ice-9/peg/codegen.scm: remove unnecessary literals in
  peg-sexp-compile.
2013-01-16 10:11:46 +01:00
Noah Lavine
89c3c9ecf0 Make PEG Files
* module/ice-9/peg/using-parsers.scm: remove unnecessary dependency
* module/ice-9/peg.scm: add comment about string-peg dependency
* module/Makefile.scm: add PEG files to makefile
2013-01-16 10:11:45 +01:00
Noah Lavine
0977b03ef1 Rearrange PEG Modules
* module/ice-9/peg.scm: move code out of here
* module/ice-9/peg/match-records.scm: remove this file
* module/ice-9/peg/using-parsers.scm: make a new module with utilities for
  using parsers. It contains the code from both peg.scm and match-records.scm
* module/ice-9/peg/string-peg.scm: update to use new module
2013-01-16 10:11:45 +01:00
Noah Lavine
22d4c9d99a PEG Cache Module
* module/ice-9/peg/cache.scm: add module to hold cache logic for PEG
   parsers
* module/ice-9/peg.scm: move cache logic out of here
2013-01-16 10:11:45 +01:00
Noah Lavine
172ac609c4 Update String PEGs
* module/ice-9/peg/string-peg.scm: use new interface for extending PEG
   syntax
* module/ice-9/peg.scm: remove peg-extended-compile
2013-01-16 10:11:44 +01:00
Noah Lavine
94e8517c16 Extensible PEG Syntax
* module/ice-9/peg/codegen.scm: Make the PEG syntax extensible, and
    move most of the current code generators to the new interface
* doc/ref/api-peg.texi: Document PEG extensions in the PEG Internals
    section of the manual
2013-01-16 10:11:44 +01:00
Noah Lavine
bbc5564c42 Separate PEG Concerns
* module/ice-9/peg/codegen.scm: peg-sexp-compile no longer knows about
   string PEGs
* module/ice-9/peg.scm: add a new function peg-extended-compile that
   calls peg-sexp-compile or peg-string-compile on its argument as
   appropriate
2013-01-16 10:11:44 +01:00
Noah Lavine
0afaf59982 Move define-nonterm
* module/ice-9/peg/string-peg.scm: remove define-nonterm and make a simpler
   macro called `define-sexp-parser' to make the PEG grammar
* module/ice-9/peg.scm: move define-nonterm macro to this file
* module/ice-9/peg/codegen.scm: move code to wrap a parser result nicely to
   this file, under name `wrap-parser-for-users'
2013-01-16 10:11:44 +01:00
Noah Lavine
97c846947d Document PEG Internals
* doc/ref/api-peg.texi: add a manual section about the PEG internals.
2013-01-16 10:11:44 +01:00
Noah Lavine
74393a53cf Remove eval-when
* module/ice-9/peg.scm: remove the eval-when statement
2013-01-16 10:11:43 +01:00
Noah Lavine
44bd21ae7b Factor PEG Structure
* modules/ice-9/peg.scm: remove the part that defines a match structure
 * modules/ice-9/peg/match-record.scm: and put it here
2013-01-16 10:11:43 +01:00
Noah Lavine
f3f41b9226 Factor PEG Functions
* module/ice-9/peg.scm: take out the functions for simplifying trees
 * module/ice-9/peg/simplify-tree.scm: and put them here
2013-01-16 10:11:43 +01:00
Noah Lavine
5e16c41703 Separate PEG Strings
* module/ice-9/peg.scm: remove functions dealing with PEGs as strings
 * module/ice-9/peg/string-peg.scm: and put them here
2013-01-16 10:11:43 +01:00
Noah Lavine
00923497d2 Make Macros Hygienic
* modules/ice-9/peg.scm: convert the unhygienic macros that generate code
    for string PEGs to use hygiene.
2013-01-16 10:11:43 +01:00
Noah Lavine
86849e2c19 Rename in peg.scm
* module/ice-9/peg.scm: rename peg-parse-* functions to avoid confusion
    with what PEGs do.
2013-01-16 10:11:42 +01:00
Noah Lavine
bff3ccd957 Split peg.scm
* module/ice-9/peg.scm: move code generators to new module
 * module/ice-9/peg/codegen.scm: new module for PEG code generators
2013-01-16 10:11:42 +01:00
Andy Wingo
718bc349af reformat and reflow api-peg.texi
* doc/ref/api-peg.texi: Reformat and reflow.
2013-01-16 10:11:42 +01:00
Andy Wingo
c7ed2190cf peg: remove error-val
* module/ice-9/peg.scm (error-val): Remove needless definition.
2013-01-16 10:11:42 +01:00
Andy Wingo
3be2799eaf peg: refactor peg-sexp-compile to operate on syntax directly
* module/ice-9/peg.scm (cg-generic-ret): Remove unused for-syntax
  argument.
  (peg-sexp-compile): Take the pattern as syntax directly, and use
  syntax-case to destructure it and dispatch to the code generators.
  (cg-and, cg-and-int, cg-or, cg-or-int): Refactor to operate on syntax
  instead of on s-expressions.
  (cg-body): Likewise; though this was a larger refactor.
  (define-nonterm, peg-match): Adapt to peg-sexp-compile calling
  convention change.
  (peg-string-compile): Likewise, and just take the grammar as a syntax
  object.
2013-01-16 10:11:41 +01:00
Andy Wingo
5041b82067 peg: cg-string, cg-peg-any, cg-range: remove needless for-syntax arg
* module/ice-9/peg.scm (cg-string, cg-peg-any, cg-range): Remove
  unnecessary for-syntax arg.
  (peg-sexp-compile): Adapt.
2013-01-16 10:11:41 +01:00
Andy Wingo
c5b85eceba peg: change some instances of "match" to "pat"
* module/ice-9/peg.scm (cg-string): Rename "match" to "pat".
  (peg-sexp-compile, cg-body-test, cg-body, define-nonterm): Likewise.
2013-01-16 10:11:40 +01:00
Andy Wingo
63a1336de7 remove cggl, cg-generic-lambda
* module/ice-9/peg.scm (cg-generic-lambda, cggl): Remove these helpers,
  they are no longer needed.
  (cg-generic-ret): Remove optimization for particular cg- routines, as
  it's no longer needed.
2013-01-16 10:11:40 +01:00
Andy Wingo
e9722ec0aa peg: more cggl / cggr excisions
* module/ice-9/peg.scm (cg-peg-any): Don't use cggr.
  (cg-range): Don't use cggl or cggr.
2013-01-16 10:11:39 +01:00
Andy Wingo
102d022f53 peg: cg-string does not use cggr
* module/ice-9/peg.scm (cg-string): Don't use cggr.  Interesting to see
  what it actually generates.
2013-01-16 10:11:39 +01:00
Andy Wingo
67ac87f96d peg: cg-peg-any does not use cggl
* module/ice-9/peg.scm (cg-peg-any): Don't use cggl.
2013-01-16 10:11:39 +01:00
Andy Wingo
7b746f4090 peg: cg-string without cggl
* module/ice-9/peg.scm (cg-string): Refactor to not use cggl.
2013-01-16 10:11:38 +01:00
Andy Wingo
990b24b254 peg: cg-string improvement
* module/ice-9/peg.scm (cg-string): Use the more efficient string= with
  range args, rather than string=? and substring.
2013-01-16 10:11:38 +01:00