feat(library/export): take binder labels into account when max-sharing expression during .olean generation
This commit is contained in:
parent
3057dde885
commit
abbb2cfbbd
1 changed files with 8 additions and 10 deletions
|
@ -8,7 +8,6 @@ Author: Leonardo de Moura
|
||||||
#include "kernel/expr_maps.h"
|
#include "kernel/expr_maps.h"
|
||||||
#include "kernel/for_each_fn.h"
|
#include "kernel/for_each_fn.h"
|
||||||
#include "kernel/inductive/inductive.h"
|
#include "kernel/inductive/inductive.h"
|
||||||
#include "library/max_sharing.h"
|
|
||||||
#include "library/module.h"
|
#include "library/module.h"
|
||||||
#include "library/unfold_macros.h"
|
#include "library/unfold_macros.h"
|
||||||
|
|
||||||
|
@ -25,10 +24,9 @@ class exporter {
|
||||||
environment m_env;
|
environment m_env;
|
||||||
bool m_all;
|
bool m_all;
|
||||||
name_set m_exported;
|
name_set m_exported;
|
||||||
max_sharing_fn m_max_sharing;
|
|
||||||
name_hmap<unsigned> m_name2idx;
|
name_hmap<unsigned> m_name2idx;
|
||||||
level_map<unsigned> m_level2idx;
|
level_map<unsigned> m_level2idx;
|
||||||
expr_map<unsigned> m_expr2idx;
|
expr_bi_struct_map<unsigned> m_expr2idx;
|
||||||
|
|
||||||
void mark(name const & n) {
|
void mark(name const & n) {
|
||||||
m_exported.insert(n);
|
m_exported.insert(n);
|
||||||
|
@ -180,7 +178,7 @@ class exporter {
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned export_root_expr(expr const & e) {
|
unsigned export_root_expr(expr const & e) {
|
||||||
return export_expr(m_max_sharing(unfold_all_macros(m_env, e)));
|
return export_expr(unfold_all_macros(m_env, e));
|
||||||
}
|
}
|
||||||
|
|
||||||
void export_dependencies(expr const & e) {
|
void export_dependencies(expr const & e) {
|
||||||
|
|
Loading…
Reference in a new issue