diff options
| author | Stefan Monnier | 2013-10-03 00:58:56 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2013-10-03 00:58:56 -0400 |
| commit | adf2aa61404305e58e71cde0193bb650aff2c4b3 (patch) | |
| tree | d6e6b4e5ab3b144a94daed2232cab798aadeb20a /src/ChangeLog | |
| parent | 328a8179fec33f5a75e2cfe22e43f4ec0df770b7 (diff) | |
| download | emacs-adf2aa61404305e58e71cde0193bb650aff2c4b3.tar.gz emacs-adf2aa61404305e58e71cde0193bb650aff2c4b3.zip | |
Introduce new bytecodes for efficient catch/condition-case in lexbind.
* lisp/emacs-lisp/byte-opt.el (byte-optimize-form-code-walker):
Optimize under `condition-case' and `catch' if
byte-compile--use-old-handlers is nil.
(disassemble-offset): Handle new bytecodes.
* lisp/emacs-lisp/bytecomp.el (byte-pushcatch, byte-pushconditioncase)
(byte-pophandler): New byte codes.
(byte-goto-ops): Adjust accordingly.
(byte-compile--use-old-handlers): New var.
(byte-compile-catch): Use new byte codes depending on
byte-compile--use-old-handlers.
(byte-compile-condition-case--old): Rename from
byte-compile-condition-case.
(byte-compile-condition-case--new): New function.
(byte-compile-condition-case): New function that dispatches depending
on byte-compile--use-old-handlers.
(byte-compile-unwind-protect): Pass a function to byte-unwind-protect
when we can.
* lisp/emacs-lisp/cconv.el (cconv-convert, cconv-analyse-form): Adjust for
the new compilation scheme using the new byte-codes.
* src/alloc.c (Fgarbage_collect): Merge scans of handlerlist and catchlist,
and make them unconditional now that they're heap-allocated.
* src/bytecode.c (BYTE_CODES): Add Bpushcatch, Bpushconditioncase
and Bpophandler.
(bcall0): New function.
(exec_byte_code): Add corresponding cases. Improve error message when
encountering an invalid byte-code. Let Bunwind_protect accept
a function (rather than a list of expressions) as argument.
* src/eval.c (catchlist): Remove (merge with handlerlist).
(handlerlist, lisp_eval_depth): Not static any more.
(internal_catch, internal_condition_case, internal_condition_case_1)
(internal_condition_case_2, internal_condition_case_n):
Use PUSH_HANDLER.
(unwind_to_catch, Fthrow, Fsignal): Adjust to merged
handlerlist/catchlist.
(internal_lisp_condition_case): Use PUSH_HANDLER. Adjust to new
handlerlist which can only handle a single condition-case handler at
a time.
(find_handler_clause): Simplify since we only a single branch here
any more.
* src/lisp.h (struct handler): Merge struct handler and struct catchtag.
(PUSH_HANDLER): New macro.
(catchlist): Remove.
(handlerlist): Always declare.
Diffstat (limited to 'src/ChangeLog')
| -rw-r--r-- | src/ChangeLog | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index c201df19851..4b1bfc75187 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,35 @@ | |||
| 1 | 2013-10-03 Stefan Monnier <monnier@iro.umontreal.ca> | 1 | 2013-10-03 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 2 | ||
| 3 | * lisp.h (struct handler): Merge struct handler and struct catchtag. | ||
| 4 | (PUSH_HANDLER): New macro. | ||
| 5 | (catchlist): Remove. | ||
| 6 | (handlerlist): Always declare. | ||
| 7 | |||
| 8 | * eval.c (catchlist): Remove (merge with handlerlist). | ||
| 9 | (handlerlist, lisp_eval_depth): Not static any more. | ||
| 10 | (internal_catch, internal_condition_case, internal_condition_case_1) | ||
| 11 | (internal_condition_case_2, internal_condition_case_n): | ||
| 12 | Use PUSH_HANDLER. | ||
| 13 | (unwind_to_catch, Fthrow, Fsignal): Adjust to merged | ||
| 14 | handlerlist/catchlist. | ||
| 15 | (internal_lisp_condition_case): Use PUSH_HANDLER. Adjust to new | ||
| 16 | handlerlist which can only handle a single condition-case handler at | ||
| 17 | a time. | ||
| 18 | (find_handler_clause): Simplify since we only a single branch here | ||
| 19 | any more. | ||
| 20 | |||
| 21 | * bytecode.c (BYTE_CODES): Add Bpushcatch, Bpushconditioncase | ||
| 22 | and Bpophandler. | ||
| 23 | (bcall0): New function. | ||
| 24 | (exec_byte_code): Add corresponding cases. Improve error message when | ||
| 25 | encountering an invalid byte-code. Let Bunwind_protect accept | ||
| 26 | a function (rather than a list of expressions) as argument. | ||
| 27 | |||
| 28 | * alloc.c (Fgarbage_collect): Merge scans of handlerlist and catchlist, | ||
| 29 | and make them unconditional now that they're heap-allocated. | ||
| 30 | |||
| 31 | 2013-10-03 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 32 | |||
| 3 | * charset.c (Fdecode_char, Fencode_char): Remove description of | 33 | * charset.c (Fdecode_char, Fencode_char): Remove description of |
| 4 | `restriction' arg. now that it's hidden by advertised-calling-convention. | 34 | `restriction' arg. now that it's hidden by advertised-calling-convention. |
| 5 | 35 | ||