mirror of
https://github.com/roc-lang/roc.git
synced 2025-07-24 15:03:46 +00:00
start drop_specialization
This commit is contained in:
parent
5dff66ae16
commit
00fcdd1a41
6 changed files with 686 additions and 18 deletions
|
@ -16,7 +16,7 @@ use roc_can::module::{
|
|||
};
|
||||
use roc_collections::{default_hasher, BumpMap, MutMap, MutSet, VecMap, VecSet};
|
||||
use roc_constrain::module::constrain_module;
|
||||
use roc_debug_flags::dbg_do;
|
||||
use roc_debug_flags::{dbg_do, ROC_PRINT_IR_AFTER_DROP_SPECIALIZATION};
|
||||
#[cfg(debug_assertions)]
|
||||
use roc_debug_flags::{
|
||||
ROC_CHECK_MONO_IR, ROC_PRINT_IR_AFTER_REFCOUNT, ROC_PRINT_IR_AFTER_RESET_REUSE,
|
||||
|
@ -30,7 +30,6 @@ use roc_module::symbol::{
|
|||
IdentIds, IdentIdsByModule, Interns, ModuleId, ModuleIds, PQModuleName, PackageModuleIds,
|
||||
PackageQualified, Symbol,
|
||||
};
|
||||
use roc_mono::inc_dec;
|
||||
use roc_mono::ir::{
|
||||
CapturedSymbols, ExternalSpecializations, GlueLayouts, LambdaSetId, PartialProc, Proc,
|
||||
ProcLayout, Procs, ProcsBase, UpdateModeIds,
|
||||
|
@ -40,6 +39,7 @@ use roc_mono::layout::{
|
|||
GlobalLayoutInterner, LambdaName, Layout, LayoutCache, LayoutProblem, Niche, STLayoutInterner,
|
||||
};
|
||||
use roc_mono::reset_reuse;
|
||||
use roc_mono::{drop_specialization, inc_dec};
|
||||
use roc_packaging::cache::RocCacheDir;
|
||||
use roc_parse::ast::{
|
||||
self, CommentOrNewline, Defs, Expr, ExtractSpaces, Pattern, Spaced, StrLiteral, TypeAnnotation,
|
||||
|
@ -3121,6 +3121,21 @@ fn update<'a>(
|
|||
|
||||
debug_print_ir!(state, &layout_interner, ROC_PRINT_IR_AFTER_RESET_REUSE);
|
||||
|
||||
drop_specialization::specialize_drops(
|
||||
arena,
|
||||
&layout_interner,
|
||||
module_id,
|
||||
ident_ids,
|
||||
&mut update_mode_ids,
|
||||
&mut state.procedures,
|
||||
);
|
||||
|
||||
debug_print_ir!(
|
||||
state,
|
||||
&layout_interner,
|
||||
ROC_PRINT_IR_AFTER_DROP_SPECIALIZATION
|
||||
);
|
||||
|
||||
// This is not safe with the new non-recursive RC updates that we do for tag unions
|
||||
//
|
||||
// Proc::optimize_refcount_operations(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue