Merge pull request #3392 from rtfeldman/wasm-boxed-eq-and-refcount

Dev backends: Eq and refcount for Boxed layout
This commit is contained in:
Folkert de Vries 2022-07-04 13:17:37 +02:00 committed by GitHub
commit 1441e8c347
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 181 additions and 17 deletions

View file

@ -286,11 +286,11 @@ impl<'a> CodeGenHelp<'a> {
&mut self,
ident_ids: &mut IdentIds,
ctx: &mut Context<'a>,
layout: Layout<'a>,
orig_layout: Layout<'a>,
) -> Symbol {
use HelperOp::*;
let layout = self.replace_rec_ptr(ctx, layout);
let layout = self.replace_rec_ptr(ctx, orig_layout);
let found = self
.specializations
@ -454,7 +454,9 @@ impl<'a> CodeGenHelp<'a> {
layout
}
Layout::Boxed(inner) => self.replace_rec_ptr(ctx, *inner),
Layout::Boxed(inner) => {
Layout::Boxed(self.arena.alloc(self.replace_rec_ptr(ctx, *inner)))
}
Layout::LambdaSet(lambda_set) => {
self.replace_rec_ptr(ctx, lambda_set.runtime_representation())