Author: coke
Date: Wed Feb 8 08:48:08 2006
New Revision: 11475
Modified:
trunk/languages/tcl/lib/compiler.pir
trunk/languages/tcl/lib/tclbinaryops.pir
trunk/languages/tcl/lib/tclcommand.pir
trunk/languages/tcl/lib/tclcommandlist.pir
trunk/languages/tcl/lib/tclfunc.pir
trunk/languages/tcl/lib/tclops.pir
trunk/languages/tcl/lib/tclvar.pir
trunk/languages/tcl/lib/tclword.pir
Log:
tcl - add some debug output into the generated PIR to make it easier
to figure out where the PIR was actually generated.
Modified: trunk/languages/tcl/lib/compiler.pir
==============================================================================
--- trunk/languages/tcl/lib/compiler.pir (original)
+++ trunk/languages/tcl/lib/compiler.pir Wed Feb 8 08:48:08 2006
@@ -79,6 +79,7 @@ set_args:
.local string template
template = <<"END_PIR"
+# lib/compiler.pir :: compile_dispatch
$P%i = new .%s
$P%i=%s%s%s
END_PIR
@@ -136,6 +137,7 @@ done_init:
# The library bits that they'll need.
stub_code = <<"END_PIR"
+# lib/compiler.pir :: pir_compiler (1)
.sub _dynlexload :immediate
$P1=loadlib 'dynlexpad'
.end
@@ -157,6 +159,7 @@ END_PIR
# conflicts with the parser itself.
stub_code = <<"END_PIR"
+# lib/compiler.pir :: pir_compiler (2)
.pragma n_operators 1
.sub compiled_tcl_sub%i :anon
.include "languages/tcl/lib/returncodes.pir"
Modified: trunk/languages/tcl/lib/tclbinaryops.pir
==============================================================================
--- trunk/languages/tcl/lib/tclbinaryops.pir (original)
+++ trunk/languages/tcl/lib/tclbinaryops.pir Wed Feb 8 08:48:08 2006
@@ -84,7 +84,7 @@ Initialize the attributes for an instanc
.param int register_num
.local string pir_code
- pir_code=""
+ pir_code="# lib/tclbinaryops.pir :: compile (1)\n"
.local pmc retval
retval = new .TclInt
@@ -94,7 +94,6 @@ Initialize the attributes for an instanc
l_operand = getattribute self, "TclBinaryOp\x00l_operand"
r_operand = getattribute self, "TclBinaryOp\x00r_operand"
-
compile = find_global "_Tcl", "compile_dispatch"
.local string l_code,r_code,op_code
@@ -112,6 +111,7 @@ Initialize the attributes for an instanc
# type.
.local string temp_code
temp_code = <<"END_PIR"
+# lib/tclbinaryops.pir :: compile (2)
.local pmc __number
__number = find_global "_Tcl", "__number"
push_eh l_code_check_%s
@@ -124,6 +124,7 @@ END_PIR
l_code .= $S0
temp_code = <<"END_PIR"
+# lib/tclbinaryops.pir :: compile (3)
push_eh r_code_check_%s
$P%s = __number($P%s)
clear_eh
Modified: trunk/languages/tcl/lib/tclcommand.pir
==============================================================================
--- trunk/languages/tcl/lib/tclcommand.pir (original)
+++ trunk/languages/tcl/lib/tclcommand.pir Wed Feb 8 08:48:08 2006
@@ -32,7 +32,7 @@ Define the attributes required for the c
compile = find_global "_Tcl", "compile_dispatch"
.local string pir_code, args, inlined, dynamic, invalid, error
- pir_code = ""
+ pir_code = "# lib/tclcommand.pir :: compile\n"
args = ""
inlined = ""
dynamic = ""
Modified: trunk/languages/tcl/lib/tclcommandlist.pir
==============================================================================
--- trunk/languages/tcl/lib/tclcommandlist.pir (original)
+++ trunk/languages/tcl/lib/tclcommandlist.pir Wed Feb 8 08:48:08 2006
@@ -16,7 +16,7 @@
.param int register_num
.local string pir_code,temp_code
- pir_code = ""
+ pir_code = "# lib/tclcommandlist.pir :: compile\n"
.local pmc retval
.local int i, elems
Modified: trunk/languages/tcl/lib/tclfunc.pir
==============================================================================
--- trunk/languages/tcl/lib/tclfunc.pir (original)
+++ trunk/languages/tcl/lib/tclfunc.pir Wed Feb 8 08:48:08 2006
@@ -152,6 +152,7 @@ func_tanh:
done:
.local string format
format = <<"END_PIR"
+# lib/tclfunc.pir :: compile
$N%i=$P%i
$N%i=%s $N%i
$P%i=new .TclFloat
Modified: trunk/languages/tcl/lib/tclops.pir
==============================================================================
--- trunk/languages/tcl/lib/tclops.pir (original)
+++ trunk/languages/tcl/lib/tclops.pir Wed Feb 8 08:48:08 2006
@@ -36,7 +36,7 @@ Initialize the attributes for an instanc
.param int register_num
.local string pir_code
- pir_code = ""
+ pir_code = "# lib/tclops.pir :: compile\n"
.local pmc retval
retval = new .TclInt
Modified: trunk/languages/tcl/lib/tclvar.pir
==============================================================================
--- trunk/languages/tcl/lib/tclvar.pir (original)
+++ trunk/languages/tcl/lib/tclvar.pir Wed Feb 8 08:48:08 2006
@@ -24,6 +24,7 @@ Define the attributes required for the c
.local string pir_code
.local string template
template = <<"END_PIR"
+# lib/tclvar.pir :: compile
.local pmc read
read = find_global '_Tcl', '__read'
$P%i = read("%s")
Modified: trunk/languages/tcl/lib/tclword.pir
==============================================================================
--- trunk/languages/tcl/lib/tclword.pir (original)
+++ trunk/languages/tcl/lib/tclword.pir Wed Feb 8 08:48:08 2006
@@ -30,7 +30,7 @@ Define the attributes required for the c
len = self
.local string pir_code,temp_code
- pir_code = ""
+ pir_code = "# lib/tclword.pir :: compile\n"
.local pmc compiled_args
compiled_args = new .TclList