Skip to content

Conversation

@bollu
Copy link
Contributor

@bollu bollu commented Jan 7, 2023

Closes #2004.

In porting the bugfix from 6eb852e, I noticed that the LLVM backend was incorrectly generating declaration initializers (in callIODeclInitFn), by assuming the return type of the initializer is the return type of the declaration. Rather, it must be be lean_object, since the initializer returns an IO a value which must be unpacked.

Closes leanprover#2004.

In porting the bugfix from
leanprover@6eb852e,
I noticed that the LLVM backend was incorrectly generating declaration
initializers (in `callIODeclInitFn`), by assuming the return type of the
initializer is the return type of the declaration. Rather, it must be be
`lean_object`, since the initializer returns an `IO a` value which must be unpacked.

TODO: stop using the `getOrCreateFunction` pattern pervasively.
  perform the `create` at the right location, and the `get`
  at the correct location.
@bollu bollu force-pushed the llvm/bugfix-init-unboxed branch from bc6857f to cb8af7f Compare January 7, 2023 04:32
@Kha Kha merged commit a0a0463 into leanprover:master Jan 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

LLVM backend doesn't support unboxed initializers

2 participants