From 073e240233589933c43143c997247c33206bb066 Mon Sep 17 00:00:00 2001 From: Robert Griesemer Date: Mon, 9 Nov 2009 21:13:17 -0800 Subject: - replaced gofmt expression formatting algorithm with rsc's algorithm - applied gofmt -w misc src - partial CL (remaining files in other CLs) R=rsc, r http://go/go-review/1026036 --- src/pkg/exp/eval/bridge.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/pkg/exp/eval/bridge.go') diff --git a/src/pkg/exp/eval/bridge.go b/src/pkg/exp/eval/bridge.go index 1118ddd08..fed27930f 100644 --- a/src/pkg/exp/eval/bridge.go +++ b/src/pkg/exp/eval/bridge.go @@ -77,7 +77,7 @@ func TypeFromNative(t reflect.Type) Type { // Variadic functions have DotDotDotType at the end varidic := false; if nin > 0 { - if _, ok := t.In(nin-1).(*reflect.DotDotDotType); ok { + if _, ok := t.In(nin - 1).(*reflect.DotDotDotType); ok { varidic = true; nin--; } @@ -142,13 +142,11 @@ type nativeFunc struct { } func (f *nativeFunc) NewFrame() *Frame { - vars := make([]Value, f.in + f.out); + vars := make([]Value, f.in+f.out); return &Frame{nil, vars}; } -func (f *nativeFunc) Call(t *Thread) { - f.fn(t, t.f.Vars[0 : f.in], t.f.Vars[f.in : f.in + f.out]) -} +func (f *nativeFunc) Call(t *Thread) { f.fn(t, t.f.Vars[0:f.in], t.f.Vars[f.in:f.in+f.out]) } // FuncFromNative creates an interpreter function from a native // function that takes its in and out arguments as slices of -- cgit v1.2.3