aboutsummaryrefslogtreecommitdiffstats
path: root/src/bytecode.c
diff options
context:
space:
mode:
authorVibhav Pant2017-01-18 22:40:50 +0530
committerVibhav Pant2017-01-18 22:40:50 +0530
commit086c4eaf9d4ecc5074088115fa01c0b2fb061246 (patch)
treef1adc695edfd5d790611e1b5db882e65f79d217e /src/bytecode.c
parent37956463d67795819fe7d8fe02d6249388364783 (diff)
downloademacs-086c4eaf9d4ecc5074088115fa01c0b2fb061246.tar.gz
emacs-086c4eaf9d4ecc5074088115fa01c0b2fb061246.zip
* src/bytecode.c: (exec_byte_code) Use hash_lookup for Bswitch
Fgethash type checks the provided table object, which is unnecessary for compiled bytecode.
Diffstat (limited to 'src/bytecode.c')
-rw-r--r--src/bytecode.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/bytecode.c b/src/bytecode.c
index 1695af9cb02..fc434a2812f 100644
--- a/src/bytecode.c
+++ b/src/bytecode.c
@@ -1417,8 +1417,10 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth,
1417 { 1417 {
1418 Lisp_Object jmp_table = POP; 1418 Lisp_Object jmp_table = POP;
1419 Lisp_Object v1 = POP; 1419 Lisp_Object v1 = POP;
1420 Lisp_Object dest = Fgethash(v1, jmp_table, Qnil); 1420 struct Lisp_Hash_Table *h = XHASH_TABLE(jmp_table);
1421 if (!NILP(dest)) { 1421 ptrdiff_t i = hash_lookup(h, v1, NULL);
1422 if (i >= 0) {
1423 Lisp_Object dest = HASH_VALUE(h, i);
1422 int car = XINT(XCAR(dest)); 1424 int car = XINT(XCAR(dest));
1423 int cdr = XINT(XCDR(dest)); 1425 int cdr = XINT(XCDR(dest));
1424 op = car + (cdr << 8); /* Simulate FETCH2 */ 1426 op = car + (cdr << 8); /* Simulate FETCH2 */