Browse Source

убрал паразитный fmt

kpmy 10 years ago
parent
commit
849cfa81d2
4 changed files with 11 additions and 10 deletions
  1. 2 1
      rt2/rules2/wrap/eval/call.go
  2. 1 2
      rt2/rules2/wrap/eval/expr.go
  3. 4 4
      utils/debug.go
  4. 4 3
      xev/converter.go

+ 2 - 1
rt2/rules2/wrap/eval/call.go

@@ -11,6 +11,7 @@ import (
 	"fw/rt2/frame"
 	rtm "fw/rt2/module"
 	"fw/rt2/scope"
+	"log"
 	"math"
 	"reflect"
 	"ypk/assert"
@@ -66,7 +67,7 @@ func go_process(in IN, par node.Node) OUT {
 					panic(40)
 				}
 			} else {
-				fmt.Println(val, "not a json")
+				log.Println(val, "not a json")
 			}
 		}
 	}

+ 1 - 2
rt2/rules2/wrap/eval/expr.go

@@ -1,7 +1,6 @@
 package eval
 
 import (
-	"fmt"
 	"fw/cp/constant/operation"
 	"fw/cp/node"
 	"fw/cp/object"
@@ -398,7 +397,7 @@ func bit_range(_f scope.Value, _t scope.Value) scope.Value {
 	for i := f; i <= t; i++ {
 		ret = ret.SetBit(ret, int(i), 1)
 	}
-	fmt.Println("bits", ret)
+	//fmt.Println("bits", ret)
 	return scope.TypeFromGo(ret)
 }
 

+ 4 - 4
utils/debug.go

@@ -1,6 +1,6 @@
 package utils
 
-import "fmt"
+import "log"
 
 var debugFrame = false
 var debugScope = false
@@ -18,19 +18,19 @@ func Debug2(x, y bool) {
 
 func PrintFrame(x ...interface{}) {
 	if debugFrame {
-		fmt.Println(x...)
+		log.Println(x...)
 	}
 }
 
 func PrintScope(x ...interface{}) {
 	if debugScope {
-		fmt.Println(x...)
+		log.Println(x...)
 	}
 }
 
 func PrintTrap(x ...interface{}) {
 	if debugTrap {
-		fmt.Println(x...)
+		log.Println(x...)
 	}
 }
 

+ 4 - 3
xev/converter.go

@@ -9,6 +9,7 @@ import (
 	"fw/cp/module"
 	"fw/cp/node"
 	"fw/cp/object"
+	"log"
 	"math/big"
 	"strconv"
 	"unicode/utf16"
@@ -230,7 +231,7 @@ func (r *Result) doType(n *Node) (ret object.ComplexType) {
 				}
 				ret = t
 			default:
-				fmt.Println("unknown basic type", n.Data.Typ.Typ)
+				log.Println("unknown basic type", n.Data.Typ.Typ)
 			}
 		case "DYNAMIC":
 			switch n.Data.Typ.Base {
@@ -342,7 +343,7 @@ func (r *Result) doObject(n *Node) (ret object.Object) {
 		case "module":
 			ret = object.New(object.MODULE, n.Id)
 		default:
-			fmt.Println(n.Data.Obj.Mode)
+			log.Println(n.Data.Obj.Mode)
 			panic("no such object mode")
 		}
 	}
@@ -516,7 +517,7 @@ func (r *Result) buildNode(n *Node) (ret node.Node) {
 		case "compound":
 			ret = node.New(node.COMPOUND, n.Id)
 		default:
-			fmt.Println(n.Data.Nod.Class)
+			log.Println(n.Data.Nod.Class)
 			panic("no such node type")
 		}
 	} else {