Skip to content
Tcl Source Code Artifact [8bdba0dc55]
Login

Artifact [8bdba0dc55]

Artifact 8bdba0dc555d434a61040d8cfdf6fc7167cfe6c6b32cea397572620ce70a1b4b:

Ticket change [8bdba0dc55] - New ticket [8f741de59dbc79b0|8f741de59d] <i>switch compilation difference with end of opts marker</i>. by juliannoble2 on 2025-11-10 08:47:37.
D 2025-11-10T08:47:37.190
J assignee nobody
J closer nobody
J cmimetype text/x-fossil-plain
J comment The\sbelow\scomment\sblock\sin\stclCompCmdSz.c\ssuggests\sthe\sintention\sis\sfor\s\r\n\r\nswitch\s-exact\s\s\s\sword\s{pattern\sbody\s...}\r\nto\sbe\streated\sthe\ssame\sas\r\nswitch\s-exact\s--\sword\s{pattern\sbody\s...}\r\n\r\nas\sfar\sas\scompilation\sis\sconcerned.\r\nSimilarly\sfor\s-glob\sand\s-regexp\r\n\r\nHowever,\sthe\s--\sseems\sto\sbe\srequired\sfor\sthe\scompilation\sto\sproceed\r\nas\safter\sthe\soption\sprocessing\sloop\swe\shave:\r\n\s\s\s\sif\s(numWords\s<\s3)\s{\r\n\treturn\sTCL_ERROR;\r\n\s\s\s\s}\r\n\r\n\r\n#comments\sfrom\stclCompCmdsSZ.c\sTclCompileSwitchCmd\r\n\r\n#\s\s\s\s/*\r\n#\s\s\s\s\s*\sOnly\shandle\sthe\sfollowing\sversions:\r\n#\s\s\s\s\s*\s\s\sswitch\s\s\s\s\s\s\s\s\s?--?\sword\s{pattern\sbody\s...}\r\n#\s\s\s\s\s*\s\s\sswitch\s-exact\s\s?--?\sword\s{pattern\sbody\s...}\r\n#\s\s\s\s\s*\s\s\sswitch\s-glob\s\s\s?--?\sword\s{pattern\sbody\s...}\r\n#\s\s\s\s\s*\s\s\sswitch\s-regexp\s?--?\sword\s{pattern\sbody\s...}\r\n#\s\s\s\s\s*\s\s\sswitch\s\s\s\s\s\s\s\s\s--\s\s\sword\ssimpleWordPattern\ssimpleWordBody\s...\r\n#\s\s\s\s\s*\s\s\sswitch\s-exact\s\s--\s\s\sword\ssimpleWordPattern\ssimpleWordBody\s...\r\n#\s\s\s\s\s*\s\s\sswitch\s-glob\s\s\s--\s\s\sword\ssimpleWordPattern\ssimpleWordBody\s...\r\n#\s\s\s\s\s*\s\s\sswitch\s-regexp\s--\s\s\sword\ssimpleWordPattern\ssimpleWordBody\s...\r\n#\s\s\s\s\s*\sWhen\sthe\smode\sis\s-glob,\scan\salso\shandle\sa\s-nocase\sflag.\r\n#\s\s\s\s\s*\r\n#\s\s\s\s\s*\sFirst\soff,\swe\sdon't\scare\show\sthe\scommand's\sword\swas\sgenerated;\swe're\r\n#\s\s\s\s\s*\scompiling\sit\sanyway!\sSo\sskip\sit...\r\n#\s\s\s\s\s*/\r\n\r\n\r\nIt\sis\sverifiable\swith\stcl::unsupported::disassemble\sthat\s(for\sthe\scombined\spattern\sbody\sversions)\r\nswitch\s-exact\s\s\s\s\sword\s{pattern\sbody\s...}\r\ncompiles\sdifferently\sto\r\nswitch\s-exact\s--\s\sword\s{pattern\sbody\s...}\r\n(as\swith\s-glob\sand\s-exact)\r\n\r\nIs\sthis\sintentional?\s\s\sIt\sseems\sat\sodds\swith\sthe\scomment\sblock\sand\salso\sthe\sswitch\sman\spage\sstates\sfor\sthe\send\sof\soptions\smarker:\r\n"This\sis\snot\srequired\swhen\sthe\smatching\spatterns\sand\sbodies\sare\sgrouped\stogether\sin\sa\ssingle\sargument."\r\n\r\nWell\sit's\snot\s*required*\sas\ssuch\s-\sbut\sit\sseems\sto\sme\sit\sis\srequired\sif\syou\swant\sthe\sbest\sperformance\sfrom\sa\sswitch\sstatement.
J is_private 0
J login juliannoble2
J priority 5\sMedium
J private_contact 957fdfcd8744611e3fe1f4896c7538b1d9bf47b2
J resolution None
J severity Minor
J status Open
J submitter juliannoble2
J subsystem 18.\sCommands\sM-Z
J title switch\scompilation\sdifference\swith\send\sof\sopts\smarker
J type Bug
K 8f741de59dbc79b0d6e1b71abe338391081492f5
U juliannoble2
Z 136f01f2ae1180f56f9a5b0c86da8962