Mercurial > emacs
view msdos/mainmake.v2 @ 28062:26edef632c89
This is a big redesign of failure-stack and register handling, prompted
by bugs revealed when trying to add shy-groups. Overall, what happened
is that loops are now structured a little differently, groups can be
shy and the code is a little simpler.
(enum re_opcode_t): Remove jump_past_alt, maybe_pop_jump,
push_dummy_failure and dumy_failure_jump.
Add on_failure_jump_(exclusive, loop and smart).
Also fix the comment for (start|stop)_memory since they now only take
one argument (the second has becomes unnecessary).
(print_partial_compiled_pattern): Adjust for changes in re_opcode_t.
(print_compiled_pattern): Use %ld to printf long ints and flush to make
debugging a little easier.
(union fail_stack_elt): Make the integer unsigned.
(struct fail_stack_type): Add a `frame' element.
(INIT_FAIL_STACK): Init `frame' as well.
(POP_PATTERN_OP): New macro for re_compile_fastmap.
(DEBUG_PUSH, DEBUG_POP): Remove.
(NUM_REG_ITEMS): Remove.
(NUM_NONREG_ITEMS): Adjust.
(FAILURE_PAT, FAILURE_STR, NEXT_FAILURE_HANDLE, TOP_FAILURE_HANDLE):
New macros for the cycle detection.
(ENSURE_FAIL_STACK): New macro for PUSH_FAILURE_(REG|POINT).
(PUSH_FAILURE_REG, POP_FAILURE_REG, CHECK_INFINITE_LOOP): New macros.
(PUSH_FAILURE_POINT): Don't push registers any more.
The pattern address pushed is not the destination of the jump
but the source of it instead.
(NUM_FAILURE_ITEMS): Remove.
(POP_FAILURE_POINT): Adapt to the new stack structure (i.e. pop
registers before the actual failure point).
Don't hardcode any meaning for str==NULL anymore.
(union register_info_type, REG_MATCH_NULL_STRING_P, IS_ACTIVE)
(MATCHED_SOMETHING, EVER_MATCHED_SOMETHING, SET_REGS_MATCHED): Remove.
(REG_UNSET_VALUE): Use NULL (why not?).
(compile_range): Remove declaration since it doesn't exist.
(struct compile_stack_elt_t): Remove inner_group_offset.
(old_reg(start|end), reg_info, reg_dummy, reg_info_dummy): Remove.
(regex_grow_registers): Remove dead code.
(FIXUP_ALT_JUMP): New macro.
(regex_compile): Add shy-groups
Change loops to use on_failure_jump_smart&jump instead of
on_failure_jump&maybe_pop_jump.
Change + loops to eliminate the initial (dummy_failure_)jump.
Remove c1_base (looks like unused variable to me).
Use `jump' instead of `jump_past_alt' and don't bother with
push_dummy_failure in alternatives since it is now unnecessary.
Use FIXUP_ALT_JUMP.
Eliminate a useless `#ifdef emacs' for (re)allocating the stack.
(re_compile_fastmap): Remove dead variables i and num_regs.
Exit from loop when bufp->can_be_null rather than jumping to `done'.
Avoid jumping backwards so as to ensure termination.
Use PATTERN_STACK_EMPTY and POP_PATTERN_OP.
Improved handling of backreferences.
Remove dead code in handling of `anychar'.
(skip_noops, mutually_exclusive_p): New functions taken from the
handling of `maybe_pop_jump' in re_match_2_internal.
Slightly improve mutually_exclusive_p to handle ".+\n".
((lowest|highest)_active_reg, NO_(LOWEST|HIGHEST)_ACTIVE_REG)
Remove.
(re_match_2_internal): Use %p instead of 0x%x when printf'ing ptrs.
Don't SET_REGS_MATCHED anymore. Remove many dead variables.
Push register (in `start_memory') on the stack rather than storing it
in old_reg(start|end).
Remove the cycle detection from `stop_memory', replaced by the use
of on_failure_jump_loop for greedy loops.
Add code for the new on_failure_jump_<foo>.
Remove ad-hoc code in `on_failure_jump' to push more registers
in the case of a loop.
Take out code from `maybe_pop_jump' into separate functions and
adapt it to the semantics of `on_failure_jump_smart'.
Remove jump_past_alt, dummy_failure_jump and push_dummy_failure.
Remove dummy_failure handling and handling of `failures to jump
to on_failure_jump' (this last one was already dead code, it seems).
((group|alt|common_op)_match_null_string_p): Remove.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Wed, 08 Mar 2000 23:25:41 +0000 |
parents | 075da7e5be80 |
children | b2c3baf84d16 |
line wrap: on
line source
# Top-level Makefile for Emacs under MS-DOS/DJGPP v2.0 or higher. -*-makefile-*- # # make all to compile and build Emacs. # make install to install it. # make TAGS to update tags tables. # # make clean or make mostlyclean # Delete all files from the current directory that are normally # created by building the program. Don't delete the files that # record the configuration. Also preserve files that could be made # by building, but normally aren't because the distribution comes # with them. # # Delete `.dvi' files here if they are not part of the distribution. # # make distclean # Delete all files from the current directory that are created by # configuring or building the program. If you have unpacked the # source and built the program without creating any other files, # `make distclean' should leave only the files that were in the # distribution. # # make realclean # Delete everything from the current directory that can be # reconstructed with this Makefile. This typically includes # everything deleted by distclean, plus more: C source files # produced by Bison, tags tables, info files, and so on. # # make extraclean # Still more severe - delete backup and autosave files, too. # This gork is required for those who use a Unix-style shell, and # have SHELL in the environment pointing to it. Here we force # Make to use COMMAND.COM instead. This Makefile won't work otherwise. # (The /xyzzy directory is used to minimize the chance that someone # actually has such a directory with an incompatible command.com. We # used to have /dos there, but some Windows installations have an old # version of DOS stashed in that directory, and command.com from there # won't run on Windows, complaining about "Incorrect DOS version". # Make will look up PATH for the shell executable, so the directory name # is not important.) SHELL=/xyzzy/command MAKESHELL=/xyzzy/command # Generate a full pathname of the top-level installation directory top_srcdir := $(subst \,/,$(shell cd)) # Find out which version of Emacs this is. version := ${shell sed -n -e '/(defconst emacs-version/s/^[^"]*\("[^"]*"\).*/\1/p' lisp/version.el} all: lib-src src man lib-src: FRC cd lib-src $(MAKE) top_srcdir=${top_srcdir} version=${version} cd .. src: FRC cd src $(MAKE) top_srcdir=${top_srcdir} redir -o gdb.sed echo '/-geometry/s,^.*,set environment HOME $(top_srcdir),' redir -oa gdb.sed echo '/environment *TERM/s/^.*/set environment TERM internal/' redir -oa gdb.sed echo '/x_error_quitter/s/^.*/set environment NAME root/' redir -o gdb.tmp sed -f gdb.sed _gdbinit redir -oa gdb.tmp echo 'set environment USER root' redir -oa gdb.tmp echo 'set environment EMACSPATH $(top_srcdir)/bin' redir -oa gdb.tmp echo 'set environment SHELL $(subst \,/,$(COMSPEC))' redir -oa gdb.tmp echo 'set environment PATH $(subst \,/,$(PATH))' update gdb.tmp gdb.ini rm -f gdb.tmp gdb.sed cd .. if exist leim\Makefile redir $(MAKE) -C leim top_srcdir=${top_srcdir} man: FRC cd man $(MAKE) top_srcdir=${top_srcdir} cd .. install: all if not exist bin\nul md bin cd lib-src if exist hexl.exe mv -f hexl.exe ../bin if exist etags.exe mv -f etags.exe ../bin if exist ctags.exe mv -f ctags.exe ../bin if exist b2m.exe mv -f b2m.exe ../bin if exist fns.el update fns.el ../bin/fns.el cd .. cd src stubify emacs stubedit emacs.exe minstack=512k mv -f emacs.exe ../bin/ cd .. FRC: TAGS tags: lib-src FRC cd lib-src if exist etags.exe mv -f etags.exe ../bin cd .. cd lisp ../bin/etags [a-zA-Z]*.el [a-zA-Z]*/[a-zA-Z]*.el cd .. cd src ../bin/etags --include=../lisp/TAGS \ '--regex=/[ ]*DEFVAR_[A-Z_ (]+"\([^"]+\)"/' *.c *.h s/msdos.h m/intel386.h cd .. ./bin/etags --include=src/TAGS check: @echo "We don't have any tests for GNU Emacs yet." clean: cd lib-src $(MAKE) clean cd .. cd src $(MAKE) clean cd .. cd oldxmenu -$(MAKE) clean cd .. cd leim if exist Makefile redir $(MAKE) clean cd ..