aboutsummaryrefslogtreecommitdiffstats
path: root/src/bytecode.c
diff options
context:
space:
mode:
authorGerd Moellmann2000-02-20 15:55:38 +0000
committerGerd Moellmann2000-02-20 15:55:38 +0000
commit620cc5fa301677570852647c50f638b27ddc3c03 (patch)
treed5cda0c3b0a42c746da68e72469ad5b15d025787 /src/bytecode.c
parent9ab90667d31851abf6e5334d5c8fc866d62dde2f (diff)
downloademacs-620cc5fa301677570852647c50f638b27ddc3c03.tar.gz
emacs-620cc5fa301677570852647c50f638b27ddc3c03.zip
(Fbyte_code) <Bvarset>: Inline most common case.
Diffstat (limited to 'src/bytecode.c')
-rw-r--r--src/bytecode.c41
1 files changed, 34 insertions, 7 deletions
diff --git a/src/bytecode.c b/src/bytecode.c
index 14a93f18f81..06f644e1481 100644
--- a/src/bytecode.c
+++ b/src/bytecode.c
@@ -544,20 +544,47 @@ If the third argument is incorrect, Emacs may crash.")
544 break; 544 break;
545 } 545 }
546 546
547 case Bvarset+7: 547 case Bvarset:
548 op = FETCH2; 548 case Bvarset+1:
549 case Bvarset+2:
550 case Bvarset+3:
551 case Bvarset+4:
552 case Bvarset+5:
553 op -= Bvarset;
549 goto varset; 554 goto varset;
550 555
551 case Bvarset: case Bvarset+1: case Bvarset+2: case Bvarset+3: 556 case Bvarset+7:
552 case Bvarset+4: case Bvarset+5: 557 op = FETCH2;
553 op -= Bvarset;
554 goto varset; 558 goto varset;
555 559
556 case Bvarset+6: 560 case Bvarset+6:
557 op = FETCH; 561 op = FETCH;
558 varset: 562 varset:
559 set_internal (vectorp[op], POP, current_buffer, 0); 563 {
560 /* Fset (vectorp[op], POP); */ 564 Lisp_Object sym, val;
565 extern int keyword_symbols_constant_flag;
566
567 sym = vectorp[op];
568 val = POP;
569
570 /* Inline the most common case. */
571 if (SYMBOLP (sym)
572 && !EQ (val, Qunbound)
573 && !MISCP (XSYMBOL (sym)->value)
574 /* I think this should either be checked in the byte
575 compiler, or there should be a flag indicating that
576 a symbol might be constant in Lisp_Symbol, instead
577 of checking this here over and over again. --gerd. */
578 && !EQ (sym, Qnil)
579 && !EQ (sym, Qt)
580 && !(XSYMBOL (sym)->name->data[0] == ':'
581 && EQ (XSYMBOL (sym)->obarray, initial_obarray)
582 && keyword_symbols_constant_flag
583 && !EQ (val, sym)))
584 XSYMBOL (sym)->value = val;
585 else
586 set_internal (sym, val, current_buffer, 0);
587 }
561 break; 588 break;
562 589
563 case Bdup: 590 case Bdup: