Skip to content

Commit ffa18bb

Browse files
committed
Fix type in bench
1 parent daf9843 commit ffa18bb

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

Diff for: bench_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ func Benchmark_access(b *testing.B) {
7575
}
7676
}
7777

78-
func Benchmark_accessFast(b *testing.B) {
78+
func Benchmark_accessMap(b *testing.B) {
7979
type Price struct {
8080
Value int
8181
}
@@ -127,7 +127,7 @@ func Benchmark_callFast(b *testing.B) {
127127
Fn func(...interface{}) interface{}
128128
}
129129

130-
program, err := expr.Compile(`Fn("a", "b", "ab"`, expr.Env(Env{}))
130+
program, err := expr.Compile(`Fn("a", "b", "ab")`, expr.Env(Env{}))
131131
if err != nil {
132132
b.Fatal(err)
133133
}

Diff for: compiler/compiler.go

+1-6
Original file line numberDiff line numberDiff line change
@@ -433,12 +433,7 @@ func (c *compiler) FunctionNode(node *ast.FunctionNode) {
433433
if node.Fast {
434434
op = OpCallFast
435435
}
436-
c.emit(op, c.makeConstant(
437-
Call{
438-
Name: node.Name,
439-
Size: len(node.Arguments),
440-
})...,
441-
)
436+
c.emit(op, c.makeConstant(Call{Name: node.Name, Size: len(node.Arguments)})...)
442437
}
443438

444439
func (c *compiler) BuiltinNode(node *ast.BuiltinNode) {

0 commit comments

Comments
 (0)