[backport => 1.0] fix #16428 vmops now works for generic procs (#16429)

* fix #16428 vmops now works for generic procs

* remove duplication
This commit is contained in:
Timothee Cour 2020-12-21 17:05:21 -08:00 • committed by GitHub
commit bc84d9c8cb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 10 deletions

View file

@ -567,6 +567,8 @@ else: # JS
func tanh*[T: float32|float64](x: T): T {.importc: "Math.tanh", nodecl.}
func arcsin*[T: float32|float64](x: T): T {.importc: "Math.asin", nodecl.}
# keep this as generic or update test in `tvmops.nim` to make sure we
# keep testing that generic importc procs work
func arccos*[T: float32|float64](x: T): T {.importc: "Math.acos", nodecl.}
func arctan*[T: float32|float64](x: T): T {.importc: "Math.atan", nodecl.}
func arctan2*[T: float32|float64](y, x: T): T {.importc: "Math.atan2", nodecl.}