Commit defd4196 authored by Paul Eggert's avatar Paul Eggert

Port byte-code-meter to modern targets.

* bytecode.c (METER_CODE) [BYTE_CODE_METER]: Don't assume
!CHECK_LISP_OBJECT_TYPE && !USE_LSB_TAG.  Problem with
CHECK_LISP_OBJECT_TYPE reported by Dmitry Andropov in
<http://lists.gnu.org/archive/html/emacs-devel/2012-06/msg00282.html>.
(METER_1, METER_2): Simplify.
parent 25f09295
2012-06-18 Paul Eggert <eggert@cs.ucla.edu>
Port byte-code-meter to modern targets.
* bytecode.c (METER_CODE) [BYTE_CODE_METER]: Don't assume
!CHECK_LISP_OBJECT_TYPE && !USE_LSB_TAG. Problem with
CHECK_LISP_OBJECT_TYPE reported by Dmitry Andropov in
<http://lists.gnu.org/archive/html/emacs-devel/2012-06/msg00282.html>.
(METER_1, METER_2): Simplify.
2012-06-18 Stefan Monnier <monnier@iro.umontreal.ca>
* data.c (Fdefalias): Return `symbol' (bug#11686).
......
......@@ -58,21 +58,21 @@ by Hallvard:
#ifdef BYTE_CODE_METER
Lisp_Object Qbyte_code_meter;
#define METER_2(code1, code2) \
XFASTINT (XVECTOR (XVECTOR (Vbyte_code_meter)->contents[(code1)]) \
->contents[(code2)])
#define METER_1(code) METER_2 (0, (code))
#define METER_2(code1, code2) AREF (AREF (Vbyte_code_meter, code1), code2)
#define METER_1(code) METER_2 (0, code)
#define METER_CODE(last_code, this_code) \
{ \
if (byte_metering_on) \
{ \
if (METER_1 (this_code) < MOST_POSITIVE_FIXNUM) \
METER_1 (this_code)++; \
if (XFASTINT (METER_1 (this_code)) < MOST_POSITIVE_FIXNUM) \
XSETFASTINT (METER_1 (this_code), \
XFASTINT (METER_1 (this_code)) + 1); \
if (last_code \
&& METER_2 (last_code, this_code) < MOST_POSITIVE_FIXNUM) \
METER_2 (last_code, this_code)++; \
&& (XFASTINT (METER_2 (last_code, this_code)) \
< MOST_POSITIVE_FIXNUM)) \
XSETFASTINT (METER_2 (last_code, this_code), \
XFASTINT (METER_2 (last_code, this_code)) + 1); \
} \
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment