summary refs log tree commit diff stats
path: root/compiler/vmops.nim
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/vmops.nim')
-rw-r--r--compiler/vmops.nim5
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/vmops.nim b/compiler/vmops.nim
index 54b2877e7..27d1ef479 100644
--- a/compiler/vmops.nim
+++ b/compiler/vmops.nim
@@ -121,6 +121,7 @@ when defined(nimHasInvariant):
     of linkOptions: result = conf.linkOptions
     of compileOptions: result = conf.compileOptions
     of ccompilerPath: result = conf.cCompilerPath
+    of backend: result = $conf.backend
 
   proc querySettingSeqImpl(conf: ConfigRef, switch: BiggestInt): seq[string] =
     template copySeq(field: untyped): untyped =
@@ -215,7 +216,7 @@ proc registerAdditionalOps*(c: PCtx) =
 
   proc hashVmImpl(a: VmArgs) =
     var res = hashes.hash(a.getString(0), a.getInt(1).int, a.getInt(2).int)
-    if c.config.cmd == cmdCompileToJS:
+    if c.config.backend == backendJs:
       # emulate JS's terrible integers:
       res = cast[int32](res)
     setResult(a, res)
@@ -232,7 +233,7 @@ proc registerAdditionalOps*(c: PCtx) =
       bytes[i] = byte(arr[i].intVal and 0xff)
 
     var res = hashes.hash(bytes, sPos, ePos)
-    if c.config.cmd == cmdCompileToJS:
+    if c.config.backend == backendJs:
       # emulate JS's terrible integers:
       res = cast[int32](res)
     setResult(a, res)