Permalink
Browse files

codestring - s/codestring/stringbuilder/

  • Loading branch information...
1 parent 1ec07ba commit ade8121c955360f3a34cfb7c9c5c30501e9b0665 @coke coke committed Feb 16, 2011
Showing with 17 additions and 17 deletions.
  1. +1 −1 runtime/builtin/namespace.pir
  2. +1 −1 runtime/builtin/subst.pir
  3. +2 −2 runtime/compilers.pir
  4. +3 −3 src/class/tclproc.pir
  5. +10 −10 src/grammar/expr/past2pir.tg
@@ -237,7 +237,7 @@ doesnt_exist:
global_ns:
.local pmc compileTcl, code
compileTcl = get_root_global ['_tcl'], 'compileTcl'
- code = new 'CodeString'
+ code = new 'StringBuilder'
$S0 = join ' ', argv
($S0, $S1) = compileTcl($S0, 'pir_only'=>1)
$I0 = code.'unique'()
@@ -89,7 +89,7 @@ subst:
ret = ast['ret']
.local pmc pir
- pir = new 'CodeString'
+ pir = new 'StringBuilder'
pir.'emit'(<<"END_PIR", namespace, code, ret)
.HLL 'tcl'
View
@@ -59,7 +59,7 @@ Given an expression, return a subroutine, or optionally, the raw PIR
ret = ast['ret']
.local pmc pir
- pir = new 'CodeString'
+ pir = new 'StringBuilder'
pir.'emit'(<<"END_PIR", namespace, result, ret)
.HLL 'tcl'
@@ -156,7 +156,7 @@ end_preamble:
ret = ast['ret']
.local pmc pir
- pir = new 'CodeString'
+ pir = new 'StringBuilder'
unless has_pir_only goto do_wrapper
unless pir_only goto do_wrapper
if has_wrapper goto do_wrapper
View
@@ -45,9 +45,9 @@ Define the attributes required for the class.
.pmc(pirc,{compreg 'PIR'})
.local pmc code, args_code, defaults
- code = new 'CodeString'
- args_code = new 'CodeString'
- defaults = new 'CodeString'
+ code = new 'StringBuilder'
+ args_code = new 'StringBuilder'
+ defaults = new 'StringBuilder'
.str(namespace,'[]')
$I0 = ns
@@ -7,7 +7,7 @@ transform result (ROOT) {
transform pir (PAST::Expr) {
.local pmc pir
- pir = new 'CodeString'
+ pir = new 'StringBuilder'
.local pmc value
value = node['value']
@@ -34,7 +34,7 @@ END_PIR
transform pir (PAST::Program) {
.local pmc pir
- pir = new 'CodeString'
+ pir = new 'StringBuilder'
.local pmc iterator, child
iterator = node.'child_iter'()
@@ -56,7 +56,7 @@ transform pir (PAST::Val) {
.local pmc ret
.local pmc class
- pir = new 'CodeString'
+ pir = new 'StringBuilder'
ret = pir.'unique'('$P')
class = node['class']
$S0 = node['value']
@@ -90,7 +90,7 @@ transform pir (PAST::Val) {
transform pir (PAST::Var) {
.local pmc pir, ret
- pir = new 'CodeString'
+ pir = new 'StringBuilder'
ret = pir.'unique'('$P')
node['ret'] = ret
node['istemp'] = 1
@@ -130,7 +130,7 @@ transform pir (PAST::Op) {
.local pmc args,iterator,pir
.local pmc return_register
- pir = new 'CodeString'
+ pir = new 'StringBuilder'
args = new 'TclList'
iterator = node.'child_iter'()
iter_loop:
@@ -165,7 +165,7 @@ transform pir (PAST::MathFunc) {
.local pmc args,iterator,pir
.local pmc return_register
- pir = new 'CodeString'
+ pir = new 'StringBuilder'
args = new 'TclList'
iterator = node.'child_iter'()
iter_loop:
@@ -197,7 +197,7 @@ transform pir (PAST::StaticCommand) {
.local pmc args, children, iterator, pir
.local string reg
- pir = new 'CodeString'
+ pir = new 'StringBuilder'
args = new 'TclList'
children = node.'get_children'()
iterator = iter children
@@ -325,7 +325,7 @@ END_PIR
transform pir (PAST::DynamicCommand) {
.local pmc args, children, iterator, pir, reg
- pir = new 'CodeString'
+ pir = new 'StringBuilder'
args = new 'TclList'
children = node.'get_children'()
iterator = iter children
@@ -410,7 +410,7 @@ END_PIR
transform pir (PAST::Expand) {
.local pmc pir, value
- pir = new 'CodeString'
+ pir = new 'StringBuilder'
value = node['value']
$S0 = tree.'get'('pir', value)
@@ -433,7 +433,7 @@ transform pir (PAST::Cond) {
.local pmc children, cond, then, else
.local string cond_result, then_result, else_result
- pir = new 'CodeString'
+ pir = new 'StringBuilder'
# This node has 3 children. generate PIR so that:
# if node1 then node2 else node3

0 comments on commit ade8121

Please sign in to comment.