mirror of
https://github.com/pezkuwichain/revive.git
synced 2026-06-16 12:01:13 +00:00
Separate compilation and linker phases (#376)
Separate between compilation and linker phases to allow deploy time linking and back-porting era compiler changes to fix #91. Unlinked contract binaries (caused by missing libraries or missing factory dependencies in turn) are emitted as raw ELF object. Few drive by fixes: - #98 - A compiler panic on missing libraries definitions. - Fixes some incosistent type forwarding in JSON output (empty string vs. null object). - Remove the unused fallback for size optimization setting. - Remove the broken `--lvm-ir` mode. - CI workflow fixes. --------- Signed-off-by: Cyrill Leutwiler <bigcyrill@hotmail.com> Signed-off-by: xermicus <bigcyrill@hotmail.com> Signed-off-by: xermicus <cyrill@parity.io>
This commit is contained in:
@@ -66,9 +66,9 @@ impl<'ctx> Argument<'ctx> {
|
||||
/// Access the underlying value.
|
||||
///
|
||||
/// Will emit a stack load if `self` is a pointer argument.
|
||||
pub fn access<D: crate::polkavm::Dependency + Clone>(
|
||||
pub fn access(
|
||||
&self,
|
||||
context: &crate::polkavm::context::Context<'ctx, D>,
|
||||
context: &crate::polkavm::context::Context<'ctx>,
|
||||
) -> anyhow::Result<inkwell::values::BasicValueEnum<'ctx>> {
|
||||
match &self.value {
|
||||
Value::Register(value) => Ok(*value),
|
||||
@@ -79,9 +79,9 @@ impl<'ctx> Argument<'ctx> {
|
||||
/// Access the underlying value.
|
||||
///
|
||||
/// Will emit a stack load if `self` is a pointer argument.
|
||||
pub fn as_pointer<D: crate::polkavm::Dependency + Clone>(
|
||||
pub fn as_pointer(
|
||||
&self,
|
||||
context: &crate::polkavm::context::Context<'ctx, D>,
|
||||
context: &crate::polkavm::context::Context<'ctx>,
|
||||
) -> anyhow::Result<crate::polkavm::context::Pointer<'ctx>> {
|
||||
match &self.value {
|
||||
Value::Register(value) => {
|
||||
|
||||
Reference in New Issue
Block a user