Artifacts Associated With Ticket b8da19fd16
Ticket change [501095e3b0] (rid 167855) by anonymous29 on 2018-12-04 09:25:56:
- assignee initialized to: "nobody"
- closer initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
Hi, Getting error during TCL upgrade from 8.4 to 8.6 We had added few New mathematics operator in TCL8.4 and working fine. But now i am porting TCL to 8.6 and getting "bad stack depth computations: is 0, should be 1" error. If modify "tclInstructionTable" value field as mention below. it working fine. in TCL porting to 8.4 used {"error", 0, 0, 0, {OPERAND_NONE}}, in TCL porting to 8.6 {"error", 1, 0, 0, {OPERAND_NONE}}, We have to use "1" instead of "0" as Bytes filed.. WHY ? also what type of modification required for other filed value ? Is there any document for "tclInstructionTable"? if yes please share I am looking forward to hearing from you Thanks - foundin initialized to: "8.6.8"
- is_private initialized to: "0"
- login: "anonymous29"
- priority initialized to: "5 Medium"
- private_contact initialized to: "f31bbee5d57cdca64b0ff5fb39afeb99e5f9c194"
- resolution initialized to: "None"
- severity initialized to: "Minor"
- status initialized to: "Open"
- submitter initialized to: "anonymous29"
- subsystem initialized to: "47. Bytecode Compiler"
- title initialized to: "bad stack depth computations: is 0, should be 1"
- type initialized to: "Bug"
Ticket change [7c3d9482b0] (rid 167856) by sebres on 2018-12-04 12:09:23:
- icomment:
<blockquote><i>> We have to use "1" instead of "0" as Bytes filed.. WHY ?</i></blockquote> Because the byte of the instruction-command self is counted also, numBytes equals all bytes reserved for a command in byte-code (including command instruction and operand bytes also). Thus all single-byte instructions have numBytes = 1. <blockquote><i>> Is there any document for "tclInstructionTable"? if yes please share</i></blockquote> For example take a look in [./artifact?name=419ef3627fd0fd88&ln=830-835|tclCompile.h] and [./artifact?name=419ef3627fd0fd88&ln=863-874|declaration of InstructionDesc type]. Also note that 8.6 has additional handling round about byte-code/instructions compilation process: byte-code and compaction optimizations (see tclOptimize.c/tclCompile.c), command search (emit of instruction relative INST_START_CMD), capturing the inner context (e. g. call stack in error case) as well as disassembling of the byte-code, etc. Because byte-code compilation is merely an internal API, the source code will be your best friend there. Also note that some instructions may be a bit incompatible between 8.4 and 8.6. To have some obsolete instructions (like INST_CALL_BUILTIN_FUNC1, INST_CALL_FUNC1) you must also compile Tcl using directive TCL_SUPPORT_84_BYTECODE=1.
- login: "sebres"
- mimetype: "text/x-fossil-wiki"
- status changed to: "Pending"
- icomment:
Ticket change [30b6a3e67a] (rid 168167) by sebres on 2019-01-07 01:47:24:
- closedate changed to: "2458490.57459029"
- closer changed to: "sebres"
- icomment: "closed for no activity (as pure upgrade issue)."
- login: "sebres"
- mimetype: "text/plain"
- status changed to: "Closed"