Mercurial > hg > xemacs-beta
view etc/XKeysymDB @ 4921:17362f371cc2
add more byte-code assertions and better failure output
-------------------- ChangeLog entries follow: --------------------
src/ChangeLog addition:
2010-02-03 Ben Wing <ben@xemacs.org>
* alloc.c (Fmake_byte_code):
* bytecode.h:
* lisp.h:
* lread.c:
* lread.c (readevalloop):
* lread.c (Fread):
* lread.c (Fread_from_string):
* lread.c (read_list_conser):
* lread.c (read_list):
* lread.c (vars_of_lread):
* symbols.c:
* symbols.c (Fdefine_function):
Turn on the "compiled-function annotation hack". Implement it
properly by hooking into Fdefalias(). Note in the docstring to
`defalias' that we do this. Remove some old broken code and
change code that implemented the old kludgy way of hooking into
the Lisp reader into bracketed by `#ifdef
COMPILED_FUNCTION_ANNOTATION_HACK_OLD_WAY', which is not enabled.
Also enable byte-code metering when DEBUG_XEMACS -- this is a form
of profiling for computing histograms of which sequences of two
bytecodes are used most often.
* bytecode-ops.h:
* bytecode-ops.h (OPCODE):
New file. Extract out all the opcodes and declare them using
OPCODE(), a bit like frame slots and such. This way the file can
be included multiple times if necessary to iterate multiple times
over the byte opcodes.
* bytecode.c:
* bytecode.c (NUM_REMEMBERED_BYTE_OPS):
* bytecode.c (OPCODE):
* bytecode.c (assert_failed_with_remembered_ops):
* bytecode.c (READ_UINT_2):
* bytecode.c (READ_INT_1):
* bytecode.c (READ_INT_2):
* bytecode.c (PEEK_INT_1):
* bytecode.c (PEEK_INT_2):
* bytecode.c (JUMP_RELATIVE):
* bytecode.c (JUMP_NEXT):
* bytecode.c (PUSH):
* bytecode.c (POP_WITH_MULTIPLE_VALUES):
* bytecode.c (DISCARD):
* bytecode.c (UNUSED):
* bytecode.c (optimize_byte_code):
* bytecode.c (optimize_compiled_function):
* bytecode.c (Fbyte_code):
* bytecode.c (vars_of_bytecode):
* bytecode.c (init_opcode_table_multi_op):
* bytecode.c (reinit_vars_of_bytecode):
* emacs.c (main_1):
* eval.c (funcall_compiled_function):
* symsinit.h:
Any time we change either the instruction pointer or the stack
pointer, assert that we're going to move it to a valid location.
This should catch failures right when they occur rather than
sometime later. This requires that we pass in another couple of
parameters into some functions (only with error-checking enabled,
see below).
Also keep track, using a circular queue, of the last 100 byte
opcodes seen, and when we hit an assert failure during byte-code
execution, output the contents of the queue in a nice readable
fashion. This requires that bytecode-ops.h be included a second
time so that a table mapping opcodes to the name of their operation
can be constructed. This table is constructed in new function
reinit_vars_of_bytecode().
Everything in the last two paras happens only when
ERROR_CHECK_BYTE_CODE.
Add some longish comments describing how the arrays that hold the
stack and instructions, and the pointers used to access them, work.
* gc.c:
Import some code from my `latest-fix' workspace to mark the
staticpro's in order from lowest to highest, rather than highest to
lowest, so it's easier to debug when something goes wrong.
* lisp.h (abort_with_message): Renamed from abort_with_msg().
* symbols.c (defsymbol_massage_name_1):
* symbols.c (defsymbol_nodump):
* symbols.c (defsymbol):
* symbols.c (defkeyword):
* symeval.h (DEFVAR_SYMVAL_FWD_OBJECT):
Make the various calls to staticpro() instead call staticpro_1(),
passing in the name of the C var being staticpro'ed, so that it
shows up in staticpro_names. Otherwise staticpro_names just has
1000+ copies of the word `location'.
author | Ben Wing <ben@xemacs.org> |
---|---|
date | Wed, 03 Feb 2010 08:01:55 -0600 |
parents | 376386a54a3c |
children |
line wrap: on
line source
! $XConsortium: XKeysymDB,v 1.13 94/04/13 18:07:58 gildea Exp $ ! Copyright 1993 Massachusetts Institute of Technology ! ! Permission to use, copy, modify, distribute, and sell this software and ! its documentation for any purpose is hereby granted without fee, provided ! that the above copyright notice appear in all copies and that both that ! copyright notice and this permission notice appear in supporting ! documentation, and that the name of M.I.T. not be used in advertising or ! publicity pertaining to distribution of the software without specific, ! written prior permission. M.I.T. makes no representations about the ! suitability of this software for any purpose. It is provided "as is" ! without express or implied warranty. hpmute_acute :100000A8 hpmute_grave :100000A9 hpmute_asciicircum :100000AA hpmute_diaeresis :100000AB hpmute_asciitilde :100000AC hplira :100000AF hpguilder :100000BE hpYdiaeresis :100000EE hpIO :100000EE hplongminus :100000F6 hpblock :100000FC apLineDel :1000FF00 apCharDel :1000FF01 apCopy :1000FF02 apCut :1000FF03 apPaste :1000FF04 apMove :1000FF05 apGrow :1000FF06 apCmd :1000FF07 apShell :1000FF08 apLeftBar :1000FF09 apRightBar :1000FF0A apLeftBox :1000FF0B apRightBox :1000FF0C apUpBox :1000FF0D apDownBox :1000FF0E apPop :1000FF0F apRead :1000FF10 apEdit :1000FF11 apSave :1000FF12 apExit :1000FF13 apRepeat :1000FF14 hpModelock1 :1000FF48 hpModelock2 :1000FF49 hpReset :1000FF6C hpSystem :1000FF6D hpUser :1000FF6E hpClearLine :1000FF6F hpInsertLine :1000FF70 hpDeleteLine :1000FF71 hpInsertChar :1000FF72 hpDeleteChar :1000FF73 hpBackTab :1000FF74 hpKP_BackTab :1000FF75 apKP_parenleft :1000FFA8 apKP_parenright :1000FFA9 I2ND_FUNC_L :10004001 I2ND_FUNC_R :10004002 IREMOVE :10004003 IREPEAT :10004004 IA1 :10004101 IA2 :10004102 IA3 :10004103 IA4 :10004104 IA5 :10004105 IA6 :10004106 IA7 :10004107 IA8 :10004108 IA9 :10004109 IA10 :1000410A IA11 :1000410B IA12 :1000410C IA13 :1000410D IA14 :1000410E IA15 :1000410F IB1 :10004201 IB2 :10004202 IB3 :10004203 IB4 :10004204 IB5 :10004205 IB6 :10004206 IB7 :10004207 IB8 :10004208 IB9 :10004209 IB10 :1000420A IB11 :1000420B IB12 :1000420C IB13 :1000420D IB14 :1000420E IB15 :1000420F IB16 :10004210 DRemove :1000FF00 Dring_accent :1000FEB0 Dcircumflex_accent :1000FE5E Dcedilla_accent :1000FE2C Dacute_accent :1000FE27 Dgrave_accent :1000FE60 Dtilde :1000FE7E Ddiaeresis :1000FE22 osfCopy :1004FF02 osfCut :1004FF03 osfPaste :1004FF04 osfBackTab :1004FF07 osfBackSpace :1004FF08 osfClear :1004FF0B osfEscape :1004FF1B osfAddMode :1004FF31 osfPrimaryPaste :1004FF32 osfQuickPaste :1004FF33 osfPageLeft :1004FF40 osfPageUp :1004FF41 osfPageDown :1004FF42 osfPageRight :1004FF43 osfActivate :1004FF44 osfMenuBar :1004FF45 osfLeft :1004FF51 osfUp :1004FF52 osfRight :1004FF53 osfDown :1004FF54 osfPrior :1004FF55 osfNext :1004FF56 osfEndLine :1004FF57 osfBeginLine :1004FF58 osfEndData :1004FF59 osfBeginData :1004FF5A osfPrevMenu :1004FF5B osfNextMenu :1004FF5C osfPrevField :1004FF5D osfNextField :1004FF5E osfSelect :1004FF60 osfInsert :1004FF63 osfUndo :1004FF65 osfMenu :1004FF67 osfCancel :1004FF69 osfHelp :1004FF6A osfSelectAll :1004FF71 osfDeselectAll :1004FF72 osfReselect :1004FF73 osfExtend :1004FF74 osfRestore :1004FF78 osfSwitchDirection :1004FF7E osfPriorMinor :1004FFF5 osfNextMinor :1004FFF6 osfRightLine :1004FFF7 osfLeftLine :1004FFF8 osfDelete :1004FFFF SunFA_Grave :1005FF00 SunFA_Circum :1005FF01 SunFA_Tilde :1005FF02 SunFA_Acute :1005FF03 SunFA_Diaeresis :1005FF04 SunFA_Cedilla :1005FF05 SunF36 :1005FF10 SunF37 :1005FF11 SunSys_Req :1005FF60 SunProps :1005FF70 SunFront :1005FF71 SunCopy :1005FF72 SunOpen :1005FF73 SunPaste :1005FF74 SunCut :1005FF75 SunPowerSwitch :1005FF76 SunAudioLowerVolume :1005FF77 SunAudioMute :1005FF78 SunAudioRaiseVolume :1005FF79 SunVideoDegauss :1005FF7A SunVideoLowerBrightness :1005FF7B SunVideoRaiseBrightness :1005FF7C SunPowerSwitchShift :1005FF7D SunCompose :FF20 SunPageUp :FF55 SunPageDown :FF56 SunPrint_Screen :FF61 SunUndo :FF65 SunAgain :FF66 SunFind :FF68 SunStop :FF69 SunAltGraph :FF7E WYSetup :1006FF00 ncdSetup :1006FF00 XeroxPointerButton1 :10070001 XeroxPointerButton2 :10070002 XeroxPointerButton3 :10070003 XeroxPointerButton4 :10070004 XeroxPointerButton5 :10070005 usldead_acute :100000A8 usldead_grave :100000A9 usldead_diaeresis :100000AB usldead_asciicircum :100000AA usldead_asciitilde :100000AC usldead_cedilla :1000FE2C usldead_ring :1000FEB0