Tcl Source Code

View Ticket
Login
Ticket UUID: a64ef79518060ba29843c08460a801d972edfb8c
Title: Literal string representation
Type: Bug Created on: 2019-05-23 15:26:58
Submitter: beric Assigned to: nobody
Subsystem: 47. Bytecode Compiler Severity: Minor
Priority: 5 Medium Last modified: 2019-05-23 15:26:58
Status: Open Closed by: nobody
Resolution: None Closed on:
Version: 8.6.9
Description:

I have a code which generates a lot of lists in a namespace. A first version generated these lists inside braces:

  namespace eval GeneratedNamespace {
      variable List1 {
          element1 element2 ...
      }
      ...
  }

But to avoid keeping string representation, I changed my code to generate [list...] instead. However, the string representation is still present. In fact, TclReleaseLiteral hashes the string representation, and even when the literal is not in the global literal table.

Don't how if/how it would be possible to avoid such literals to be hashed. Or clean the string representation if it wasn't present before.