diff options
| author | Gerd Moellmann | 2001-10-05 09:43:06 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2001-10-05 09:43:06 +0000 |
| commit | 5133a57883deda14a69e82eb425e02784eea6486 (patch) | |
| tree | 07035fb07a2161f8c044b66b59e16ac88a2ac258 | |
| parent | 9e713715867e30e0689601ae1d10f0896eebbebd (diff) | |
| download | emacs-5133a57883deda14a69e82eb425e02784eea6486.tar.gz emacs-5133a57883deda14a69e82eb425e02784eea6486.zip | |
(Fbyte_code) <varref>: Use SYMBOL_VALUE.
(Fbyte_code) <varset>: Simplify the test if symbol's value can be
set directly.
| -rw-r--r-- | src/bytecode.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/src/bytecode.c b/src/bytecode.c index b142e3e667e..48739234a6d 100644 --- a/src/bytecode.c +++ b/src/bytecode.c | |||
| @@ -520,7 +520,7 @@ If the third argument is incorrect, Emacs may crash.") | |||
| 520 | v1 = vectorp[op]; | 520 | v1 = vectorp[op]; |
| 521 | if (SYMBOLP (v1)) | 521 | if (SYMBOLP (v1)) |
| 522 | { | 522 | { |
| 523 | v2 = XSYMBOL (v1)->value; | 523 | v2 = SYMBOL_VALUE (v1); |
| 524 | if (MISCP (v2) || EQ (v2, Qunbound)) | 524 | if (MISCP (v2) || EQ (v2, Qunbound)) |
| 525 | { | 525 | { |
| 526 | BEFORE_POTENTIAL_GC (); | 526 | BEFORE_POTENTIAL_GC (); |
| @@ -626,16 +626,9 @@ If the third argument is incorrect, Emacs may crash.") | |||
| 626 | /* Inline the most common case. */ | 626 | /* Inline the most common case. */ |
| 627 | if (SYMBOLP (sym) | 627 | if (SYMBOLP (sym) |
| 628 | && !EQ (val, Qunbound) | 628 | && !EQ (val, Qunbound) |
| 629 | && !MISCP (XSYMBOL (sym)->value) | 629 | && !XSYMBOL (sym)->indirect_variable |
| 630 | /* I think this should either be checked in the byte | 630 | && !XSYMBOL (sym)->constant |
| 631 | compiler, or there should be a flag indicating that | 631 | && !MISCP (XSYMBOL (sym)->value)) |
| 632 | a symbol might be constant in Lisp_Symbol, instead | ||
| 633 | of checking this here over and over again. --gerd. */ | ||
| 634 | && !EQ (sym, Qnil) | ||
| 635 | && !EQ (sym, Qt) | ||
| 636 | && !(XSYMBOL (sym)->name->data[0] == ':' | ||
| 637 | && EQ (XSYMBOL (sym)->obarray, initial_obarray) | ||
| 638 | && !EQ (val, sym))) | ||
| 639 | XSYMBOL (sym)->value = val; | 632 | XSYMBOL (sym)->value = val; |
| 640 | else | 633 | else |
| 641 | { | 634 | { |