Mercurial > emacs
comparison src/data.c @ 71871:dcd566ed4e9b
(Findirect_function): Optimize for no indirection.
author | Kim F. Storm <storm@cua.dk> |
---|---|
date | Thu, 13 Jul 2006 13:43:44 +0000 |
parents | d1cea7530d3d |
children | 7febc7ff0f0d b19aaf4ab0ee |
comparison
equal
deleted
inserted
replaced
71870:a0954041b695 | 71871:dcd566ed4e9b |
---|---|
1911 register Lisp_Object object; | 1911 register Lisp_Object object; |
1912 Lisp_Object noerror; | 1912 Lisp_Object noerror; |
1913 { | 1913 { |
1914 Lisp_Object result; | 1914 Lisp_Object result; |
1915 | 1915 |
1916 result = indirect_function (object); | 1916 /* Optimize for no indirection. */ |
1917 | 1917 result = object; |
1918 if (EQ (result, Qunbound)) | 1918 if (SYMBOLP (result) && !EQ (result, Qunbound) |
1919 return (NILP (noerror) | 1919 && (result = XSYMBOL (result)->function, SYMBOLP (result))) |
1920 ? Fsignal (Qvoid_function, Fcons (object, Qnil)) | 1920 result = indirect_function (result); |
1921 : Qnil); | 1921 if (!EQ (result, Qunbound)) |
1922 return result; | 1922 return result; |
1923 | |
1924 if (NILP (noerror)) | |
1925 Fsignal (Qvoid_function, Fcons (object, Qnil)); | |
1926 | |
1927 return Qnil; | |
1923 } | 1928 } |
1924 | 1929 |
1925 /* Extract and set vector and string elements */ | 1930 /* Extract and set vector and string elements */ |
1926 | 1931 |
1927 DEFUN ("aref", Faref, Saref, 2, 2, 0, | 1932 DEFUN ("aref", Faref, Saref, 2, 2, 0, |