Skip to content

Commit

Permalink
chore: no jit when !amd64 || windows (#59)
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaost authored Aug 6, 2024
1 parent 37f518d commit a1c5b2b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion frugal_jit.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//go:build !go1.24
//go:build !go1.24 && amd64 && !windows

/*
* Copyright 2024 CloudWeGo Authors
Expand Down
4 changes: 2 additions & 2 deletions frugal_jit_go124.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//go:build go1.24
//go:build go1.24 || !amd64 || windows

/*
* Copyright 2024 CloudWeGo Authors
Expand Down Expand Up @@ -43,5 +43,5 @@ func jitDecodeObject(buf []byte, val interface{}) (int, error) {
// Pretouch compiles vt ahead-of-time to avoid JIT compilation on-the-fly, in
// order to reduce the first-hit latency.
func Pretouch(vt reflect.Type, options ...Option) error {
panic("not support JIT for Go version >= go1.24")
return nil // do not panic, legacy code may still use the func
}

0 comments on commit a1c5b2b

Please sign in to comment.