-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nimvm: CritBitTree does not work: "limited VM support for 'addr'" #14339
Comments
akavel
added a commit
to akavel/jnim
that referenced
this issue
May 13, 2020
This change makes it possible to use `jexport` together with `jnimDexWrite` to emit .dex files. The `jnimDexWrite` proc builds a .nim file, which can then be compiled using package dali to generate a .dex file. Currently, the intermediate step of generating a .nim file is required, as Nim's compile-time has a lot of limitations. In this particular case, see e.g.: - nim-lang/Nim#14339 - nim-lang/Nim#14340
akavel
added a commit
to akavel/jnim
that referenced
this issue
May 13, 2020
This change makes it possible to use `jexport` together with `jnimDexWrite` to emit .dex files. The `jnimDexWrite` proc builds a .nim file, which can then be compiled using package dali to generate a .dex file. Currently, the intermediate step of generating a .nim file is required, as Nim's compile-time has a lot of limitations. In this particular case, see e.g.: - nim-lang/Nim#14339 - nim-lang/Nim#14340
yglukhov
pushed a commit
to yglukhov/jnim
that referenced
this issue
May 13, 2020
This change makes it possible to use `jexport` together with `jnimDexWrite` to emit .dex files. The `jnimDexWrite` proc builds a .nim file, which can then be compiled using package dali to generate a .dex file. Currently, the intermediate step of generating a .nim file is required, as Nim's compile-time has a lot of limitations. In this particular case, see e.g.: - nim-lang/Nim#14339 - nim-lang/Nim#14340
@akavel import critbits
proc getKey*[T](c: CritBitTree[T], key: string): T {.inline.} =
c[key]
static:
var strings: CritBitTree[int]
discard strings.containsOrIncl("foo", 1)
echo strings.getKey("foo") |
Closed
reduced without stdlib: when true:
type
Node = ref object
val: int
proc bar(c: Node): var int =
var n = c # Error: limited VM support for 'addr'
c.val
proc main =
var a = Node()
discard a.bar()
static: main()
main() |
timotheecour
added a commit
to timotheecour/Nim
that referenced
this issue
Nov 16, 2020
timotheecour
added a commit
to timotheecour/Nim
that referenced
this issue
Nov 16, 2020
timotheecour
added a commit
to timotheecour/Nim
that referenced
this issue
Nov 16, 2020
@timotheecour ❤️ thanks for working on this! |
timotheecour
added a commit
to timotheecour/Nim
that referenced
this issue
Nov 16, 2020
timotheecour
added a commit
to timotheecour/Nim
that referenced
this issue
Nov 25, 2020
mildred
pushed a commit
to mildred/Nim
that referenced
this issue
Jan 11, 2021
…support for addr (nim-lang#16002) * fix nim-lang#14339: fixes limited VM support for addr * strengthen test * reference bug nim-lang#16003 * also fixes nim-lang#13511 * also fixes nim-lang#14420
ardek66
pushed a commit
to ardek66/Nim
that referenced
this issue
Mar 26, 2021
…support for addr (nim-lang#16002) * fix nim-lang#14339: fixes limited VM support for addr * strengthen test * reference bug nim-lang#16003 * also fixes nim-lang#13511 * also fixes nim-lang#14420
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The CritBitTree type does not work at compile time.
Example
Current Output
Expected Output
Additional Information
Nim version:
The text was updated successfully, but these errors were encountered: