diff options
| author | Gerd Moellmann | 2001-10-06 23:36:22 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2001-10-06 23:36:22 +0000 |
| commit | 2e3bf02a1fddc09f183b5cacd76b104f620279bd (patch) | |
| tree | d4f53aa07bc67569e199b3d2f14a7df058359678 | |
| parent | 78e985eb6bd7927b5b77d078bf6a4e713685bd80 (diff) | |
| download | emacs-2e3bf02a1fddc09f183b5cacd76b104f620279bd.tar.gz emacs-2e3bf02a1fddc09f183b5cacd76b104f620279bd.zip | |
(syms_of_bytecode) [BYTE_CODE_METER]: Doc fix.
(METER_CODE): Use MOST_POSITIVE_FIXNUM.
| -rw-r--r-- | src/bytecode.c | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/src/bytecode.c b/src/bytecode.c index 48739234a6d..2c4e1cca48d 100644 --- a/src/bytecode.c +++ b/src/bytecode.c | |||
| @@ -66,16 +66,16 @@ int byte_metering_on; | |||
| 66 | 66 | ||
| 67 | #define METER_1(code) METER_2 (0, (code)) | 67 | #define METER_1(code) METER_2 (0, (code)) |
| 68 | 68 | ||
| 69 | #define METER_CODE(last_code, this_code) \ | 69 | #define METER_CODE(last_code, this_code) \ |
| 70 | { \ | 70 | { \ |
| 71 | if (byte_metering_on) \ | 71 | if (byte_metering_on) \ |
| 72 | { \ | 72 | { \ |
| 73 | if (METER_1 (this_code) != ((1<<VALBITS)-1)) \ | 73 | if (METER_1 (this_code) < MOST_POSITIVE_FIXNUM) \ |
| 74 | METER_1 (this_code)++; \ | 74 | METER_1 (this_code)++; \ |
| 75 | if (last_code \ | 75 | if (last_code \ |
| 76 | && METER_2 (last_code, this_code) != ((1<<VALBITS)-1))\ | 76 | && METER_2 (last_code, this_code) < MOST_POSITIVE_FIXNUM) \ |
| 77 | METER_2 (last_code, this_code)++; \ | 77 | METER_2 (last_code, this_code)++; \ |
| 78 | } \ | 78 | } \ |
| 79 | } | 79 | } |
| 80 | 80 | ||
| 81 | #else /* no BYTE_CODE_METER */ | 81 | #else /* no BYTE_CODE_METER */ |
| @@ -1747,11 +1747,12 @@ syms_of_bytecode () | |||
| 1747 | 1747 | ||
| 1748 | DEFVAR_LISP ("byte-code-meter", &Vbyte_code_meter, | 1748 | DEFVAR_LISP ("byte-code-meter", &Vbyte_code_meter, |
| 1749 | "A vector of vectors which holds a histogram of byte-code usage.\n\ | 1749 | "A vector of vectors which holds a histogram of byte-code usage.\n\ |
| 1750 | (aref (aref byte-code-meter 0) CODE) indicates how many times the byte\n\ | 1750 | \(aref (aref byte-code-meter 0) CODE) indicates how many times the byte\n\ |
| 1751 | opcode CODE has been executed.\n\ | 1751 | opcode CODE has been executed.\n\ |
| 1752 | (aref (aref byte-code-meter CODE1) CODE2), where CODE1 is not 0,\n\ | 1752 | \(aref (aref byte-code-meter CODE1) CODE2), where CODE1 is not 0,\n\ |
| 1753 | indicates how many times the byte opcodes CODE1 and CODE2 have been\n\ | 1753 | indicates how many times the byte opcodes CODE1 and CODE2 have been\n\ |
| 1754 | executed in succession."); | 1754 | executed in succession."); |
| 1755 | |||
| 1755 | DEFVAR_BOOL ("byte-metering-on", &byte_metering_on, | 1756 | DEFVAR_BOOL ("byte-metering-on", &byte_metering_on, |
| 1756 | "If non-nil, keep profiling information on byte code usage.\n\ | 1757 | "If non-nil, keep profiling information on byte code usage.\n\ |
| 1757 | The variable byte-code-meter indicates how often each byte opcode is used.\n\ | 1758 | The variable byte-code-meter indicates how often each byte opcode is used.\n\ |