Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

tclcompiler 1.7

445 views
Skip to first unread message

Nicolas Robert

unread,
Oct 26, 2019, 3:43:59 PM10/26/19
to
I want to transform my tcl file to tbc file and I get error

% package req compiler
1.7.1
% compiler::compile file.tcl file.tbc
% source file.tbc
malformed byte sequence at or near "z
18
CCRn#if|p#Nd8.&cS<`(Ec!
30"
%

It's a bug ? I have to add something to make it work

proc HeaderInfo {tempNoteFile designation var} {

upvar $var localVar

foreach val $tempNoteFile {

if {[string match *$designation* $val]} {

lassign [split $val "="] des value

if {[string match *;* $value]} {
set a [split $value ";"]
foreach infoval $a {
if {[file isfile $infoval] && [file exist $infoval]} {
lappend localVar $infoval
}
}
} else {
set localVar $value
}
return 1
}
}
return 0
}


tcl_platform(byteOrder) = littleEndian
tcl_platform(engine) = Tcl
tcl_platform(machine) = amd64
tcl_platform(os) = Windows NT
tcl_platform(osVersion) = 10.0
tcl_platform(pathSeparator) = ;
tcl_platform(platform) = windows
tcl_platform(pointerSize) = 8
tcl_platform(threaded) = 1
tcl_platform(user) = Nico
tcl_platform(wordSize) = 4

tombert

unread,
Oct 26, 2019, 5:28:17 PM10/26/19
to
I tried your script with the original TclDevKit Compiler 5.4. It compiles fine and it sources fine. The file starts with:

# TclPro::Compiler::Include

if {[catch {package require tbcload 1.6} err] == 1} {
return -code error "[info script]: The TclPro ByteCode Loader is not available or does not support the correct version -- $err"
}
tbcload::bceval {
TclPro ByteCode 2 0 1.7 8.6
1 0 11 5 0 0 8 0 4 1 1 -1 -1
11
(<E<!(H&s!+-!!



Nicolas Robert

unread,
Oct 27, 2019, 10:33:59 AM10/27/19
to
Thanks tombert , I have tried on my Mac and it's works , I think I have encoding problem... I have some lines that are different

s.effe...@googlemail.com

unread,
Oct 28, 2019, 1:36:30 PM10/28/19
to
Could be the same problem that was ironed out in this thread:
https://groups.google.com/forum/#!topic/comp.lang.tcl/3giA0OCXsoI

However, I think there's no readily available up-to-date vanillawish.

You discovered the workaround yourself: Add something to the script so that a slightly different bytecode is generated that is then transformed into a different A85 encoding that doesn't trigger the bug.

-- Stephan
0 new messages