1. 21 Feb, 2011 1 commit
    • Stefan Monnier's avatar
      Use offsets relative to top rather than bottom for stack refs · 3e21b6a7
      Stefan Monnier authored
      * lisp/emacs-lisp/byte-opt.el (byte-compile-side-effect-and-error-free-ops):
      Remove interactive-p.
      (byte-optimize-lapcode): Update optimizations now that stack-refs are
      relative to the top rather than to the bottom.
      * lisp/emacs-lisp/bytecomp.el (byte-compile-lapcode):
      Turn stack-ref-0 into dup.
      (byte-compile-form): Don't indirect-function since it can signal
      errors.
      (byte-compile-stack-ref, byte-compile-stack-set): Adjust to stack-refs
      being relative to top rather than to bottom in the byte-code.
      (with-output-to-temp-buffer): Remove.
      (byte-compile-with-output-to-temp-buffer): Remove.
      * lisp/emacs-lisp/cconv.el: Use lexical-binding.
      (cconv--lookup-let): Rename from cconv-lookup-let.
      (cconv-closure-convert-rec): Fix handling of captured+mutated
      arguments in defun/defmacro.
      * lisp/emacs-lisp/eieio-comp.el (eieio-byte-compile-file-form-defmethod):
      Rename from byte-compile-file-form-defmethod.
      Don't byte-compile-lambda.
      (eieio-byte-compile-defmethod-param-convert): Rename from
      byte-compile-defmethod-param-convert.
      * lisp/emacs-lisp/eieio.el (eieio-defgeneric-form-primary-only-one):
      Call byte-compile rather than byte-compile-lambda.
      * src/alloc.c (Fgarbage_collect): Don't mark the byte-stack redundantly.
      * src/bytecode.c (exec_byte_code): Change stack_ref and stack_set to use
      offsets relative to top rather than to bottom.
      * lisp/subr.el (with-output-to-temp-buffer): New macro.
      * lisp/simple.el (count-words-region): Don't use interactive-p.
      3e21b6a7
  2. 19 Feb, 2011 1 commit
    • Stefan Monnier's avatar
      * lisp/subr.el (save-window-excursion): New macro, moved from C. · e0f57e65
      Stefan Monnier authored
      * lisp/emacs-lisp/lisp-mode.el (save-window-excursion): Don't touch.
      * lisp/emacs-lisp/cconv.el (cconv-closure-convert-rec, cconv-analyse-form):
      Don't handle save-window-excursion any more.
      * lisp/emacs-lisp/bytecomp.el (interactive-p, save-window-excursion):
      Don't use the byte-code any more.
      (byte-compile-form): Check macro expansion was done.
      (byte-compile-save-window-excursion): Remove.
      * lisp/emacs-lisp/byte-opt.el (byte-optimize-form-code-walker):
      Ignore save-window-excursion.  Don't macroepand any more.
      
      * src/window.c (Fsave_window_excursion): Remove.  Moved to Lisp.
      (syms_of_window): Don't defsubr it.
      * src/window.h (Fsave_window_excursion): Don't declare it.
      * src/bytecode.c (exec_byte_code): Inline Fsave_window_excursion.
      e0f57e65
  3. 17 Feb, 2011 1 commit
    • Stefan Monnier's avatar
      Various compiler bug-fixes. MPC seems to run correctly now. · b38b1ec0
      Stefan Monnier authored
      * lisp/files.el (lexical-binding): Add a safe-local-variable property.
      
      * lisp/emacs-lisp/byte-opt.el (byte-inline-lapcode): Check how many elements
      are added to the stack.
      (byte-compile-splice-in-already-compiled-code): Don't touch lexical nor
      byte-compile-depth now that byte-inline-lapcode does it for us.
      (byte-compile-inline-expand): Don't inline dynbind byte code into
      lexbind code, since it has to be done differently.
      
      * lisp/emacs-lisp/bytecomp.el (byte-compile-arglist-warn):
      Correctly extract arglist from `closure's.
      (byte-compile-cl-warn): Compiler-macros are run earlier now.
      (byte-compile-top-level): Bind byte-compile-lexical-environment to nil,
      except for lambdas.
      (byte-compile-form): Don't run the compiler-macro expander here.
      (byte-compile-let): Merge with byte-compile-let*.
      Don't preserve-body-value if the body's value was discarded.
      
      * lisp/emacs-lisp/cconv.el (cconv--set-diff, cconv--set-diff-map)
      (cconv--map-diff, cconv--map-diff-elem, cconv--map-diff-set): New funs.
      (cconv--env-var): New constant.
      (cconv-closure-convert-rec): Use it and use them.  Fix a typo that
      ended up forgetting to remove entries from lmenvs in `let'.
      For `lambda' use the outer `fvrs' when building the closure and don't
      forget to remove `vars' from the `emvrs' and `lmenvs' of the body.
      
      * lisp/emacs-lisp/cl-macs.el (cl-byte-compile-block): Disable optimization
      in lexbind, because it needs a different implementation.
      
      * src/bytecode.c (exec_byte_code): Fix handling of &rest.
      
      * src/eval.c (Vinternal_interpreter_environment): Remove.
      (syms_of_eval): Do declare Vinternal_interpreter_environment as
      a global lisp var, but unintern it to hide it.
      (Fcommandp):
      * src/data.c (Finteractive_form): Understand `closure's.
      b38b1ec0
  4. 12 Feb, 2011 1 commit
    • Stefan Monnier's avatar
      * lisp/emacs-lisp/byte-lexbind.el: Delete. · ce5b520a
      Stefan Monnier authored
      * lisp/emacs-lisp/bytecomp.el (byte-compile-current-heap-environment)
      (byte-compile-current-num-closures): Remove vars.
      (byte-vec-ref, byte-vec-set): Remove byte codes.
      (byte-compile-arglist-vars, byte-compile-make-lambda-lexenv): Move from
      byte-lexbind.el.
      (byte-compile-lambda): Never build a closure.
      (byte-compile-closure-code-p, byte-compile-make-closure): Remove.
      (byte-compile-closure): Simplify.
      (byte-compile-top-level): Don't mess with heap environments.
      (byte-compile-dynamic-variable-bind): Always maintain
      byte-compile-bound-variables.
      (byte-compile-variable-ref, byte-compile-variable-set): Always just use
      the stack for lexical vars.
      (byte-compile-push-binding-init): Simplify.
      (byte-compile-not-lexical-var-p): New function, moved from cconv.el.
      (byte-compile-bind, byte-compile-unbind): New functions, moved and
      simplified from byte-lexbind.el.
      (byte-compile-let, byte-compile-let*): Simplify.
      (byte-compile-condition-case): Don't add :fun-body to the bound vars.
      (byte-compile-defmacro): Simplify.
      * lisp/emacs-lisp/byte-opt.el (byte-compile-side-effect-free-ops)
      (byte-optimize-lapcode): Remove byte-vec-ref and byte-vec-set.
      * lisp/emacs-lisp/cconv.el (cconv-not-lexical-var-p): Remove.
      (cconv-freevars, cconv-analyse-function, cconv-analyse-form):
      Use byte-compile-not-lexical-var-p instead.
      * src/bytecode.c (Bvec_ref, Bvec_set): Remove.
      (exec_byte_code): Don't handle them.
      * lisp/help-fns.el (describe-function-1): Fix paren typo.
      ce5b520a
  5. 10 Feb, 2011 1 commit
  6. 09 Feb, 2011 3 commits
  7. 08 Feb, 2011 2 commits
    • Tom Tromey's avatar
      Make globals.h a generated header · 00b3c7ac
      Tom Tromey authored
      	* configure: Rebuild.
      	* configure.in (NS_OBJC_OBJ): New subst.
      lib-src
      	* make-docfile.c: Unconditionally include stdlib.h.
      	(generate_globals): New global.
      	(xrealloc): New function.
      	(main): Handle '-g'.  Call start_globals, write_globals.
      	(scan_file): Conditionally call put_filename.
      	(start_globals): New function.
      	(struct global): New.
      	(num_globals, globals): New globals.
      	(add_global, compare_globals, write_globals): New functions.
      	(scan_c_file): Update for "-g".
      	(scan_lisp_file): Fail if "-g".
      	(enum global_type): New.
      src
      	* Makefile.in (NS_OBJC_OBJ): New variable.
      	(base_obj): Rename from 'obj'.
      	(obj): New variable.
      	(globals.h, gl-stamp, $(obj)): New targets.
      	(GLOBAL_SOURCES): New variable.
      	* globals.h: Remove.
      	* nsselect.m (Vselection_alist): Define.  Reverts part of
      	2011-01-19T22:11:33Z!jan.h.d@swipnet.se.
      	* buffer.c: Don't use "no_cell" for name of kill-buffer-hook's
      	variable.
      	* xselect.c (Vselection_alist): Define.  Reverts part of 2011-01-19T23:32:42Z!eggert@cs.ucla.edu.
      00b3c7ac
    • Kenichi Handa's avatar
      8f3b2e12
  8. 07 Feb, 2011 17 commits
  9. 06 Feb, 2011 11 commits
  10. 05 Feb, 2011 2 commits