# HG changeset patch # User Mike Pavone # Date 1304904993 25200 # Node ID a32afde77abb17833101a140e35b0a061ac6370f # Parent ac5c2d78663f9387f6cf50dd4dce4897a2fb0665 Remove some debug Print calls from compiler diff -r ac5c2d78663f -r a32afde77abb cbackend_c.rhope --- a/cbackend_c.rhope Sun May 08 18:21:19 2011 -0700 +++ b/cbackend_c.rhope Sun May 08 18:36:33 2011 -0700 @@ -643,7 +643,7 @@ type <- [[func]Input Types >>]Index[~] }{ - type <- [[func]Variables >>]Index[var] { Print["op refers to a var"] } + type <- [[func]Variables >>]Index[var] {} { [[func]Outputs >>]Find[=[var,?]] { @@ -881,10 +881,8 @@ { If[[[func]Last NumParams >>] = [-1]] { - Print["No previous PrepCall"] freed <- Val[func] }{ - Print[[["Last NumParams is "]Append[String[[func]Last NumParams >>]]]Append[" adding FreeCall"]] freed <- [func]Add Raw Line["FreeCall"] } prepped <- [[freed]Add Raw Line[ [["PrepCall("]Append[String[[rargs]Length]]]Append[")"] ] @@ -1431,7 +1429,6 @@ valtype <- Blueprint Of[value] [(String(),String Cat(),String Slice(),Worker Literal(),List(),List Leaf())]Find[=[valtype,?]] { - Print[[name]Append[" is not of an early constant type"]] out <- text }{ Const Construct C[value,type reg] diff -r ac5c2d78663f -r a32afde77abb nworker_c.rhope --- a/nworker_c.rhope Sun May 08 18:21:19 2011 -0700 +++ b/nworker_c.rhope Sun May 08 18:36:33 2011 -0700 @@ -227,7 +227,6 @@ { ,does not <- [[node]Input Types >>]Index[input num] { - Print[[[[[["Input: "]Append[String[input num]]]Append[", count: "]]Append[String[count]]]Append[", wires: "]]Append[String[[[[node]Wires To >>]Index[ [input num]+[1] ]]Length]]] count <- [~]Index[1] ,does not <- If[[count] = [[[[node]Wires To >>]Index[[input num]+[1]]]Length]] { @@ -242,8 +241,6 @@ If[[[node]Inputs >>] > [0]] { does,does not <- _Has Input Types[node,0] - { Print["does have input types"] } - { Print["does not have input types"] } }{ does <- Yes } @@ -328,12 +325,10 @@ { If[[[dest]IO Num >>] >= [0]] { - Print[[[["Propagate Type, Index: "]Append[String[[dest]Index >>]]]Append[" io num: "]]Append[String[[dest]IO Num >>]]] node <- [nodelist]Index[[dest]Index >>] [[node]Input Types >>]Index[[dest]IO Num >>] { - Print[["Existing type: "]Append[[existing type]Name >>]] existing type <- [~]Index[0] new count <- [[~]Index[1]]+[1] If[[[existing type]Name >>] = [[type]Name >>]] @@ -361,15 +356,12 @@ new type <- Type Instance["Any Type"] } }{ - Print["No existing type info for this input"] new type <- Val[type] new count <- 1 } - Print[[[["new type: "]Append[[new type]Name >>]]Append[", new count: "]]Append[String[new count]]] new node <- [node]Input Types <<[ [ [node]Input Types >> ]Set[ [dest]IO Num >>, [[()]Append[new type]]Append[new count] ] ] - { Print["got new node"] } out <- Infer Types Node[[nodelist]Set[[dest]Index >>, new node], new node, [dest]Index >>, prog, worker] }{ out <- nodelist @@ -382,7 +374,6 @@ { out <- Fold[Propagate Type[?, ?, prog, worker, ~], nodelist, dests] }{ - Print[["Output type is missing for output #"]Append[String[output num]]] out <- nodelist } } @@ -395,7 +386,6 @@ }{ extra <- "" } - Print[[[[["Infer Types Node: "]Append[String[index]]]Append[", type: "]]Append[[node]Type >>]]Append[extra]] If[[[node]Type >>] = ["const"]] { const type <- Blueprint Of[[node]Data >>] @@ -457,13 +447,10 @@ worker name <- [[node]Data >>]Name >> [prog]Is Method?[worker name] { - Print[[["Infer Types: "]Append[worker name]]Append[" is a method"]] first arg type <- [[[node]Input Types >>]Index[0]]Index[0] If[[[first arg type]Name >>] = ["Any Type"]] { - Print["No type info for first arg"] outtypes <- Fold[Append[?, Type Instance["Any Type"]], (), Range[0, [node]Inputs >>]] - Print[["outtypes length: "]Append[String[Length[outtypes]]]] nextnode <- [node]Output Types <<[ outtypes ] }{ worker def <- [prog]Find Method[worker name, first arg type] @@ -474,7 +461,6 @@ } nextnode <- [[node]Output Types <<[outtypes] ]Data <<[new ref] - Print[["New worker name:"]Append[new worker name]] }{ //TODO: Return errors instead of printing them Print[ @@ -487,7 +473,6 @@ } } }{ - Print[[["Infer Types: "]Append[worker name]]Append[" is not a method"]] worker def <- [prog]Find Worker Def[worker name] {} { Print["Error, could not find worker def"] } nextnode <- [node]Output Types <<[ outtypes ] @@ -496,7 +481,6 @@ } } }{ - Print["Skipping node because input type info not present"] out <- nodelist } } @@ -508,14 +492,12 @@ Val[nextnode] { nextlist <- [nodelist]Set[index, nextnode] - { Print["Calling Propagate types on descdendants of this node"] } out <- Fold[Propagate Types[?, ?, ?, prog, worker, nextnode], nextlist, [nextnode]Wires From >>] } } Infer Types@NWorker[worker,prog:out] { - Print[["Infer Types: "]Append[[worker]Name >>]] out <- [worker]Nodes <<[Fold[Infer Types Node[?, ?, ?, prog, worker], [worker]Nodes >>, [worker]Nodes >>]] } @@ -941,7 +923,6 @@ } } after save <- Fold[Save Result[?, ?, node index], with call, Range[0, save outs]] - Print[["Last NumParams is now "]Append[String[[after save]Last NumParams >>]]] } Compile Node[worker,program,func,nodes,current:out,out worker]