From a64f80dbe81d50e3313aebf4efad8f7b737c9921 Mon Sep 17 00:00:00 2001 From: Folkert Date: Fri, 18 Jun 2021 21:16:43 +0200 Subject: [PATCH] fix hash problem --- compiler/mono/src/borrow.rs | 11 +++-------- compiler/mono/src/inc_dec.rs | 11 +++-------- 2 files changed, 6 insertions(+), 16 deletions(-) diff --git a/compiler/mono/src/borrow.rs b/compiler/mono/src/borrow.rs index 291e1a024d..54808abfaf 100644 --- a/compiler/mono/src/borrow.rs +++ b/compiler/mono/src/borrow.rs @@ -371,10 +371,8 @@ impl<'a> BorrowInfState<'a> { arg_layouts, .. } => { - let top_level = TopLevelFunctionLayout { - arguments: arg_layouts, - result: *ret_layout, - }; + let top_level = TopLevelFunctionLayout::new(self.arena, arg_layouts, *ret_layout); + // get the borrow signature of the applied function let ps = self .param_map @@ -611,10 +609,7 @@ impl<'a> BorrowInfState<'a> { Stmt::Ret(z), ) = (v, b) { - let top_level = TopLevelFunctionLayout { - arguments: arg_layouts, - result: *ret_layout, - }; + let top_level = TopLevelFunctionLayout::new(self.arena, arg_layouts, *ret_layout); if self.current_proc == *g && x == *z { // anonymous functions (for which the ps may not be known) diff --git a/compiler/mono/src/inc_dec.rs b/compiler/mono/src/inc_dec.rs index ddcfcc8bed..0e9964a8f5 100644 --- a/compiler/mono/src/inc_dec.rs +++ b/compiler/mono/src/inc_dec.rs @@ -687,10 +687,7 @@ impl<'a> Context<'a> { arg_layouts, .. } => { - let top_level = TopLevelFunctionLayout { - arguments: arg_layouts, - result: *ret_layout, - }; + let top_level = TopLevelFunctionLayout::new(self.arena, arg_layouts, *ret_layout); // get the borrow signature let ps = self @@ -979,10 +976,8 @@ impl<'a> Context<'a> { arg_layouts, .. } => { - let top_level = TopLevelFunctionLayout { - arguments: arg_layouts, - result: *ret_layout, - }; + let top_level = + TopLevelFunctionLayout::new(self.arena, arg_layouts, *ret_layout); // get the borrow signature let ps = self