summary refs log tree commit diff stats
path: root/lib/system/repr_v2.nim
diff options
context:
space:
mode:
authorTimothee Cour <timothee.cour2@gmail.com>2021-07-20 13:13:52 -0700
committerGitHub <noreply@github.com>2021-07-20 22:13:52 +0200
commitcf0cf32d276002e850a87667fff62c4df12999d6 (patch)
treed35564ef08d681941158d7d457d797e9775b40eb /lib/system/repr_v2.nim
parenta8b3e7c05919511db62f1aabd706c46316b4f7b6 (diff)
downloadNim-cf0cf32d276002e850a87667fff62c4df12999d6.tar.gz
make -d:nimFpRoundtrips work consistently in vm vs rt, fix #18400, etc (#18531)
* compiler/vmhooks: add getVar to allow vmops with var params
* addFloat vmops with var param
* cgen now renders float32 literals in c backend using roundtrip float to string
Diffstat (limited to 'lib/system/repr_v2.nim')
-rw-r--r--lib/system/repr_v2.nim6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/system/repr_v2.nim b/lib/system/repr_v2.nim
index 618cc2b40..8471ea148 100644
--- a/lib/system/repr_v2.nim
+++ b/lib/system/repr_v2.nim
@@ -19,9 +19,9 @@ proc repr*(x: uint64): string {.noSideEffect.} =
   ## converted to a decimal string.
   $x #Calls `$` from system/strmantle.nim
 
-proc repr*(x: float): string {.magic: "FloatToStr", noSideEffect.}
-  ## repr for a float argument. Returns `x`
-  ## converted to a decimal string.
+proc repr*(x: float): string =
+  ## Same as $x
+  $x
 
 proc repr*(x: bool): string {.magic: "BoolToStr", noSideEffect.}
   ## repr for a boolean argument. Returns `x`