: <i>bad stack depth computations: is 0, should be 1</i> plus 3 other changes
by
.
D 2018-12-04T12:09:23.852
J icomment <blockquote><i>>\sWe\shave\sto\suse\s"1"\sinstead\sof\s"0"\sas\sBytes\sfiled..\sWHY\s?</i></blockquote>\r\n\r\nBecause\sthe\sbyte\sof\sthe\sinstruction-command\sself\sis\scounted\salso,\snumBytes\sequals\sall\sbytes\sreserved\sfor\sa\scommand\sin\sbyte-code\s(including\scommand\sinstruction\sand\soperand\sbytes\salso).\r\nThus\sall\ssingle-byte\sinstructions\shave\snumBytes\s=\s1.\r\n\r\n<blockquote><i>>\sIs\sthere\sany\sdocument\sfor\s"tclInstructionTable"?\sif\syes\splease\sshare</i></blockquote>\r\n\r\nFor\sexample\stake\sa\slook\sin\s[./artifact?name=419ef3627fd0fd88&ln=830-835|tclCompile.h]\sand\s[./artifact?name=419ef3627fd0fd88&ln=863-874|declaration\sof\sInstructionDesc\stype].\r\n\r\nAlso\snote\sthat\s8.6\shas\sadditional\shandling\sround\sabout\sbyte-code/instructions\scompilation\sprocess:\sbyte-code\sand\scompaction\soptimizations\s(see\stclOptimize.c/tclCompile.c),\scommand\ssearch\s(emit\sof\sinstruction\srelative\sINST_START_CMD),\scapturing\sthe\sinner\scontext\s(e.\sg.\scall\sstack\sin\serror\scase)\sas\swell\sas\sdisassembling\sof\sthe\sbyte-code,\setc.\r\n\r\nBecause\sbyte-code\scompilation\sis\smerely\san\sinternal\sAPI,\sthe\ssource\scode\swill\sbe\syour\sbest\sfriend\sthere.\r\n\r\nAlso\snote\sthat\ssome\sinstructions\smay\sbe\sa\sbit\sincompatible\sbetween\s8.4\sand\s8.6.\sTo\shave\ssome\sobsolete\sinstructions\s(like\sINST_CALL_BUILTIN_FUNC1,\sINST_CALL_FUNC1)\syou\smust\salso\scompile\sTcl\susing\sdirective\sTCL_SUPPORT_84_BYTECODE=1.
J login sebres
J mimetype text/x-fossil-wiki
J status Pending
K b8da19fd1658fed8e370a4f9b458e2c189022135
U sebres
Z 1ddef4fff022e40b5ef41669665dff06