diff --git a/src/Init/Core.lean b/src/Init/Core.lean index 27887602fcaa..9e6e75c85fee 100644 --- a/src/Init/Core.lean +++ b/src/Init/Core.lean @@ -38,6 +38,7 @@ attribute [simp] namedPattern Thunks are "lazy" values that are evaluated when first accessed using `Thunk.get/map/bind`. The value is then stored and not recomputed for all further accesses. -/ -- NOTE: the runtime has special support for the `Thunk` type to implement this behavior +@[opaque_repr] structure Thunk (α : Type u) : Type u where /-- Constructs a new thunk from a function `Unit → α` that will be called when the thunk is forced. -/ @@ -359,6 +360,7 @@ possibly being computed on another thread. This is similar to `Future` in Scala, The tasks have an overridden representation in the runtime. -/ +@[opaque_repr] structure Task (α : Type u) : Type u where /-- `Task.pure (a : α)` constructs a task that is already resolved with value `a`. -/ pure :: diff --git a/src/Init/Data/ByteArray/Basic.lean b/src/Init/Data/ByteArray/Basic.lean index 8146a169d086..8cda9e2134fc 100644 --- a/src/Init/Data/ByteArray/Basic.lean +++ b/src/Init/Data/ByteArray/Basic.lean @@ -10,6 +10,7 @@ import Init.Data.UInt.Basic import Init.Data.Option.Basic universe u +@[opaque_repr] structure ByteArray where data : Array UInt8 diff --git a/src/Init/Data/Float.lean b/src/Init/Data/Float.lean index d45a565bb6e7..d0add2dc8e53 100644 --- a/src/Init/Data/Float.lean +++ b/src/Init/Data/Float.lean @@ -26,6 +26,7 @@ opaque floatSpec : FloatSpec := { decLe := fun _ _ => inferInstanceAs (Decidable True) } +@[opaque_repr] structure Float where val : floatSpec.float diff --git a/src/Init/Data/FloatArray/Basic.lean b/src/Init/Data/FloatArray/Basic.lean index 0c47834383c1..c607f0263c47 100644 --- a/src/Init/Data/FloatArray/Basic.lean +++ b/src/Init/Data/FloatArray/Basic.lean @@ -9,6 +9,7 @@ import Init.Data.Float import Init.Data.Option.Basic universe u +@[opaque_repr] structure FloatArray where data : Array Float diff --git a/src/Init/Data/Int/Basic.lean b/src/Init/Data/Int/Basic.lean index b9327857950b..69ad0c111eda 100644 --- a/src/Init/Data/Int/Basic.lean +++ b/src/Init/Data/Int/Basic.lean @@ -37,6 +37,7 @@ and larger numbers use an arbitrary precision "bignum" library (usually [GMP](https://gmplib.org/)). A "small number" is an integer that can be encoded with 63 bits (31 bits on 32-bits architectures). -/ +@[opaque_repr] inductive Int : Type where /-- A natural number is an integer (`0` to `∞`). -/ | ofNat : Nat → Int diff --git a/src/Init/Prelude.lean b/src/Init/Prelude.lean index c3bb42d9bb9d..4e45708e8154 100644 --- a/src/Init/Prelude.lean +++ b/src/Init/Prelude.lean @@ -1035,6 +1035,7 @@ This type is special-cased by both the kernel and the compiler: to 2^63 directly and larger numbers use an arbitrary precision "bignum" library (usually [GMP](https://gmplib.org/)). -/ +@[opaque_repr] inductive Nat where /-- `Nat.zero`, normally written `0 : Nat`, is the smallest natural number. This is one of the two constructors of `Nat`. -/ @@ -1780,6 +1781,7 @@ def UInt8.size : Nat := 256 The type of unsigned 8-bit integers. This type has special support in the compiler to make it actually 8 bits rather than wrapping a `Nat`. -/ +@[opaque_repr] structure UInt8 where /-- Unpack a `UInt8` as a `Nat` less than `2^8`. This function is overridden with a native implementation. -/ @@ -1819,6 +1821,7 @@ def UInt16.size : Nat := 65536 The type of unsigned 16-bit integers. This type has special support in the compiler to make it actually 16 bits rather than wrapping a `Nat`. -/ +@[opaque_repr] structure UInt16 where /-- Unpack a `UInt16` as a `Nat` less than `2^16`. This function is overridden with a native implementation. -/ @@ -1858,6 +1861,7 @@ def UInt32.size : Nat := 4294967296 The type of unsigned 32-bit integers. This type has special support in the compiler to make it actually 32 bits rather than wrapping a `Nat`. -/ +@[opaque_repr] structure UInt32 where /-- Unpack a `UInt32` as a `Nat` less than `2^32`. This function is overridden with a native implementation. -/ @@ -1934,6 +1938,7 @@ def UInt64.size : Nat := 18446744073709551616 The type of unsigned 64-bit integers. This type has special support in the compiler to make it actually 64 bits rather than wrapping a `Nat`. -/ +@[opaque_repr] structure UInt64 where /-- Unpack a `UInt64` as a `Nat` less than `2^64`. This function is overridden with a native implementation. -/ @@ -1985,6 +1990,7 @@ for the platform's architecture. For example, if running on a 32-bit machine, USize is equivalent to UInt32. Or on a 64-bit machine, UInt64. -/ +@[opaque_repr] structure USize where /-- Unpack a `USize` as a `Nat` less than `USize.size`. This function is overridden with a native implementation. -/ @@ -2268,6 +2274,7 @@ def List.get {α : Type u} : (as : List α) → Fin as.length → α The compiler overrides the data representation of this type to a byte sequence, and both `String.utf8ByteSize` and `String.length` are cached and O(1). -/ +@[opaque_repr] structure String where /-- Pack a `List Char` into a `String`. This function is overridden by the compiler and is O(n) in the length of the list. -/ @@ -2492,6 +2499,7 @@ as they are used "linearly" all updates will be performed destructively on the array, so it has comparable performance to mutable arrays in imperative programming languages. -/ +@[opaque_repr] structure Array (α : Type u) where /-- Convert a `List α` into an `Array α`. This function is overridden to `List.toArray` and is O(n) in the length of the list. -/ diff --git a/src/Lean/Compiler.lean b/src/Lean/Compiler.lean index 55b38b3efd77..06297c962b00 100644 --- a/src/Lean/Compiler.lean +++ b/src/Lean/Compiler.lean @@ -10,6 +10,7 @@ import Lean.Compiler.ClosedTermCache import Lean.Compiler.ExternAttr import Lean.Compiler.ImplementedByAttr import Lean.Compiler.NeverExtractAttr +import Lean.Compiler.OpaqueReprAttr import Lean.Compiler.IR import Lean.Compiler.CSimpAttr import Lean.Compiler.FFI diff --git a/src/Lean/Compiler/LCNF/MonoTypes.lean b/src/Lean/Compiler/LCNF/MonoTypes.lean index 0d90433ac41c..4e3debab1d6b 100644 --- a/src/Lean/Compiler/LCNF/MonoTypes.lean +++ b/src/Lean/Compiler/LCNF/MonoTypes.lean @@ -4,6 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE. Authors: Leonardo de Moura -/ import Lean.Meta.InferType +import Lean.Compiler.OpaqueReprAttr import Lean.Compiler.LCNF.Util import Lean.Compiler.LCNF.BaseTypes import Lean.Compiler.LCNF.CompilerM @@ -41,7 +42,7 @@ Return `some fieldIdx` if `declName` is the name of an inductive datatype s.t. - This constructor has only one computationally relevant field. -/ def hasTrivialStructure? (declName : Name) : CoreM (Option TrivialStructureInfo) := do - if isRuntimeBultinType declName then return none + if hasOpaqueReprAttribute (← getEnv) declName then return none let .inductInfo info ← getConstInfo declName | return none if info.isUnsafe || info.isRec then return none let [ctorName] := info.ctors | return none @@ -128,4 +129,4 @@ def getOtherDeclMonoType (declName : Name) : CoreM Expr := do modifyEnv fun env => monoTypeExt.modifyState env fun s => { s with mono := s.mono.insert declName type } return type -end Lean.Compiler.LCNF \ No newline at end of file +end Lean.Compiler.LCNF diff --git a/src/Lean/Compiler/LCNF/ToLCNF.lean b/src/Lean/Compiler/LCNF/ToLCNF.lean index 6110dbc16492..a458c8e4eb45 100644 --- a/src/Lean/Compiler/LCNF/ToLCNF.lean +++ b/src/Lean/Compiler/LCNF/ToLCNF.lean @@ -5,6 +5,7 @@ Authors: Leonardo de Moura -/ import Lean.ProjFns import Lean.Compiler.BorrowedAnnotation +import Lean.Compiler.OpaqueReprAttr import Lean.Compiler.LCNF.Types import Lean.Compiler.LCNF.Bind import Lean.Compiler.LCNF.InferType @@ -644,7 +645,7 @@ where visitProjFn (projInfo : ProjectionFunctionInfo) (e : Expr) : M Arg := do let typeName := projInfo.ctorName.getPrefix - if isRuntimeBultinType typeName then + if hasOpaqueReprAttribute (← getEnv) typeName then let numArgs := e.getAppNumArgs let arity := projInfo.numParams + 1 if numArgs < arity then diff --git a/src/Lean/Compiler/LCNF/Util.lean b/src/Lean/Compiler/LCNF/Util.lean index a1c7f82c00c2..a5b778a370ea 100644 --- a/src/Lean/Compiler/LCNF/Util.lean +++ b/src/Lean/Compiler/LCNF/Util.lean @@ -72,22 +72,4 @@ def getCtorArity? (declName : Name) : CoreM (Option Nat) := do let .ctorInfo val ← getConstInfo declName | return none return val.numParams + val.numFields -/-- -List of types that have builtin runtime support --/ -def builtinRuntimeTypes : List Name := [ - ``String, - ``UInt8, ``UInt16, ``UInt32, ``UInt64, ``USize, - ``Float, - ``Thunk, ``Task, - ``Array, ``ByteArray, ``FloatArray, - ``Nat, ``Int -] - -/-- -Return `true` iff `declName` is the name of a type with builtin support in the runtime. --/ -def isRuntimeBultinType (declName : Name) : Bool := - builtinRuntimeTypes.contains declName - end Lean.Compiler.LCNF diff --git a/src/Lean/Compiler/OpaqueReprAttr.lean b/src/Lean/Compiler/OpaqueReprAttr.lean new file mode 100644 index 000000000000..93c1ed9f90b7 --- /dev/null +++ b/src/Lean/Compiler/OpaqueReprAttr.lean @@ -0,0 +1,18 @@ +/- +Copyright (c) 2019 Microsoft Corporation. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Leonardo de Moura +-/ +import Lean.Environment +import Lean.Attributes + +namespace Lean + +builtin_initialize opaqueReprAttr : TagAttribute ← + registerTagAttribute `opaque_repr "instruct the compiler that this type has an opaque representation, and should not be treated as a wrapper type." + +@[export lean_has_opaque_repr_attribute] +def hasOpaqueReprAttribute (env : Environment) (n : Name) : Bool := + opaqueReprAttr.hasTag env n + +end Lean diff --git a/src/library/compiler/lcnf.cpp b/src/library/compiler/lcnf.cpp index af2af4245272..80b9544350ba 100644 --- a/src/library/compiler/lcnf.cpp +++ b/src/library/compiler/lcnf.cpp @@ -112,7 +112,7 @@ class to_lcnf_fn { name const & k = pinfo.get_constructor(); constructor_val k_val = env().get(k).to_constructor_val(); name const & I_name = k_val.get_induct(); - if (is_runtime_builtin_type(I_name)) { + if (has_opaque_repr_attribute(env(), I_name)) { /* We should not expand projections of runtime builtin types */ return visit_app_default(fn, args, root); } else { diff --git a/src/library/compiler/util.cpp b/src/library/compiler/util.cpp index 789cfb0aac29..63675504383f 100644 --- a/src/library/compiler/util.cpp +++ b/src/library/compiler/util.cpp @@ -376,24 +376,9 @@ bool is_llnf_void_type(expr const & e) { return e == *g_void_type; } -bool is_runtime_builtin_type(name const & n) { - /* TODO(Leo): use an attribute? */ - return - n == get_string_name() || - n == get_uint8_name() || - n == get_uint16_name() || - n == get_uint32_name() || - n == get_uint64_name() || - n == get_usize_name() || - n == get_float_name() || - n == get_thunk_name() || - n == get_task_name() || - n == get_array_name() || - n == get_mut_quot_name() || - n == get_byte_array_name() || - n == get_float_array_name() || - n == get_nat_name() || - n == get_int_name(); +extern "C" uint8 lean_has_opaque_repr_attribute(object* env, object *n); +bool has_opaque_repr_attribute(environment const & env, name const & n) { + return lean_has_opaque_repr_attribute(env.to_obj_arg(), n.to_obj_arg()); } bool is_runtime_scalar_type(name const & n) { @@ -454,7 +439,7 @@ bool depends_on(expr const & e, name_hash_set const & s) { } optional has_trivial_structure(environment const & env, name const & I_name) { - if (is_runtime_builtin_type(I_name)) + if (has_opaque_repr_attribute(env, I_name)) return optional(); inductive_val I_val = env.get(I_name).to_inductive_val(); if (I_val.is_unsafe()) diff --git a/src/library/compiler/util.h b/src/library/compiler/util.h index bb7e45788403..d5085c6d5fd9 100644 --- a/src/library/compiler/util.h +++ b/src/library/compiler/util.h @@ -149,10 +149,10 @@ expr mk_runtime_type(type_checker::state & st, local_ctx const & lctx, expr e); // ======================================= -/* Return true if `n` is the name of a type with builtin support in the code generator. */ -bool is_runtime_builtin_type(name const & n); -inline bool is_runtime_builtin_type(expr const & e) { - return is_constant(e) && is_runtime_builtin_type(const_name(e)); +/* Return true if `n` has the `[opaque_repr]` attribute, used to suppress the 'trivial structure' optimization. */ +bool has_opaque_repr_attribute(environment const & env, name const & n); +inline bool has_opaque_repr_attribute(environment const & env, expr const & e) { + return is_constant(e) && has_opaque_repr_attribute(env, const_name(e)); } /* Return true if `n` is the name of a type that is treated as a scalar type by the code generator. */ diff --git a/src/library/constants.cpp b/src/library/constants.cpp index 2aa91ce25e24..402ba8440708 100644 --- a/src/library/constants.cpp +++ b/src/library/constants.cpp @@ -67,7 +67,6 @@ name const * g_ite = nullptr; name const * g_lc_proof = nullptr; name const * g_lc_unreachable = nullptr; name const * g_list = nullptr; -name const * g_mut_quot = nullptr; name const * g_nat = nullptr; name const * g_nat_succ = nullptr; name const * g_nat_zero = nullptr; @@ -237,8 +236,6 @@ void initialize_constants() { mark_persistent(g_lc_unreachable->raw()); g_list = new name{"List"}; mark_persistent(g_list->raw()); - g_mut_quot = new name{"MutQuot"}; - mark_persistent(g_mut_quot->raw()); g_nat = new name{"Nat"}; mark_persistent(g_nat->raw()); g_nat_succ = new name{"Nat", "succ"}; @@ -385,7 +382,6 @@ void finalize_constants() { delete g_lc_proof; delete g_lc_unreachable; delete g_list; - delete g_mut_quot; delete g_nat; delete g_nat_succ; delete g_nat_zero; @@ -491,7 +487,6 @@ name const & get_ite_name() { return *g_ite; } name const & get_lc_proof_name() { return *g_lc_proof; } name const & get_lc_unreachable_name() { return *g_lc_unreachable; } name const & get_list_name() { return *g_list; } -name const & get_mut_quot_name() { return *g_mut_quot; } name const & get_nat_name() { return *g_nat; } name const & get_nat_succ_name() { return *g_nat_succ; } name const & get_nat_zero_name() { return *g_nat_zero; } diff --git a/src/library/constants.h b/src/library/constants.h index 6bdde996092e..5168bbf56aa7 100644 --- a/src/library/constants.h +++ b/src/library/constants.h @@ -69,7 +69,6 @@ name const & get_ite_name(); name const & get_lc_proof_name(); name const & get_lc_unreachable_name(); name const & get_list_name(); -name const & get_mut_quot_name(); name const & get_nat_name(); name const & get_nat_succ_name(); name const & get_nat_zero_name(); diff --git a/src/library/constants.txt b/src/library/constants.txt index 481a20aa57cc..5038c202cc84 100644 --- a/src/library/constants.txt +++ b/src/library/constants.txt @@ -62,7 +62,6 @@ ite lcProof lcUnreachable List -MutQuot Nat Nat.succ Nat.zero diff --git a/stage0/src/library/compiler/lcnf.cpp b/stage0/src/library/compiler/lcnf.cpp index af2af4245272..80b9544350ba 100644 --- a/stage0/src/library/compiler/lcnf.cpp +++ b/stage0/src/library/compiler/lcnf.cpp @@ -112,7 +112,7 @@ class to_lcnf_fn { name const & k = pinfo.get_constructor(); constructor_val k_val = env().get(k).to_constructor_val(); name const & I_name = k_val.get_induct(); - if (is_runtime_builtin_type(I_name)) { + if (has_opaque_repr_attribute(env(), I_name)) { /* We should not expand projections of runtime builtin types */ return visit_app_default(fn, args, root); } else { diff --git a/stage0/src/library/compiler/util.cpp b/stage0/src/library/compiler/util.cpp index 789cfb0aac29..63675504383f 100644 --- a/stage0/src/library/compiler/util.cpp +++ b/stage0/src/library/compiler/util.cpp @@ -376,24 +376,9 @@ bool is_llnf_void_type(expr const & e) { return e == *g_void_type; } -bool is_runtime_builtin_type(name const & n) { - /* TODO(Leo): use an attribute? */ - return - n == get_string_name() || - n == get_uint8_name() || - n == get_uint16_name() || - n == get_uint32_name() || - n == get_uint64_name() || - n == get_usize_name() || - n == get_float_name() || - n == get_thunk_name() || - n == get_task_name() || - n == get_array_name() || - n == get_mut_quot_name() || - n == get_byte_array_name() || - n == get_float_array_name() || - n == get_nat_name() || - n == get_int_name(); +extern "C" uint8 lean_has_opaque_repr_attribute(object* env, object *n); +bool has_opaque_repr_attribute(environment const & env, name const & n) { + return lean_has_opaque_repr_attribute(env.to_obj_arg(), n.to_obj_arg()); } bool is_runtime_scalar_type(name const & n) { @@ -454,7 +439,7 @@ bool depends_on(expr const & e, name_hash_set const & s) { } optional has_trivial_structure(environment const & env, name const & I_name) { - if (is_runtime_builtin_type(I_name)) + if (has_opaque_repr_attribute(env, I_name)) return optional(); inductive_val I_val = env.get(I_name).to_inductive_val(); if (I_val.is_unsafe()) diff --git a/stage0/src/library/compiler/util.h b/stage0/src/library/compiler/util.h index bb7e45788403..d5085c6d5fd9 100644 --- a/stage0/src/library/compiler/util.h +++ b/stage0/src/library/compiler/util.h @@ -149,10 +149,10 @@ expr mk_runtime_type(type_checker::state & st, local_ctx const & lctx, expr e); // ======================================= -/* Return true if `n` is the name of a type with builtin support in the code generator. */ -bool is_runtime_builtin_type(name const & n); -inline bool is_runtime_builtin_type(expr const & e) { - return is_constant(e) && is_runtime_builtin_type(const_name(e)); +/* Return true if `n` has the `[opaque_repr]` attribute, used to suppress the 'trivial structure' optimization. */ +bool has_opaque_repr_attribute(environment const & env, name const & n); +inline bool has_opaque_repr_attribute(environment const & env, expr const & e) { + return is_constant(e) && has_opaque_repr_attribute(env, const_name(e)); } /* Return true if `n` is the name of a type that is treated as a scalar type by the code generator. */ diff --git a/stage0/src/library/constants.cpp b/stage0/src/library/constants.cpp index 2aa91ce25e24..402ba8440708 100644 --- a/stage0/src/library/constants.cpp +++ b/stage0/src/library/constants.cpp @@ -67,7 +67,6 @@ name const * g_ite = nullptr; name const * g_lc_proof = nullptr; name const * g_lc_unreachable = nullptr; name const * g_list = nullptr; -name const * g_mut_quot = nullptr; name const * g_nat = nullptr; name const * g_nat_succ = nullptr; name const * g_nat_zero = nullptr; @@ -237,8 +236,6 @@ void initialize_constants() { mark_persistent(g_lc_unreachable->raw()); g_list = new name{"List"}; mark_persistent(g_list->raw()); - g_mut_quot = new name{"MutQuot"}; - mark_persistent(g_mut_quot->raw()); g_nat = new name{"Nat"}; mark_persistent(g_nat->raw()); g_nat_succ = new name{"Nat", "succ"}; @@ -385,7 +382,6 @@ void finalize_constants() { delete g_lc_proof; delete g_lc_unreachable; delete g_list; - delete g_mut_quot; delete g_nat; delete g_nat_succ; delete g_nat_zero; @@ -491,7 +487,6 @@ name const & get_ite_name() { return *g_ite; } name const & get_lc_proof_name() { return *g_lc_proof; } name const & get_lc_unreachable_name() { return *g_lc_unreachable; } name const & get_list_name() { return *g_list; } -name const & get_mut_quot_name() { return *g_mut_quot; } name const & get_nat_name() { return *g_nat; } name const & get_nat_succ_name() { return *g_nat_succ; } name const & get_nat_zero_name() { return *g_nat_zero; } diff --git a/stage0/src/library/constants.h b/stage0/src/library/constants.h index 6bdde996092e..5168bbf56aa7 100644 --- a/stage0/src/library/constants.h +++ b/stage0/src/library/constants.h @@ -69,7 +69,6 @@ name const & get_ite_name(); name const & get_lc_proof_name(); name const & get_lc_unreachable_name(); name const & get_list_name(); -name const & get_mut_quot_name(); name const & get_nat_name(); name const & get_nat_succ_name(); name const & get_nat_zero_name(); diff --git a/stage0/src/library/constants.txt b/stage0/src/library/constants.txt index 481a20aa57cc..5038c202cc84 100644 --- a/stage0/src/library/constants.txt +++ b/stage0/src/library/constants.txt @@ -62,7 +62,6 @@ ite lcProof lcUnreachable List -MutQuot Nat Nat.succ Nat.zero diff --git a/stage0/src/runtime/compact.cpp b/stage0/src/runtime/compact.cpp index 1d899fd155c5..b2269a4cd631 100644 --- a/stage0/src/runtime/compact.cpp +++ b/stage0/src/runtime/compact.cpp @@ -168,14 +168,16 @@ void object_compactor::insert_string(object * o) { bool object_compactor::insert_constructor(object * o) { std::vector & offsets = m_tmp; - offsets.clear(); bool missing_children = false; unsigned num_objs = lean_ctor_num_objs(o); - for (unsigned i = 0; i < num_objs; i++) { + offsets.resize(num_objs); + unsigned i = num_objs; + while (i > 0) { + i--; object_offset c = to_offset(cnstr_get(o, i)); if (c == g_null_offset) missing_children = true; - offsets.push_back(c); + offsets[i] = c; } if (missing_children) return false; @@ -197,15 +199,17 @@ bool object_compactor::insert_constructor(object * o) { bool object_compactor::insert_array(object * o) { std::vector & offsets = m_tmp; - offsets.clear(); bool missing_children = false; size_t sz = array_size(o); + offsets.resize(sz); // std::cout << sz << " array\n"; - for (size_t i = 0; i < sz; i++) { + size_t i = sz; + while (i > 0) { + i--; object_offset c = to_offset(array_get(o, i)); if (c == g_null_offset) missing_children = true; - offsets.push_back(c); + offsets[i] = c; } if (missing_children) return false; diff --git a/stage0/stdlib/Lean/Compiler.c b/stage0/stdlib/Lean/Compiler.c index 0bae0b5c3ed8..45314e7e33fb 100644 --- a/stage0/stdlib/Lean/Compiler.c +++ b/stage0/stdlib/Lean/Compiler.c @@ -1,6 +1,6 @@ // Lean compiler output // Module: Lean.Compiler -// Imports: Init Lean.Compiler.InlineAttrs Lean.Compiler.Specialize Lean.Compiler.ConstFolding Lean.Compiler.ClosedTermCache Lean.Compiler.ExternAttr Lean.Compiler.ImplementedByAttr Lean.Compiler.NeverExtractAttr Lean.Compiler.IR Lean.Compiler.CSimpAttr Lean.Compiler.FFI Lean.Compiler.NoncomputableAttr Lean.Compiler.Main Lean.Compiler.AtMostOnce Lean.Compiler.Old +// Imports: Init Lean.Compiler.InlineAttrs Lean.Compiler.Specialize Lean.Compiler.ConstFolding Lean.Compiler.ClosedTermCache Lean.Compiler.ExternAttr Lean.Compiler.ImplementedByAttr Lean.Compiler.NeverExtractAttr Lean.Compiler.OpaqueReprAttr Lean.Compiler.IR Lean.Compiler.CSimpAttr Lean.Compiler.FFI Lean.Compiler.NoncomputableAttr Lean.Compiler.Main Lean.Compiler.AtMostOnce Lean.Compiler.Old #include #if defined(__clang__) #pragma clang diagnostic ignored "-Wunused-parameter" @@ -21,6 +21,7 @@ lean_object* initialize_Lean_Compiler_ClosedTermCache(uint8_t builtin, lean_obje lean_object* initialize_Lean_Compiler_ExternAttr(uint8_t builtin, lean_object*); lean_object* initialize_Lean_Compiler_ImplementedByAttr(uint8_t builtin, lean_object*); lean_object* initialize_Lean_Compiler_NeverExtractAttr(uint8_t builtin, lean_object*); +lean_object* initialize_Lean_Compiler_OpaqueReprAttr(uint8_t builtin, lean_object*); lean_object* initialize_Lean_Compiler_IR(uint8_t builtin, lean_object*); lean_object* initialize_Lean_Compiler_CSimpAttr(uint8_t builtin, lean_object*); lean_object* initialize_Lean_Compiler_FFI(uint8_t builtin, lean_object*); @@ -57,6 +58,9 @@ lean_dec_ref(res); res = initialize_Lean_Compiler_NeverExtractAttr(builtin, lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); +res = initialize_Lean_Compiler_OpaqueReprAttr(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); res = initialize_Lean_Compiler_IR(builtin, lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); diff --git a/stage0/stdlib/Lean/Compiler/IR/Checker.c b/stage0/stdlib/Lean/Compiler/IR/Checker.c index af1ece0af8d6..0e75d8aa1e6a 100644 --- a/stage0/stdlib/Lean/Compiler/IR/Checker.c +++ b/stage0/stdlib/Lean/Compiler/IR/Checker.c @@ -40,6 +40,7 @@ lean_object* lean_array_fget(lean_object*, lean_object*); lean_object* l_Lean_IR_getEnv___rarg(lean_object*); static lean_object* l_Lean_IR_Checker_checkType___closed__4; LEAN_EXPORT lean_object* l_Lean_IR_Checker_getMaxCtorFields(lean_object*); +LEAN_EXPORT lean_object* l_Lean_IR_Checker_getMaxCtorTag(lean_object*); static lean_object* l_Lean_IR_Checker_checkFullApp___closed__1; static lean_object* l_Lean_IR_Checker_checkType___closed__2; LEAN_EXPORT lean_object* l_Lean_IR_Checker_CheckerState_foundVars___default; @@ -48,6 +49,7 @@ uint8_t l_Lean_IR_LocalContext_isLocalVar(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_IR_Checker_checkExpr(lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_IR_Checker_getDecl(lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_IR_Checker_checkType___closed__3; +LEAN_EXPORT lean_object* l_Lean_IR_Checker_checkExpr___lambda__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_IR_checkDecl(lean_object*, lean_object*, lean_object*, lean_object*); size_t lean_usize_of_nat(lean_object*); uint8_t l_Lean_IR_IRType_isUnion(lean_object*); @@ -74,11 +76,13 @@ LEAN_EXPORT lean_object* l_Lean_IR_Checker_checkJP___boxed(lean_object*, lean_ob lean_object* l_Lean_IR_Decl_name(lean_object*); lean_object* l_Lean_IR_LocalContext_addParam(lean_object*, lean_object*); static lean_object* l_Lean_IR_Checker_checkObjType___closed__1; +static lean_object* l_Lean_IR_Checker_checkExpr___lambda__3___closed__1; static lean_object* l_Lean_IR_Checker_checkPartialApp___closed__1; uint8_t l_Lean_IR_IRType_isObj(lean_object*); static lean_object* l_Lean_IR_Checker_checkJP___closed__2; static lean_object* l_Lean_IR_Checker_markIndex___closed__2; static lean_object* l_Lean_IR_Checker_maxCtorScalarsSize___closed__1; +LEAN_EXPORT lean_object* l_Lean_IR_Checker_getMaxCtorTag___boxed(lean_object*); static lean_object* l_Lean_IR_Checker_checkPartialApp___closed__2; lean_object* l___private_Lean_Compiler_IR_Format_0__Lean_IR_formatIRType(lean_object*); LEAN_EXPORT lean_object* l_Lean_IR_checkDecl___boxed(lean_object*, lean_object*, lean_object*, lean_object*); @@ -95,22 +99,26 @@ extern lean_object* l_Std_Format_defWidth; static lean_object* l_Lean_IR_Checker_checkPartialApp___closed__3; LEAN_EXPORT lean_object* l_Lean_IR_checkDecls(lean_object*, lean_object*, lean_object*); uint8_t l_Lean_IR_LocalContext_isParam(lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_IR_Checker_checkExpr___lambda__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_IR_Checker_checkVar___closed__1; uint8_t l_Lean_IR_IRType_beq(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_foldlMUnsafe_fold___at_Lean_IR_Checker_checkFnBody___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_RBNode_findCore___at_Lean_IR_Checker_markIndex___spec__1___boxed(lean_object*, lean_object*); static lean_object* l_Lean_IR_Checker_markIndex___closed__1; +static lean_object* l_Lean_IR_Checker_checkExpr___closed__5; LEAN_EXPORT lean_object* l_Lean_IR_Checker_markIndex(lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_IR_Checker_checkFullApp___closed__3; LEAN_EXPORT lean_object* l_Lean_IR_Checker_withParams___boxed(lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_IR_Checker_checkExpr___lambda__2___closed__2; LEAN_EXPORT lean_object* l_Lean_IR_Checker_checkFullApp(lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_IR_Checker_maxCtorTag; LEAN_EXPORT lean_object* l_Lean_IR_Checker_checkArgs(lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_IR_Checker_checkVarType(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t lean_nat_dec_eq(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_IR_Checker_checkExpr___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t lean_nat_dec_lt(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_IR_Checker_checkPartialApp(lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_Lean_IR_Checker_maxCtorTag___closed__1; LEAN_EXPORT lean_object* l_Lean_IR_Checker_checkEqTypes(lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_IR_Checker_checkExpr___lambda__2___closed__1; LEAN_EXPORT lean_object* l_Lean_IR_Checker_checkExpr___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -202,6 +210,31 @@ x_1 = l_Lean_IR_Checker_maxCtorScalarsSize___closed__1; return x_1; } } +LEAN_EXPORT lean_object* l_Lean_IR_Checker_getMaxCtorTag___boxed(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_box(LeanMaxCtorTag); +return x_2; +} +} +static lean_object* _init_l_Lean_IR_Checker_maxCtorTag___closed__1() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = lean_box(0); +x_2 = lean_box(LeanMaxCtorTag); +return x_2; +} +} +static lean_object* _init_l_Lean_IR_Checker_maxCtorTag() { +_start: +{ +lean_object* x_1; +x_1 = l_Lean_IR_Checker_maxCtorTag___closed__1; +return x_1; +} +} LEAN_EXPORT lean_object* l_Lean_IR_Checker_getUSizeSize___boxed(lean_object* x_1) { _start: { @@ -2393,7 +2426,7 @@ return x_24; } } } -static lean_object* _init_l_Lean_IR_Checker_checkExpr___closed__1() { +static lean_object* _init_l_Lean_IR_Checker_checkExpr___lambda__3___closed__1() { _start: { lean_object* x_1; @@ -2401,11 +2434,60 @@ x_1 = lean_mk_string_from_bytes("' has too many fields", 21); return x_1; } } +LEAN_EXPORT lean_object* l_Lean_IR_Checker_checkExpr___lambda__3(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +_start: +{ +lean_object* x_7; lean_object* x_8; uint8_t x_9; +lean_dec(x_4); +x_7 = lean_ctor_get(x_2, 2); +lean_inc(x_7); +x_8 = l_Lean_IR_Checker_maxCtorFields; +x_9 = lean_nat_dec_lt(x_8, x_7); +lean_dec(x_7); +if (x_9 == 0) +{ +lean_object* x_10; lean_object* x_11; +x_10 = lean_box(0); +x_11 = l_Lean_IR_Checker_checkExpr___lambda__2(x_1, x_2, x_3, x_10, x_5, x_6); +return x_11; +} +else +{ +lean_object* x_12; uint8_t x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; +lean_dec(x_5); +lean_dec(x_1); +x_12 = lean_ctor_get(x_2, 0); +lean_inc(x_12); +lean_dec(x_2); +x_13 = 1; +x_14 = l_Lean_Name_toString(x_12, x_13); +x_15 = l_Lean_IR_Checker_checkExpr___lambda__2___closed__1; +x_16 = lean_string_append(x_15, x_14); +lean_dec(x_14); +x_17 = l_Lean_IR_Checker_checkExpr___lambda__3___closed__1; +x_18 = lean_string_append(x_16, x_17); +x_19 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_19, 0, x_18); +x_20 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_20, 0, x_19); +lean_ctor_set(x_20, 1, x_6); +return x_20; +} +} +} +static lean_object* _init_l_Lean_IR_Checker_checkExpr___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_from_bytes("tag for constructor '", 21); +return x_1; +} +} static lean_object* _init_l_Lean_IR_Checker_checkExpr___closed__2() { _start: { lean_object* x_1; -x_1 = lean_mk_string_from_bytes("unexpected IR type '", 20); +x_1 = lean_mk_string_from_bytes("' is too big, this is a limitation of the current runtime", 57); return x_1; } } @@ -2413,15 +2495,23 @@ static lean_object* _init_l_Lean_IR_Checker_checkExpr___closed__3() { _start: { lean_object* x_1; -x_1 = lean_mk_string_from_bytes("invalid proj index", 18); +x_1 = lean_mk_string_from_bytes("unexpected IR type '", 20); return x_1; } } static lean_object* _init_l_Lean_IR_Checker_checkExpr___closed__4() { _start: { +lean_object* x_1; +x_1 = lean_mk_string_from_bytes("invalid proj index", 18); +return x_1; +} +} +static lean_object* _init_l_Lean_IR_Checker_checkExpr___closed__5() { +_start: +{ lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_IR_Checker_checkExpr___closed__3; +x_1 = l_Lean_IR_Checker_checkExpr___closed__4; x_2 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_2, 0, x_1); return x_2; @@ -2433,837 +2523,898 @@ LEAN_EXPORT lean_object* l_Lean_IR_Checker_checkExpr(lean_object* x_1, lean_obje switch (lean_obj_tag(x_2)) { case 0: { -lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; uint8_t x_9; +lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_18; lean_object* x_19; uint8_t x_20; x_5 = lean_ctor_get(x_2, 0); lean_inc(x_5); x_6 = lean_ctor_get(x_2, 1); lean_inc(x_6); lean_dec(x_2); -x_7 = lean_ctor_get(x_5, 2); -lean_inc(x_7); -x_8 = l_Lean_IR_Checker_maxCtorFields; -x_9 = lean_nat_dec_lt(x_8, x_7); -lean_dec(x_7); -if (x_9 == 0) +x_18 = lean_ctor_get(x_5, 1); +lean_inc(x_18); +x_19 = l_Lean_IR_Checker_maxCtorTag; +x_20 = lean_nat_dec_lt(x_19, x_18); +lean_dec(x_18); +if (x_20 == 0) { -lean_object* x_10; lean_object* x_11; -x_10 = lean_box(0); -x_11 = l_Lean_IR_Checker_checkExpr___lambda__2(x_1, x_5, x_6, x_10, x_3, x_4); +lean_object* x_21; lean_object* x_22; +x_21 = lean_box(0); +x_22 = l_Lean_IR_Checker_checkExpr___lambda__3(x_1, x_5, x_6, x_21, x_3, x_4); lean_dec(x_6); -return x_11; +return x_22; } else { -lean_object* x_12; uint8_t x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; +lean_object* x_23; lean_object* x_24; uint8_t x_25; +x_23 = lean_ctor_get(x_5, 2); +lean_inc(x_23); +x_24 = lean_unsigned_to_nat(0u); +x_25 = lean_nat_dec_lt(x_24, x_23); +lean_dec(x_23); +if (x_25 == 0) +{ +lean_object* x_26; uint8_t x_27; +x_26 = lean_ctor_get(x_5, 3); +lean_inc(x_26); +x_27 = lean_nat_dec_lt(x_24, x_26); +lean_dec(x_26); +if (x_27 == 0) +{ +lean_object* x_28; uint8_t x_29; +x_28 = lean_ctor_get(x_5, 4); +lean_inc(x_28); +x_29 = lean_nat_dec_lt(x_24, x_28); +lean_dec(x_28); +if (x_29 == 0) +{ +lean_object* x_30; lean_object* x_31; +x_30 = lean_box(0); +x_31 = l_Lean_IR_Checker_checkExpr___lambda__3(x_1, x_5, x_6, x_30, x_3, x_4); +lean_dec(x_6); +return x_31; +} +else +{ +lean_object* x_32; lean_dec(x_6); lean_dec(x_3); lean_dec(x_1); -x_12 = lean_ctor_get(x_5, 0); -lean_inc(x_12); +x_32 = lean_box(0); +x_7 = x_32; +goto block_17; +} +} +else +{ +lean_object* x_33; +lean_dec(x_6); +lean_dec(x_3); +lean_dec(x_1); +x_33 = lean_box(0); +x_7 = x_33; +goto block_17; +} +} +else +{ +lean_object* x_34; +lean_dec(x_6); +lean_dec(x_3); +lean_dec(x_1); +x_34 = lean_box(0); +x_7 = x_34; +goto block_17; +} +} +block_17: +{ +lean_object* x_8; uint8_t x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; +lean_dec(x_7); +x_8 = lean_ctor_get(x_5, 0); +lean_inc(x_8); lean_dec(x_5); -x_13 = 1; -x_14 = l_Lean_Name_toString(x_12, x_13); -x_15 = l_Lean_IR_Checker_checkExpr___lambda__2___closed__1; -x_16 = lean_string_append(x_15, x_14); -lean_dec(x_14); -x_17 = l_Lean_IR_Checker_checkExpr___closed__1; -x_18 = lean_string_append(x_16, x_17); -x_19 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_19, 0, x_18); -x_20 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_20, 0, x_19); -lean_ctor_set(x_20, 1, x_4); -return x_20; +x_9 = 1; +x_10 = l_Lean_Name_toString(x_8, x_9); +x_11 = l_Lean_IR_Checker_checkExpr___closed__1; +x_12 = lean_string_append(x_11, x_10); +lean_dec(x_10); +x_13 = l_Lean_IR_Checker_checkExpr___closed__2; +x_14 = lean_string_append(x_12, x_13); +x_15 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_15, 0, x_14); +x_16 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_16, 0, x_15); +lean_ctor_set(x_16, 1, x_4); +return x_16; } } case 1: { -lean_object* x_21; lean_object* x_22; lean_object* x_23; -x_21 = lean_ctor_get(x_2, 1); -lean_inc(x_21); +lean_object* x_35; lean_object* x_36; lean_object* x_37; +x_35 = lean_ctor_get(x_2, 1); +lean_inc(x_35); lean_dec(x_2); lean_inc(x_3); -x_22 = l_Lean_IR_Checker_checkObjVar(x_21, x_3, x_4); -x_23 = lean_ctor_get(x_22, 0); -lean_inc(x_23); -if (lean_obj_tag(x_23) == 0) +x_36 = l_Lean_IR_Checker_checkObjVar(x_35, x_3, x_4); +x_37 = lean_ctor_get(x_36, 0); +lean_inc(x_37); +if (lean_obj_tag(x_37) == 0) { -uint8_t x_24; +uint8_t x_38; lean_dec(x_3); lean_dec(x_1); -x_24 = !lean_is_exclusive(x_22); -if (x_24 == 0) +x_38 = !lean_is_exclusive(x_36); +if (x_38 == 0) { -lean_object* x_25; uint8_t x_26; -x_25 = lean_ctor_get(x_22, 0); -lean_dec(x_25); -x_26 = !lean_is_exclusive(x_23); -if (x_26 == 0) +lean_object* x_39; uint8_t x_40; +x_39 = lean_ctor_get(x_36, 0); +lean_dec(x_39); +x_40 = !lean_is_exclusive(x_37); +if (x_40 == 0) { -return x_22; +return x_36; } else { -lean_object* x_27; lean_object* x_28; -x_27 = lean_ctor_get(x_23, 0); -lean_inc(x_27); -lean_dec(x_23); -x_28 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_28, 0, x_27); -lean_ctor_set(x_22, 0, x_28); -return x_22; +lean_object* x_41; lean_object* x_42; +x_41 = lean_ctor_get(x_37, 0); +lean_inc(x_41); +lean_dec(x_37); +x_42 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_42, 0, x_41); +lean_ctor_set(x_36, 0, x_42); +return x_36; } } else { -lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; -x_29 = lean_ctor_get(x_22, 1); -lean_inc(x_29); -lean_dec(x_22); -x_30 = lean_ctor_get(x_23, 0); -lean_inc(x_30); -if (lean_is_exclusive(x_23)) { - lean_ctor_release(x_23, 0); - x_31 = x_23; +lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; +x_43 = lean_ctor_get(x_36, 1); +lean_inc(x_43); +lean_dec(x_36); +x_44 = lean_ctor_get(x_37, 0); +lean_inc(x_44); +if (lean_is_exclusive(x_37)) { + lean_ctor_release(x_37, 0); + x_45 = x_37; } else { - lean_dec_ref(x_23); - x_31 = lean_box(0); + lean_dec_ref(x_37); + x_45 = lean_box(0); } -if (lean_is_scalar(x_31)) { - x_32 = lean_alloc_ctor(0, 1, 0); +if (lean_is_scalar(x_45)) { + x_46 = lean_alloc_ctor(0, 1, 0); } else { - x_32 = x_31; + x_46 = x_45; } -lean_ctor_set(x_32, 0, x_30); -x_33 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_33, 0, x_32); -lean_ctor_set(x_33, 1, x_29); -return x_33; +lean_ctor_set(x_46, 0, x_44); +x_47 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_47, 0, x_46); +lean_ctor_set(x_47, 1, x_43); +return x_47; } } else { -lean_object* x_34; lean_object* x_35; -lean_dec(x_23); -x_34 = lean_ctor_get(x_22, 1); -lean_inc(x_34); -lean_dec(x_22); -x_35 = l_Lean_IR_Checker_checkObjType(x_1, x_3, x_34); -return x_35; +lean_object* x_48; lean_object* x_49; +lean_dec(x_37); +x_48 = lean_ctor_get(x_36, 1); +lean_inc(x_48); +lean_dec(x_36); +x_49 = l_Lean_IR_Checker_checkObjType(x_1, x_3, x_48); +return x_49; } } case 2: { -lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; -x_36 = lean_ctor_get(x_2, 0); -lean_inc(x_36); -x_37 = lean_ctor_get(x_2, 2); -lean_inc(x_37); +lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; +x_50 = lean_ctor_get(x_2, 0); +lean_inc(x_50); +x_51 = lean_ctor_get(x_2, 2); +lean_inc(x_51); lean_dec(x_2); lean_inc(x_3); -x_38 = l_Lean_IR_Checker_checkObjVar(x_36, x_3, x_4); -x_39 = lean_ctor_get(x_38, 0); -lean_inc(x_39); -if (lean_obj_tag(x_39) == 0) +x_52 = l_Lean_IR_Checker_checkObjVar(x_50, x_3, x_4); +x_53 = lean_ctor_get(x_52, 0); +lean_inc(x_53); +if (lean_obj_tag(x_53) == 0) { -uint8_t x_40; -lean_dec(x_37); +uint8_t x_54; +lean_dec(x_51); lean_dec(x_3); lean_dec(x_1); -x_40 = !lean_is_exclusive(x_38); -if (x_40 == 0) +x_54 = !lean_is_exclusive(x_52); +if (x_54 == 0) { -lean_object* x_41; uint8_t x_42; -x_41 = lean_ctor_get(x_38, 0); -lean_dec(x_41); -x_42 = !lean_is_exclusive(x_39); -if (x_42 == 0) +lean_object* x_55; uint8_t x_56; +x_55 = lean_ctor_get(x_52, 0); +lean_dec(x_55); +x_56 = !lean_is_exclusive(x_53); +if (x_56 == 0) { -return x_38; +return x_52; } else { -lean_object* x_43; lean_object* x_44; -x_43 = lean_ctor_get(x_39, 0); -lean_inc(x_43); -lean_dec(x_39); -x_44 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_44, 0, x_43); -lean_ctor_set(x_38, 0, x_44); -return x_38; +lean_object* x_57; lean_object* x_58; +x_57 = lean_ctor_get(x_53, 0); +lean_inc(x_57); +lean_dec(x_53); +x_58 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_58, 0, x_57); +lean_ctor_set(x_52, 0, x_58); +return x_52; } } else { -lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; -x_45 = lean_ctor_get(x_38, 1); -lean_inc(x_45); -lean_dec(x_38); -x_46 = lean_ctor_get(x_39, 0); -lean_inc(x_46); -if (lean_is_exclusive(x_39)) { - lean_ctor_release(x_39, 0); - x_47 = x_39; +lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; +x_59 = lean_ctor_get(x_52, 1); +lean_inc(x_59); +lean_dec(x_52); +x_60 = lean_ctor_get(x_53, 0); +lean_inc(x_60); +if (lean_is_exclusive(x_53)) { + lean_ctor_release(x_53, 0); + x_61 = x_53; } else { - lean_dec_ref(x_39); - x_47 = lean_box(0); + lean_dec_ref(x_53); + x_61 = lean_box(0); } -if (lean_is_scalar(x_47)) { - x_48 = lean_alloc_ctor(0, 1, 0); +if (lean_is_scalar(x_61)) { + x_62 = lean_alloc_ctor(0, 1, 0); } else { - x_48 = x_47; + x_62 = x_61; } -lean_ctor_set(x_48, 0, x_46); -x_49 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_49, 0, x_48); -lean_ctor_set(x_49, 1, x_45); -return x_49; +lean_ctor_set(x_62, 0, x_60); +x_63 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_63, 0, x_62); +lean_ctor_set(x_63, 1, x_59); +return x_63; } } else { -lean_object* x_50; lean_object* x_51; lean_object* x_52; -lean_dec(x_39); -x_50 = lean_ctor_get(x_38, 1); -lean_inc(x_50); -lean_dec(x_38); +lean_object* x_64; lean_object* x_65; lean_object* x_66; +lean_dec(x_53); +x_64 = lean_ctor_get(x_52, 1); +lean_inc(x_64); +lean_dec(x_52); lean_inc(x_3); -x_51 = l_Lean_IR_Checker_checkArgs(x_37, x_3, x_50); -lean_dec(x_37); -x_52 = lean_ctor_get(x_51, 0); -lean_inc(x_52); -if (lean_obj_tag(x_52) == 0) +x_65 = l_Lean_IR_Checker_checkArgs(x_51, x_3, x_64); +lean_dec(x_51); +x_66 = lean_ctor_get(x_65, 0); +lean_inc(x_66); +if (lean_obj_tag(x_66) == 0) { -uint8_t x_53; +uint8_t x_67; lean_dec(x_3); lean_dec(x_1); -x_53 = !lean_is_exclusive(x_51); -if (x_53 == 0) +x_67 = !lean_is_exclusive(x_65); +if (x_67 == 0) { -lean_object* x_54; uint8_t x_55; -x_54 = lean_ctor_get(x_51, 0); -lean_dec(x_54); -x_55 = !lean_is_exclusive(x_52); -if (x_55 == 0) +lean_object* x_68; uint8_t x_69; +x_68 = lean_ctor_get(x_65, 0); +lean_dec(x_68); +x_69 = !lean_is_exclusive(x_66); +if (x_69 == 0) { -return x_51; +return x_65; } else { -lean_object* x_56; lean_object* x_57; -x_56 = lean_ctor_get(x_52, 0); -lean_inc(x_56); -lean_dec(x_52); -x_57 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_57, 0, x_56); -lean_ctor_set(x_51, 0, x_57); -return x_51; +lean_object* x_70; lean_object* x_71; +x_70 = lean_ctor_get(x_66, 0); +lean_inc(x_70); +lean_dec(x_66); +x_71 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_71, 0, x_70); +lean_ctor_set(x_65, 0, x_71); +return x_65; } } else { -lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; -x_58 = lean_ctor_get(x_51, 1); -lean_inc(x_58); -lean_dec(x_51); -x_59 = lean_ctor_get(x_52, 0); -lean_inc(x_59); -if (lean_is_exclusive(x_52)) { - lean_ctor_release(x_52, 0); - x_60 = x_52; +lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; +x_72 = lean_ctor_get(x_65, 1); +lean_inc(x_72); +lean_dec(x_65); +x_73 = lean_ctor_get(x_66, 0); +lean_inc(x_73); +if (lean_is_exclusive(x_66)) { + lean_ctor_release(x_66, 0); + x_74 = x_66; } else { - lean_dec_ref(x_52); - x_60 = lean_box(0); + lean_dec_ref(x_66); + x_74 = lean_box(0); } -if (lean_is_scalar(x_60)) { - x_61 = lean_alloc_ctor(0, 1, 0); +if (lean_is_scalar(x_74)) { + x_75 = lean_alloc_ctor(0, 1, 0); } else { - x_61 = x_60; + x_75 = x_74; } -lean_ctor_set(x_61, 0, x_59); -x_62 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_62, 0, x_61); -lean_ctor_set(x_62, 1, x_58); -return x_62; +lean_ctor_set(x_75, 0, x_73); +x_76 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_76, 0, x_75); +lean_ctor_set(x_76, 1, x_72); +return x_76; } } else { -lean_object* x_63; lean_object* x_64; -lean_dec(x_52); -x_63 = lean_ctor_get(x_51, 1); -lean_inc(x_63); -lean_dec(x_51); -x_64 = l_Lean_IR_Checker_checkObjType(x_1, x_3, x_63); -return x_64; +lean_object* x_77; lean_object* x_78; +lean_dec(x_66); +x_77 = lean_ctor_get(x_65, 1); +lean_inc(x_77); +lean_dec(x_65); +x_78 = l_Lean_IR_Checker_checkObjType(x_1, x_3, x_77); +return x_78; } } } case 3: { -lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; -x_65 = lean_ctor_get(x_2, 0); -lean_inc(x_65); -x_66 = lean_ctor_get(x_2, 1); -lean_inc(x_66); +lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; +x_79 = lean_ctor_get(x_2, 0); +lean_inc(x_79); +x_80 = lean_ctor_get(x_2, 1); +lean_inc(x_80); lean_dec(x_2); -x_67 = l_Lean_IR_Checker_getType(x_66, x_3, x_4); -x_68 = lean_ctor_get(x_67, 0); -lean_inc(x_68); -if (lean_obj_tag(x_68) == 0) +x_81 = l_Lean_IR_Checker_getType(x_80, x_3, x_4); +x_82 = lean_ctor_get(x_81, 0); +lean_inc(x_82); +if (lean_obj_tag(x_82) == 0) { -uint8_t x_69; -lean_dec(x_65); +uint8_t x_83; +lean_dec(x_79); lean_dec(x_3); lean_dec(x_1); -x_69 = !lean_is_exclusive(x_67); -if (x_69 == 0) +x_83 = !lean_is_exclusive(x_81); +if (x_83 == 0) { -lean_object* x_70; uint8_t x_71; -x_70 = lean_ctor_get(x_67, 0); -lean_dec(x_70); -x_71 = !lean_is_exclusive(x_68); -if (x_71 == 0) +lean_object* x_84; uint8_t x_85; +x_84 = lean_ctor_get(x_81, 0); +lean_dec(x_84); +x_85 = !lean_is_exclusive(x_82); +if (x_85 == 0) { -return x_67; +return x_81; } else { -lean_object* x_72; lean_object* x_73; -x_72 = lean_ctor_get(x_68, 0); -lean_inc(x_72); -lean_dec(x_68); -x_73 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_73, 0, x_72); -lean_ctor_set(x_67, 0, x_73); -return x_67; +lean_object* x_86; lean_object* x_87; +x_86 = lean_ctor_get(x_82, 0); +lean_inc(x_86); +lean_dec(x_82); +x_87 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_87, 0, x_86); +lean_ctor_set(x_81, 0, x_87); +return x_81; } } else { -lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; -x_74 = lean_ctor_get(x_67, 1); -lean_inc(x_74); -lean_dec(x_67); -x_75 = lean_ctor_get(x_68, 0); -lean_inc(x_75); -if (lean_is_exclusive(x_68)) { - lean_ctor_release(x_68, 0); - x_76 = x_68; +lean_object* x_88; lean_object* x_89; lean_object* x_90; lean_object* x_91; lean_object* x_92; +x_88 = lean_ctor_get(x_81, 1); +lean_inc(x_88); +lean_dec(x_81); +x_89 = lean_ctor_get(x_82, 0); +lean_inc(x_89); +if (lean_is_exclusive(x_82)) { + lean_ctor_release(x_82, 0); + x_90 = x_82; } else { - lean_dec_ref(x_68); - x_76 = lean_box(0); + lean_dec_ref(x_82); + x_90 = lean_box(0); } -if (lean_is_scalar(x_76)) { - x_77 = lean_alloc_ctor(0, 1, 0); +if (lean_is_scalar(x_90)) { + x_91 = lean_alloc_ctor(0, 1, 0); } else { - x_77 = x_76; + x_91 = x_90; } -lean_ctor_set(x_77, 0, x_75); -x_78 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_78, 0, x_77); -lean_ctor_set(x_78, 1, x_74); -return x_78; +lean_ctor_set(x_91, 0, x_89); +x_92 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_92, 0, x_91); +lean_ctor_set(x_92, 1, x_88); +return x_92; } } else { -uint8_t x_79; -x_79 = !lean_is_exclusive(x_68); -if (x_79 == 0) +uint8_t x_93; +x_93 = !lean_is_exclusive(x_82); +if (x_93 == 0) { -lean_object* x_80; -x_80 = lean_ctor_get(x_68, 0); -switch (lean_obj_tag(x_80)) { +lean_object* x_94; +x_94 = lean_ctor_get(x_82, 0); +switch (lean_obj_tag(x_94)) { case 7: { -lean_object* x_81; lean_object* x_82; -lean_free_object(x_68); -lean_dec(x_65); -x_81 = lean_ctor_get(x_67, 1); -lean_inc(x_81); -lean_dec(x_67); -x_82 = l_Lean_IR_Checker_checkObjType(x_1, x_3, x_81); -return x_82; +lean_object* x_95; lean_object* x_96; +lean_free_object(x_82); +lean_dec(x_79); +x_95 = lean_ctor_get(x_81, 1); +lean_inc(x_95); +lean_dec(x_81); +x_96 = l_Lean_IR_Checker_checkObjType(x_1, x_3, x_95); +return x_96; } case 8: { -lean_object* x_83; lean_object* x_84; -lean_free_object(x_68); -lean_dec(x_65); -x_83 = lean_ctor_get(x_67, 1); -lean_inc(x_83); -lean_dec(x_67); -x_84 = l_Lean_IR_Checker_checkObjType(x_1, x_3, x_83); -return x_84; +lean_object* x_97; lean_object* x_98; +lean_free_object(x_82); +lean_dec(x_79); +x_97 = lean_ctor_get(x_81, 1); +lean_inc(x_97); +lean_dec(x_81); +x_98 = l_Lean_IR_Checker_checkObjType(x_1, x_3, x_97); +return x_98; } case 9: { -uint8_t x_85; -lean_free_object(x_68); +uint8_t x_99; +lean_free_object(x_82); lean_dec(x_3); -x_85 = !lean_is_exclusive(x_67); -if (x_85 == 0) +x_99 = !lean_is_exclusive(x_81); +if (x_99 == 0) { -lean_object* x_86; lean_object* x_87; lean_object* x_88; uint8_t x_89; -x_86 = lean_ctor_get(x_67, 0); -lean_dec(x_86); -x_87 = lean_ctor_get(x_80, 1); -lean_inc(x_87); -lean_dec(x_80); -x_88 = lean_array_get_size(x_87); -x_89 = lean_nat_dec_lt(x_65, x_88); -lean_dec(x_88); -if (x_89 == 0) +lean_object* x_100; lean_object* x_101; lean_object* x_102; uint8_t x_103; +x_100 = lean_ctor_get(x_81, 0); +lean_dec(x_100); +x_101 = lean_ctor_get(x_94, 1); +lean_inc(x_101); +lean_dec(x_94); +x_102 = lean_array_get_size(x_101); +x_103 = lean_nat_dec_lt(x_79, x_102); +lean_dec(x_102); +if (x_103 == 0) { -lean_object* x_90; -lean_dec(x_87); -lean_dec(x_65); +lean_object* x_104; +lean_dec(x_101); +lean_dec(x_79); lean_dec(x_1); -x_90 = l_Lean_IR_Checker_checkExpr___closed__4; -lean_ctor_set(x_67, 0, x_90); -return x_67; +x_104 = l_Lean_IR_Checker_checkExpr___closed__5; +lean_ctor_set(x_81, 0, x_104); +return x_81; } else { -lean_object* x_91; uint8_t x_92; -x_91 = lean_array_fget(x_87, x_65); -lean_dec(x_65); -lean_dec(x_87); -x_92 = l_Lean_IR_IRType_beq(x_91, x_1); +lean_object* x_105; uint8_t x_106; +x_105 = lean_array_fget(x_101, x_79); +lean_dec(x_79); +lean_dec(x_101); +x_106 = l_Lean_IR_IRType_beq(x_105, x_1); lean_dec(x_1); -lean_dec(x_91); -if (x_92 == 0) +lean_dec(x_105); +if (x_106 == 0) { -lean_object* x_93; -x_93 = l_Lean_IR_Checker_checkEqTypes___closed__2; -lean_ctor_set(x_67, 0, x_93); -return x_67; +lean_object* x_107; +x_107 = l_Lean_IR_Checker_checkEqTypes___closed__2; +lean_ctor_set(x_81, 0, x_107); +return x_81; } else { -lean_object* x_94; -x_94 = l_Lean_IR_Checker_markIndex___lambda__1___closed__1; -lean_ctor_set(x_67, 0, x_94); -return x_67; +lean_object* x_108; +x_108 = l_Lean_IR_Checker_markIndex___lambda__1___closed__1; +lean_ctor_set(x_81, 0, x_108); +return x_81; } } } else { -lean_object* x_95; lean_object* x_96; lean_object* x_97; uint8_t x_98; -x_95 = lean_ctor_get(x_67, 1); -lean_inc(x_95); -lean_dec(x_67); -x_96 = lean_ctor_get(x_80, 1); -lean_inc(x_96); -lean_dec(x_80); -x_97 = lean_array_get_size(x_96); -x_98 = lean_nat_dec_lt(x_65, x_97); -lean_dec(x_97); -if (x_98 == 0) +lean_object* x_109; lean_object* x_110; lean_object* x_111; uint8_t x_112; +x_109 = lean_ctor_get(x_81, 1); +lean_inc(x_109); +lean_dec(x_81); +x_110 = lean_ctor_get(x_94, 1); +lean_inc(x_110); +lean_dec(x_94); +x_111 = lean_array_get_size(x_110); +x_112 = lean_nat_dec_lt(x_79, x_111); +lean_dec(x_111); +if (x_112 == 0) { -lean_object* x_99; lean_object* x_100; -lean_dec(x_96); -lean_dec(x_65); +lean_object* x_113; lean_object* x_114; +lean_dec(x_110); +lean_dec(x_79); lean_dec(x_1); -x_99 = l_Lean_IR_Checker_checkExpr___closed__4; -x_100 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_100, 0, x_99); -lean_ctor_set(x_100, 1, x_95); -return x_100; +x_113 = l_Lean_IR_Checker_checkExpr___closed__5; +x_114 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_114, 0, x_113); +lean_ctor_set(x_114, 1, x_109); +return x_114; } else { -lean_object* x_101; uint8_t x_102; -x_101 = lean_array_fget(x_96, x_65); -lean_dec(x_65); -lean_dec(x_96); -x_102 = l_Lean_IR_IRType_beq(x_101, x_1); +lean_object* x_115; uint8_t x_116; +x_115 = lean_array_fget(x_110, x_79); +lean_dec(x_79); +lean_dec(x_110); +x_116 = l_Lean_IR_IRType_beq(x_115, x_1); lean_dec(x_1); -lean_dec(x_101); -if (x_102 == 0) +lean_dec(x_115); +if (x_116 == 0) { -lean_object* x_103; lean_object* x_104; -x_103 = l_Lean_IR_Checker_checkEqTypes___closed__2; -x_104 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_104, 0, x_103); -lean_ctor_set(x_104, 1, x_95); -return x_104; +lean_object* x_117; lean_object* x_118; +x_117 = l_Lean_IR_Checker_checkEqTypes___closed__2; +x_118 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_118, 0, x_117); +lean_ctor_set(x_118, 1, x_109); +return x_118; } else { -lean_object* x_105; lean_object* x_106; -x_105 = l_Lean_IR_Checker_markIndex___lambda__1___closed__1; -x_106 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_106, 0, x_105); -lean_ctor_set(x_106, 1, x_95); -return x_106; +lean_object* x_119; lean_object* x_120; +x_119 = l_Lean_IR_Checker_markIndex___lambda__1___closed__1; +x_120 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_120, 0, x_119); +lean_ctor_set(x_120, 1, x_109); +return x_120; } } } } case 10: { -uint8_t x_107; -lean_free_object(x_68); +uint8_t x_121; +lean_free_object(x_82); lean_dec(x_3); -x_107 = !lean_is_exclusive(x_67); -if (x_107 == 0) -{ -lean_object* x_108; lean_object* x_109; lean_object* x_110; uint8_t x_111; -x_108 = lean_ctor_get(x_67, 0); -lean_dec(x_108); -x_109 = lean_ctor_get(x_80, 1); -lean_inc(x_109); -lean_dec(x_80); -x_110 = lean_array_get_size(x_109); -x_111 = lean_nat_dec_lt(x_65, x_110); -lean_dec(x_110); -if (x_111 == 0) -{ -lean_object* x_112; -lean_dec(x_109); -lean_dec(x_65); +x_121 = !lean_is_exclusive(x_81); +if (x_121 == 0) +{ +lean_object* x_122; lean_object* x_123; lean_object* x_124; uint8_t x_125; +x_122 = lean_ctor_get(x_81, 0); +lean_dec(x_122); +x_123 = lean_ctor_get(x_94, 1); +lean_inc(x_123); +lean_dec(x_94); +x_124 = lean_array_get_size(x_123); +x_125 = lean_nat_dec_lt(x_79, x_124); +lean_dec(x_124); +if (x_125 == 0) +{ +lean_object* x_126; +lean_dec(x_123); +lean_dec(x_79); lean_dec(x_1); -x_112 = l_Lean_IR_Checker_checkExpr___closed__4; -lean_ctor_set(x_67, 0, x_112); -return x_67; +x_126 = l_Lean_IR_Checker_checkExpr___closed__5; +lean_ctor_set(x_81, 0, x_126); +return x_81; } else { -lean_object* x_113; uint8_t x_114; -x_113 = lean_array_fget(x_109, x_65); -lean_dec(x_65); -lean_dec(x_109); -x_114 = l_Lean_IR_IRType_beq(x_113, x_1); +lean_object* x_127; uint8_t x_128; +x_127 = lean_array_fget(x_123, x_79); +lean_dec(x_79); +lean_dec(x_123); +x_128 = l_Lean_IR_IRType_beq(x_127, x_1); lean_dec(x_1); -lean_dec(x_113); -if (x_114 == 0) +lean_dec(x_127); +if (x_128 == 0) { -lean_object* x_115; -x_115 = l_Lean_IR_Checker_checkEqTypes___closed__2; -lean_ctor_set(x_67, 0, x_115); -return x_67; +lean_object* x_129; +x_129 = l_Lean_IR_Checker_checkEqTypes___closed__2; +lean_ctor_set(x_81, 0, x_129); +return x_81; } else { -lean_object* x_116; -x_116 = l_Lean_IR_Checker_markIndex___lambda__1___closed__1; -lean_ctor_set(x_67, 0, x_116); -return x_67; +lean_object* x_130; +x_130 = l_Lean_IR_Checker_markIndex___lambda__1___closed__1; +lean_ctor_set(x_81, 0, x_130); +return x_81; } } } else { -lean_object* x_117; lean_object* x_118; lean_object* x_119; uint8_t x_120; -x_117 = lean_ctor_get(x_67, 1); -lean_inc(x_117); -lean_dec(x_67); -x_118 = lean_ctor_get(x_80, 1); -lean_inc(x_118); -lean_dec(x_80); -x_119 = lean_array_get_size(x_118); -x_120 = lean_nat_dec_lt(x_65, x_119); -lean_dec(x_119); -if (x_120 == 0) +lean_object* x_131; lean_object* x_132; lean_object* x_133; uint8_t x_134; +x_131 = lean_ctor_get(x_81, 1); +lean_inc(x_131); +lean_dec(x_81); +x_132 = lean_ctor_get(x_94, 1); +lean_inc(x_132); +lean_dec(x_94); +x_133 = lean_array_get_size(x_132); +x_134 = lean_nat_dec_lt(x_79, x_133); +lean_dec(x_133); +if (x_134 == 0) { -lean_object* x_121; lean_object* x_122; -lean_dec(x_118); -lean_dec(x_65); +lean_object* x_135; lean_object* x_136; +lean_dec(x_132); +lean_dec(x_79); lean_dec(x_1); -x_121 = l_Lean_IR_Checker_checkExpr___closed__4; -x_122 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_122, 0, x_121); -lean_ctor_set(x_122, 1, x_117); -return x_122; +x_135 = l_Lean_IR_Checker_checkExpr___closed__5; +x_136 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_136, 0, x_135); +lean_ctor_set(x_136, 1, x_131); +return x_136; } else { -lean_object* x_123; uint8_t x_124; -x_123 = lean_array_fget(x_118, x_65); -lean_dec(x_65); -lean_dec(x_118); -x_124 = l_Lean_IR_IRType_beq(x_123, x_1); +lean_object* x_137; uint8_t x_138; +x_137 = lean_array_fget(x_132, x_79); +lean_dec(x_79); +lean_dec(x_132); +x_138 = l_Lean_IR_IRType_beq(x_137, x_1); lean_dec(x_1); -lean_dec(x_123); -if (x_124 == 0) +lean_dec(x_137); +if (x_138 == 0) { -lean_object* x_125; lean_object* x_126; -x_125 = l_Lean_IR_Checker_checkEqTypes___closed__2; -x_126 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_126, 0, x_125); -lean_ctor_set(x_126, 1, x_117); -return x_126; +lean_object* x_139; lean_object* x_140; +x_139 = l_Lean_IR_Checker_checkEqTypes___closed__2; +x_140 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_140, 0, x_139); +lean_ctor_set(x_140, 1, x_131); +return x_140; } else { -lean_object* x_127; lean_object* x_128; -x_127 = l_Lean_IR_Checker_markIndex___lambda__1___closed__1; -x_128 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_128, 0, x_127); -lean_ctor_set(x_128, 1, x_117); -return x_128; +lean_object* x_141; lean_object* x_142; +x_141 = l_Lean_IR_Checker_markIndex___lambda__1___closed__1; +x_142 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_142, 0, x_141); +lean_ctor_set(x_142, 1, x_131); +return x_142; } } } } default: { -uint8_t x_129; -lean_dec(x_65); +uint8_t x_143; +lean_dec(x_79); lean_dec(x_3); lean_dec(x_1); -x_129 = !lean_is_exclusive(x_67); -if (x_129 == 0) -{ -lean_object* x_130; lean_object* x_131; lean_object* x_132; lean_object* x_133; lean_object* x_134; lean_object* x_135; lean_object* x_136; lean_object* x_137; -x_130 = lean_ctor_get(x_67, 0); -lean_dec(x_130); -x_131 = l___private_Lean_Compiler_IR_Format_0__Lean_IR_formatIRType(x_80); -x_132 = l_Std_Format_defWidth; -x_133 = lean_format_pretty(x_131, x_132); -x_134 = l_Lean_IR_Checker_checkExpr___closed__2; -x_135 = lean_string_append(x_134, x_133); -lean_dec(x_133); -x_136 = l_Lean_IR_Checker_getDecl___closed__2; -x_137 = lean_string_append(x_135, x_136); -lean_ctor_set_tag(x_68, 0); -lean_ctor_set(x_68, 0, x_137); -return x_67; +x_143 = !lean_is_exclusive(x_81); +if (x_143 == 0) +{ +lean_object* x_144; lean_object* x_145; lean_object* x_146; lean_object* x_147; lean_object* x_148; lean_object* x_149; lean_object* x_150; lean_object* x_151; +x_144 = lean_ctor_get(x_81, 0); +lean_dec(x_144); +x_145 = l___private_Lean_Compiler_IR_Format_0__Lean_IR_formatIRType(x_94); +x_146 = l_Std_Format_defWidth; +x_147 = lean_format_pretty(x_145, x_146); +x_148 = l_Lean_IR_Checker_checkExpr___closed__3; +x_149 = lean_string_append(x_148, x_147); +lean_dec(x_147); +x_150 = l_Lean_IR_Checker_getDecl___closed__2; +x_151 = lean_string_append(x_149, x_150); +lean_ctor_set_tag(x_82, 0); +lean_ctor_set(x_82, 0, x_151); +return x_81; } else { -lean_object* x_138; lean_object* x_139; lean_object* x_140; lean_object* x_141; lean_object* x_142; lean_object* x_143; lean_object* x_144; lean_object* x_145; lean_object* x_146; -x_138 = lean_ctor_get(x_67, 1); -lean_inc(x_138); -lean_dec(x_67); -x_139 = l___private_Lean_Compiler_IR_Format_0__Lean_IR_formatIRType(x_80); -x_140 = l_Std_Format_defWidth; -x_141 = lean_format_pretty(x_139, x_140); -x_142 = l_Lean_IR_Checker_checkExpr___closed__2; -x_143 = lean_string_append(x_142, x_141); -lean_dec(x_141); -x_144 = l_Lean_IR_Checker_getDecl___closed__2; -x_145 = lean_string_append(x_143, x_144); -lean_ctor_set_tag(x_68, 0); -lean_ctor_set(x_68, 0, x_145); -x_146 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_146, 0, x_68); -lean_ctor_set(x_146, 1, x_138); -return x_146; +lean_object* x_152; lean_object* x_153; lean_object* x_154; lean_object* x_155; lean_object* x_156; lean_object* x_157; lean_object* x_158; lean_object* x_159; lean_object* x_160; +x_152 = lean_ctor_get(x_81, 1); +lean_inc(x_152); +lean_dec(x_81); +x_153 = l___private_Lean_Compiler_IR_Format_0__Lean_IR_formatIRType(x_94); +x_154 = l_Std_Format_defWidth; +x_155 = lean_format_pretty(x_153, x_154); +x_156 = l_Lean_IR_Checker_checkExpr___closed__3; +x_157 = lean_string_append(x_156, x_155); +lean_dec(x_155); +x_158 = l_Lean_IR_Checker_getDecl___closed__2; +x_159 = lean_string_append(x_157, x_158); +lean_ctor_set_tag(x_82, 0); +lean_ctor_set(x_82, 0, x_159); +x_160 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_160, 0, x_82); +lean_ctor_set(x_160, 1, x_152); +return x_160; } } } } else { -lean_object* x_147; -x_147 = lean_ctor_get(x_68, 0); -lean_inc(x_147); -lean_dec(x_68); -switch (lean_obj_tag(x_147)) { +lean_object* x_161; +x_161 = lean_ctor_get(x_82, 0); +lean_inc(x_161); +lean_dec(x_82); +switch (lean_obj_tag(x_161)) { case 7: { -lean_object* x_148; lean_object* x_149; -lean_dec(x_65); -x_148 = lean_ctor_get(x_67, 1); -lean_inc(x_148); -lean_dec(x_67); -x_149 = l_Lean_IR_Checker_checkObjType(x_1, x_3, x_148); -return x_149; +lean_object* x_162; lean_object* x_163; +lean_dec(x_79); +x_162 = lean_ctor_get(x_81, 1); +lean_inc(x_162); +lean_dec(x_81); +x_163 = l_Lean_IR_Checker_checkObjType(x_1, x_3, x_162); +return x_163; } case 8: { -lean_object* x_150; lean_object* x_151; -lean_dec(x_65); -x_150 = lean_ctor_get(x_67, 1); -lean_inc(x_150); -lean_dec(x_67); -x_151 = l_Lean_IR_Checker_checkObjType(x_1, x_3, x_150); -return x_151; +lean_object* x_164; lean_object* x_165; +lean_dec(x_79); +x_164 = lean_ctor_get(x_81, 1); +lean_inc(x_164); +lean_dec(x_81); +x_165 = l_Lean_IR_Checker_checkObjType(x_1, x_3, x_164); +return x_165; } case 9: { -lean_object* x_152; lean_object* x_153; lean_object* x_154; lean_object* x_155; uint8_t x_156; +lean_object* x_166; lean_object* x_167; lean_object* x_168; lean_object* x_169; uint8_t x_170; lean_dec(x_3); -x_152 = lean_ctor_get(x_67, 1); -lean_inc(x_152); -if (lean_is_exclusive(x_67)) { - lean_ctor_release(x_67, 0); - lean_ctor_release(x_67, 1); - x_153 = x_67; +x_166 = lean_ctor_get(x_81, 1); +lean_inc(x_166); +if (lean_is_exclusive(x_81)) { + lean_ctor_release(x_81, 0); + lean_ctor_release(x_81, 1); + x_167 = x_81; } else { - lean_dec_ref(x_67); - x_153 = lean_box(0); -} -x_154 = lean_ctor_get(x_147, 1); -lean_inc(x_154); -lean_dec(x_147); -x_155 = lean_array_get_size(x_154); -x_156 = lean_nat_dec_lt(x_65, x_155); -lean_dec(x_155); -if (x_156 == 0) -{ -lean_object* x_157; lean_object* x_158; -lean_dec(x_154); -lean_dec(x_65); + lean_dec_ref(x_81); + x_167 = lean_box(0); +} +x_168 = lean_ctor_get(x_161, 1); +lean_inc(x_168); +lean_dec(x_161); +x_169 = lean_array_get_size(x_168); +x_170 = lean_nat_dec_lt(x_79, x_169); +lean_dec(x_169); +if (x_170 == 0) +{ +lean_object* x_171; lean_object* x_172; +lean_dec(x_168); +lean_dec(x_79); lean_dec(x_1); -x_157 = l_Lean_IR_Checker_checkExpr___closed__4; -if (lean_is_scalar(x_153)) { - x_158 = lean_alloc_ctor(0, 2, 0); +x_171 = l_Lean_IR_Checker_checkExpr___closed__5; +if (lean_is_scalar(x_167)) { + x_172 = lean_alloc_ctor(0, 2, 0); } else { - x_158 = x_153; + x_172 = x_167; } -lean_ctor_set(x_158, 0, x_157); -lean_ctor_set(x_158, 1, x_152); -return x_158; +lean_ctor_set(x_172, 0, x_171); +lean_ctor_set(x_172, 1, x_166); +return x_172; } else { -lean_object* x_159; uint8_t x_160; -x_159 = lean_array_fget(x_154, x_65); -lean_dec(x_65); -lean_dec(x_154); -x_160 = l_Lean_IR_IRType_beq(x_159, x_1); +lean_object* x_173; uint8_t x_174; +x_173 = lean_array_fget(x_168, x_79); +lean_dec(x_79); +lean_dec(x_168); +x_174 = l_Lean_IR_IRType_beq(x_173, x_1); lean_dec(x_1); -lean_dec(x_159); -if (x_160 == 0) +lean_dec(x_173); +if (x_174 == 0) { -lean_object* x_161; lean_object* x_162; -x_161 = l_Lean_IR_Checker_checkEqTypes___closed__2; -if (lean_is_scalar(x_153)) { - x_162 = lean_alloc_ctor(0, 2, 0); +lean_object* x_175; lean_object* x_176; +x_175 = l_Lean_IR_Checker_checkEqTypes___closed__2; +if (lean_is_scalar(x_167)) { + x_176 = lean_alloc_ctor(0, 2, 0); } else { - x_162 = x_153; + x_176 = x_167; } -lean_ctor_set(x_162, 0, x_161); -lean_ctor_set(x_162, 1, x_152); -return x_162; +lean_ctor_set(x_176, 0, x_175); +lean_ctor_set(x_176, 1, x_166); +return x_176; } else { -lean_object* x_163; lean_object* x_164; -x_163 = l_Lean_IR_Checker_markIndex___lambda__1___closed__1; -if (lean_is_scalar(x_153)) { - x_164 = lean_alloc_ctor(0, 2, 0); +lean_object* x_177; lean_object* x_178; +x_177 = l_Lean_IR_Checker_markIndex___lambda__1___closed__1; +if (lean_is_scalar(x_167)) { + x_178 = lean_alloc_ctor(0, 2, 0); } else { - x_164 = x_153; + x_178 = x_167; } -lean_ctor_set(x_164, 0, x_163); -lean_ctor_set(x_164, 1, x_152); -return x_164; +lean_ctor_set(x_178, 0, x_177); +lean_ctor_set(x_178, 1, x_166); +return x_178; } } } case 10: { -lean_object* x_165; lean_object* x_166; lean_object* x_167; lean_object* x_168; uint8_t x_169; +lean_object* x_179; lean_object* x_180; lean_object* x_181; lean_object* x_182; uint8_t x_183; lean_dec(x_3); -x_165 = lean_ctor_get(x_67, 1); -lean_inc(x_165); -if (lean_is_exclusive(x_67)) { - lean_ctor_release(x_67, 0); - lean_ctor_release(x_67, 1); - x_166 = x_67; +x_179 = lean_ctor_get(x_81, 1); +lean_inc(x_179); +if (lean_is_exclusive(x_81)) { + lean_ctor_release(x_81, 0); + lean_ctor_release(x_81, 1); + x_180 = x_81; } else { - lean_dec_ref(x_67); - x_166 = lean_box(0); -} -x_167 = lean_ctor_get(x_147, 1); -lean_inc(x_167); -lean_dec(x_147); -x_168 = lean_array_get_size(x_167); -x_169 = lean_nat_dec_lt(x_65, x_168); -lean_dec(x_168); -if (x_169 == 0) + lean_dec_ref(x_81); + x_180 = lean_box(0); +} +x_181 = lean_ctor_get(x_161, 1); +lean_inc(x_181); +lean_dec(x_161); +x_182 = lean_array_get_size(x_181); +x_183 = lean_nat_dec_lt(x_79, x_182); +lean_dec(x_182); +if (x_183 == 0) { -lean_object* x_170; lean_object* x_171; -lean_dec(x_167); -lean_dec(x_65); +lean_object* x_184; lean_object* x_185; +lean_dec(x_181); +lean_dec(x_79); lean_dec(x_1); -x_170 = l_Lean_IR_Checker_checkExpr___closed__4; -if (lean_is_scalar(x_166)) { - x_171 = lean_alloc_ctor(0, 2, 0); +x_184 = l_Lean_IR_Checker_checkExpr___closed__5; +if (lean_is_scalar(x_180)) { + x_185 = lean_alloc_ctor(0, 2, 0); } else { - x_171 = x_166; + x_185 = x_180; } -lean_ctor_set(x_171, 0, x_170); -lean_ctor_set(x_171, 1, x_165); -return x_171; +lean_ctor_set(x_185, 0, x_184); +lean_ctor_set(x_185, 1, x_179); +return x_185; } else { -lean_object* x_172; uint8_t x_173; -x_172 = lean_array_fget(x_167, x_65); -lean_dec(x_65); -lean_dec(x_167); -x_173 = l_Lean_IR_IRType_beq(x_172, x_1); +lean_object* x_186; uint8_t x_187; +x_186 = lean_array_fget(x_181, x_79); +lean_dec(x_79); +lean_dec(x_181); +x_187 = l_Lean_IR_IRType_beq(x_186, x_1); lean_dec(x_1); -lean_dec(x_172); -if (x_173 == 0) +lean_dec(x_186); +if (x_187 == 0) { -lean_object* x_174; lean_object* x_175; -x_174 = l_Lean_IR_Checker_checkEqTypes___closed__2; -if (lean_is_scalar(x_166)) { - x_175 = lean_alloc_ctor(0, 2, 0); +lean_object* x_188; lean_object* x_189; +x_188 = l_Lean_IR_Checker_checkEqTypes___closed__2; +if (lean_is_scalar(x_180)) { + x_189 = lean_alloc_ctor(0, 2, 0); } else { - x_175 = x_166; + x_189 = x_180; } -lean_ctor_set(x_175, 0, x_174); -lean_ctor_set(x_175, 1, x_165); -return x_175; +lean_ctor_set(x_189, 0, x_188); +lean_ctor_set(x_189, 1, x_179); +return x_189; } else { -lean_object* x_176; lean_object* x_177; -x_176 = l_Lean_IR_Checker_markIndex___lambda__1___closed__1; -if (lean_is_scalar(x_166)) { - x_177 = lean_alloc_ctor(0, 2, 0); +lean_object* x_190; lean_object* x_191; +x_190 = l_Lean_IR_Checker_markIndex___lambda__1___closed__1; +if (lean_is_scalar(x_180)) { + x_191 = lean_alloc_ctor(0, 2, 0); } else { - x_177 = x_166; + x_191 = x_180; } -lean_ctor_set(x_177, 0, x_176); -lean_ctor_set(x_177, 1, x_165); -return x_177; +lean_ctor_set(x_191, 0, x_190); +lean_ctor_set(x_191, 1, x_179); +return x_191; } } } default: { -lean_object* x_178; lean_object* x_179; lean_object* x_180; lean_object* x_181; lean_object* x_182; lean_object* x_183; lean_object* x_184; lean_object* x_185; lean_object* x_186; lean_object* x_187; lean_object* x_188; -lean_dec(x_65); +lean_object* x_192; lean_object* x_193; lean_object* x_194; lean_object* x_195; lean_object* x_196; lean_object* x_197; lean_object* x_198; lean_object* x_199; lean_object* x_200; lean_object* x_201; lean_object* x_202; +lean_dec(x_79); lean_dec(x_3); lean_dec(x_1); -x_178 = lean_ctor_get(x_67, 1); -lean_inc(x_178); -if (lean_is_exclusive(x_67)) { - lean_ctor_release(x_67, 0); - lean_ctor_release(x_67, 1); - x_179 = x_67; +x_192 = lean_ctor_get(x_81, 1); +lean_inc(x_192); +if (lean_is_exclusive(x_81)) { + lean_ctor_release(x_81, 0); + lean_ctor_release(x_81, 1); + x_193 = x_81; } else { - lean_dec_ref(x_67); - x_179 = lean_box(0); -} -x_180 = l___private_Lean_Compiler_IR_Format_0__Lean_IR_formatIRType(x_147); -x_181 = l_Std_Format_defWidth; -x_182 = lean_format_pretty(x_180, x_181); -x_183 = l_Lean_IR_Checker_checkExpr___closed__2; -x_184 = lean_string_append(x_183, x_182); -lean_dec(x_182); -x_185 = l_Lean_IR_Checker_getDecl___closed__2; -x_186 = lean_string_append(x_184, x_185); -x_187 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_187, 0, x_186); -if (lean_is_scalar(x_179)) { - x_188 = lean_alloc_ctor(0, 2, 0); + lean_dec_ref(x_81); + x_193 = lean_box(0); +} +x_194 = l___private_Lean_Compiler_IR_Format_0__Lean_IR_formatIRType(x_161); +x_195 = l_Std_Format_defWidth; +x_196 = lean_format_pretty(x_194, x_195); +x_197 = l_Lean_IR_Checker_checkExpr___closed__3; +x_198 = lean_string_append(x_197, x_196); +lean_dec(x_196); +x_199 = l_Lean_IR_Checker_getDecl___closed__2; +x_200 = lean_string_append(x_198, x_199); +x_201 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_201, 0, x_200); +if (lean_is_scalar(x_193)) { + x_202 = lean_alloc_ctor(0, 2, 0); } else { - x_188 = x_179; + x_202 = x_193; } -lean_ctor_set(x_188, 0, x_187); -lean_ctor_set(x_188, 1, x_178); -return x_188; +lean_ctor_set(x_202, 0, x_201); +lean_ctor_set(x_202, 1, x_192); +return x_202; } } } @@ -3271,120 +3422,86 @@ return x_188; } case 4: { -lean_object* x_189; lean_object* x_190; lean_object* x_191; -x_189 = lean_ctor_get(x_2, 1); -lean_inc(x_189); +lean_object* x_203; lean_object* x_204; lean_object* x_205; +x_203 = lean_ctor_get(x_2, 1); +lean_inc(x_203); lean_dec(x_2); lean_inc(x_3); -x_190 = l_Lean_IR_Checker_checkObjVar(x_189, x_3, x_4); -x_191 = lean_ctor_get(x_190, 0); -lean_inc(x_191); -if (lean_obj_tag(x_191) == 0) +x_204 = l_Lean_IR_Checker_checkObjVar(x_203, x_3, x_4); +x_205 = lean_ctor_get(x_204, 0); +lean_inc(x_205); +if (lean_obj_tag(x_205) == 0) { -uint8_t x_192; +uint8_t x_206; lean_dec(x_3); lean_dec(x_1); -x_192 = !lean_is_exclusive(x_190); -if (x_192 == 0) +x_206 = !lean_is_exclusive(x_204); +if (x_206 == 0) { -lean_object* x_193; uint8_t x_194; -x_193 = lean_ctor_get(x_190, 0); -lean_dec(x_193); -x_194 = !lean_is_exclusive(x_191); -if (x_194 == 0) +lean_object* x_207; uint8_t x_208; +x_207 = lean_ctor_get(x_204, 0); +lean_dec(x_207); +x_208 = !lean_is_exclusive(x_205); +if (x_208 == 0) { -return x_190; +return x_204; } else { -lean_object* x_195; lean_object* x_196; -x_195 = lean_ctor_get(x_191, 0); -lean_inc(x_195); -lean_dec(x_191); -x_196 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_196, 0, x_195); -lean_ctor_set(x_190, 0, x_196); -return x_190; +lean_object* x_209; lean_object* x_210; +x_209 = lean_ctor_get(x_205, 0); +lean_inc(x_209); +lean_dec(x_205); +x_210 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_210, 0, x_209); +lean_ctor_set(x_204, 0, x_210); +return x_204; } } else { -lean_object* x_197; lean_object* x_198; lean_object* x_199; lean_object* x_200; lean_object* x_201; -x_197 = lean_ctor_get(x_190, 1); -lean_inc(x_197); -lean_dec(x_190); -x_198 = lean_ctor_get(x_191, 0); -lean_inc(x_198); -if (lean_is_exclusive(x_191)) { - lean_ctor_release(x_191, 0); - x_199 = x_191; +lean_object* x_211; lean_object* x_212; lean_object* x_213; lean_object* x_214; lean_object* x_215; +x_211 = lean_ctor_get(x_204, 1); +lean_inc(x_211); +lean_dec(x_204); +x_212 = lean_ctor_get(x_205, 0); +lean_inc(x_212); +if (lean_is_exclusive(x_205)) { + lean_ctor_release(x_205, 0); + x_213 = x_205; } else { - lean_dec_ref(x_191); - x_199 = lean_box(0); + lean_dec_ref(x_205); + x_213 = lean_box(0); } -if (lean_is_scalar(x_199)) { - x_200 = lean_alloc_ctor(0, 1, 0); +if (lean_is_scalar(x_213)) { + x_214 = lean_alloc_ctor(0, 1, 0); } else { - x_200 = x_199; + x_214 = x_213; } -lean_ctor_set(x_200, 0, x_198); -x_201 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_201, 0, x_200); -lean_ctor_set(x_201, 1, x_197); -return x_201; +lean_ctor_set(x_214, 0, x_212); +x_215 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_215, 0, x_214); +lean_ctor_set(x_215, 1, x_211); +return x_215; } } else { -uint8_t x_202; -lean_dec(x_191); -x_202 = !lean_is_exclusive(x_190); -if (x_202 == 0) -{ -lean_object* x_203; lean_object* x_204; lean_object* x_205; uint8_t x_206; -x_203 = lean_ctor_get(x_190, 1); -x_204 = lean_ctor_get(x_190, 0); -lean_dec(x_204); -x_205 = lean_box(5); -x_206 = l_Lean_IR_IRType_beq(x_1, x_205); -if (x_206 == 0) -{ -lean_object* x_207; lean_object* x_208; lean_object* x_209; lean_object* x_210; lean_object* x_211; lean_object* x_212; lean_object* x_213; lean_object* x_214; lean_object* x_215; lean_object* x_216; -lean_free_object(x_190); -x_207 = l___private_Lean_Compiler_IR_Format_0__Lean_IR_formatIRType(x_1); -x_208 = l_Std_Format_defWidth; -x_209 = lean_format_pretty(x_207, x_208); -x_210 = l_Lean_IR_Checker_checkType___closed__1; -x_211 = lean_string_append(x_210, x_209); -lean_dec(x_209); -x_212 = l_Lean_IR_Checker_getDecl___closed__2; -x_213 = lean_string_append(x_211, x_212); -x_214 = l_Lean_IR_Checker_checkType___closed__2; -x_215 = lean_box(0); -x_216 = lean_apply_4(x_214, x_213, x_215, x_3, x_203); -return x_216; -} -else +uint8_t x_216; +lean_dec(x_205); +x_216 = !lean_is_exclusive(x_204); +if (x_216 == 0) { -lean_object* x_217; -lean_dec(x_3); -lean_dec(x_1); -x_217 = l_Lean_IR_Checker_markIndex___lambda__1___closed__1; -lean_ctor_set(x_190, 0, x_217); -return x_190; -} -} -else -{ -lean_object* x_218; lean_object* x_219; uint8_t x_220; -x_218 = lean_ctor_get(x_190, 1); -lean_inc(x_218); -lean_dec(x_190); +lean_object* x_217; lean_object* x_218; lean_object* x_219; uint8_t x_220; +x_217 = lean_ctor_get(x_204, 1); +x_218 = lean_ctor_get(x_204, 0); +lean_dec(x_218); x_219 = lean_box(5); x_220 = l_Lean_IR_IRType_beq(x_1, x_219); if (x_220 == 0) { lean_object* x_221; lean_object* x_222; lean_object* x_223; lean_object* x_224; lean_object* x_225; lean_object* x_226; lean_object* x_227; lean_object* x_228; lean_object* x_229; lean_object* x_230; +lean_free_object(x_204); x_221 = l___private_Lean_Compiler_IR_Format_0__Lean_IR_formatIRType(x_1); x_222 = l_Std_Format_defWidth; x_223 = lean_format_pretty(x_221, x_222); @@ -3395,528 +3512,525 @@ x_226 = l_Lean_IR_Checker_getDecl___closed__2; x_227 = lean_string_append(x_225, x_226); x_228 = l_Lean_IR_Checker_checkType___closed__2; x_229 = lean_box(0); -x_230 = lean_apply_4(x_228, x_227, x_229, x_3, x_218); +x_230 = lean_apply_4(x_228, x_227, x_229, x_3, x_217); return x_230; } else { -lean_object* x_231; lean_object* x_232; +lean_object* x_231; lean_dec(x_3); lean_dec(x_1); x_231 = l_Lean_IR_Checker_markIndex___lambda__1___closed__1; -x_232 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_232, 0, x_231); -lean_ctor_set(x_232, 1, x_218); -return x_232; +lean_ctor_set(x_204, 0, x_231); +return x_204; +} +} +else +{ +lean_object* x_232; lean_object* x_233; uint8_t x_234; +x_232 = lean_ctor_get(x_204, 1); +lean_inc(x_232); +lean_dec(x_204); +x_233 = lean_box(5); +x_234 = l_Lean_IR_IRType_beq(x_1, x_233); +if (x_234 == 0) +{ +lean_object* x_235; lean_object* x_236; lean_object* x_237; lean_object* x_238; lean_object* x_239; lean_object* x_240; lean_object* x_241; lean_object* x_242; lean_object* x_243; lean_object* x_244; +x_235 = l___private_Lean_Compiler_IR_Format_0__Lean_IR_formatIRType(x_1); +x_236 = l_Std_Format_defWidth; +x_237 = lean_format_pretty(x_235, x_236); +x_238 = l_Lean_IR_Checker_checkType___closed__1; +x_239 = lean_string_append(x_238, x_237); +lean_dec(x_237); +x_240 = l_Lean_IR_Checker_getDecl___closed__2; +x_241 = lean_string_append(x_239, x_240); +x_242 = l_Lean_IR_Checker_checkType___closed__2; +x_243 = lean_box(0); +x_244 = lean_apply_4(x_242, x_241, x_243, x_3, x_232); +return x_244; +} +else +{ +lean_object* x_245; lean_object* x_246; +lean_dec(x_3); +lean_dec(x_1); +x_245 = l_Lean_IR_Checker_markIndex___lambda__1___closed__1; +x_246 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_246, 0, x_245); +lean_ctor_set(x_246, 1, x_232); +return x_246; } } } } case 5: { -lean_object* x_233; lean_object* x_234; lean_object* x_235; -x_233 = lean_ctor_get(x_2, 2); -lean_inc(x_233); +lean_object* x_247; lean_object* x_248; lean_object* x_249; +x_247 = lean_ctor_get(x_2, 2); +lean_inc(x_247); lean_dec(x_2); lean_inc(x_3); -x_234 = l_Lean_IR_Checker_checkObjVar(x_233, x_3, x_4); -x_235 = lean_ctor_get(x_234, 0); -lean_inc(x_235); -if (lean_obj_tag(x_235) == 0) +x_248 = l_Lean_IR_Checker_checkObjVar(x_247, x_3, x_4); +x_249 = lean_ctor_get(x_248, 0); +lean_inc(x_249); +if (lean_obj_tag(x_249) == 0) { -uint8_t x_236; +uint8_t x_250; lean_dec(x_3); lean_dec(x_1); -x_236 = !lean_is_exclusive(x_234); -if (x_236 == 0) +x_250 = !lean_is_exclusive(x_248); +if (x_250 == 0) { -lean_object* x_237; uint8_t x_238; -x_237 = lean_ctor_get(x_234, 0); -lean_dec(x_237); -x_238 = !lean_is_exclusive(x_235); -if (x_238 == 0) +lean_object* x_251; uint8_t x_252; +x_251 = lean_ctor_get(x_248, 0); +lean_dec(x_251); +x_252 = !lean_is_exclusive(x_249); +if (x_252 == 0) { -return x_234; +return x_248; } else { -lean_object* x_239; lean_object* x_240; -x_239 = lean_ctor_get(x_235, 0); -lean_inc(x_239); -lean_dec(x_235); -x_240 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_240, 0, x_239); -lean_ctor_set(x_234, 0, x_240); -return x_234; +lean_object* x_253; lean_object* x_254; +x_253 = lean_ctor_get(x_249, 0); +lean_inc(x_253); +lean_dec(x_249); +x_254 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_254, 0, x_253); +lean_ctor_set(x_248, 0, x_254); +return x_248; } } else { -lean_object* x_241; lean_object* x_242; lean_object* x_243; lean_object* x_244; lean_object* x_245; -x_241 = lean_ctor_get(x_234, 1); -lean_inc(x_241); -lean_dec(x_234); -x_242 = lean_ctor_get(x_235, 0); -lean_inc(x_242); -if (lean_is_exclusive(x_235)) { - lean_ctor_release(x_235, 0); - x_243 = x_235; +lean_object* x_255; lean_object* x_256; lean_object* x_257; lean_object* x_258; lean_object* x_259; +x_255 = lean_ctor_get(x_248, 1); +lean_inc(x_255); +lean_dec(x_248); +x_256 = lean_ctor_get(x_249, 0); +lean_inc(x_256); +if (lean_is_exclusive(x_249)) { + lean_ctor_release(x_249, 0); + x_257 = x_249; } else { - lean_dec_ref(x_235); - x_243 = lean_box(0); + lean_dec_ref(x_249); + x_257 = lean_box(0); } -if (lean_is_scalar(x_243)) { - x_244 = lean_alloc_ctor(0, 1, 0); +if (lean_is_scalar(x_257)) { + x_258 = lean_alloc_ctor(0, 1, 0); } else { - x_244 = x_243; + x_258 = x_257; } -lean_ctor_set(x_244, 0, x_242); -x_245 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_245, 0, x_244); -lean_ctor_set(x_245, 1, x_241); -return x_245; +lean_ctor_set(x_258, 0, x_256); +x_259 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_259, 0, x_258); +lean_ctor_set(x_259, 1, x_255); +return x_259; } } else { -lean_object* x_246; lean_object* x_247; -lean_dec(x_235); -x_246 = lean_ctor_get(x_234, 1); -lean_inc(x_246); -lean_dec(x_234); -x_247 = l_Lean_IR_Checker_checkScalarType(x_1, x_3, x_246); -return x_247; +lean_object* x_260; lean_object* x_261; +lean_dec(x_249); +x_260 = lean_ctor_get(x_248, 1); +lean_inc(x_260); +lean_dec(x_248); +x_261 = l_Lean_IR_Checker_checkScalarType(x_1, x_3, x_260); +return x_261; } } case 6: { -lean_object* x_248; lean_object* x_249; lean_object* x_250; +lean_object* x_262; lean_object* x_263; lean_object* x_264; lean_dec(x_1); -x_248 = lean_ctor_get(x_2, 0); -lean_inc(x_248); -x_249 = lean_ctor_get(x_2, 1); -lean_inc(x_249); +x_262 = lean_ctor_get(x_2, 0); +lean_inc(x_262); +x_263 = lean_ctor_get(x_2, 1); +lean_inc(x_263); lean_dec(x_2); -x_250 = l_Lean_IR_Checker_checkFullApp(x_248, x_249, x_3, x_4); -lean_dec(x_249); -return x_250; +x_264 = l_Lean_IR_Checker_checkFullApp(x_262, x_263, x_3, x_4); +lean_dec(x_263); +return x_264; } case 7: { -lean_object* x_251; lean_object* x_252; lean_object* x_253; lean_object* x_254; -x_251 = lean_ctor_get(x_2, 0); -lean_inc(x_251); -x_252 = lean_ctor_get(x_2, 1); -lean_inc(x_252); +lean_object* x_265; lean_object* x_266; lean_object* x_267; lean_object* x_268; +x_265 = lean_ctor_get(x_2, 0); +lean_inc(x_265); +x_266 = lean_ctor_get(x_2, 1); +lean_inc(x_266); lean_dec(x_2); lean_inc(x_3); -x_253 = l_Lean_IR_Checker_checkPartialApp(x_251, x_252, x_3, x_4); -lean_dec(x_252); -x_254 = lean_ctor_get(x_253, 0); -lean_inc(x_254); -if (lean_obj_tag(x_254) == 0) +x_267 = l_Lean_IR_Checker_checkPartialApp(x_265, x_266, x_3, x_4); +lean_dec(x_266); +x_268 = lean_ctor_get(x_267, 0); +lean_inc(x_268); +if (lean_obj_tag(x_268) == 0) { -uint8_t x_255; +uint8_t x_269; lean_dec(x_3); lean_dec(x_1); -x_255 = !lean_is_exclusive(x_253); -if (x_255 == 0) +x_269 = !lean_is_exclusive(x_267); +if (x_269 == 0) { -lean_object* x_256; uint8_t x_257; -x_256 = lean_ctor_get(x_253, 0); -lean_dec(x_256); -x_257 = !lean_is_exclusive(x_254); -if (x_257 == 0) +lean_object* x_270; uint8_t x_271; +x_270 = lean_ctor_get(x_267, 0); +lean_dec(x_270); +x_271 = !lean_is_exclusive(x_268); +if (x_271 == 0) { -return x_253; +return x_267; } else { -lean_object* x_258; lean_object* x_259; -x_258 = lean_ctor_get(x_254, 0); -lean_inc(x_258); -lean_dec(x_254); -x_259 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_259, 0, x_258); -lean_ctor_set(x_253, 0, x_259); -return x_253; +lean_object* x_272; lean_object* x_273; +x_272 = lean_ctor_get(x_268, 0); +lean_inc(x_272); +lean_dec(x_268); +x_273 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_273, 0, x_272); +lean_ctor_set(x_267, 0, x_273); +return x_267; } } else { -lean_object* x_260; lean_object* x_261; lean_object* x_262; lean_object* x_263; lean_object* x_264; -x_260 = lean_ctor_get(x_253, 1); -lean_inc(x_260); -lean_dec(x_253); -x_261 = lean_ctor_get(x_254, 0); -lean_inc(x_261); -if (lean_is_exclusive(x_254)) { - lean_ctor_release(x_254, 0); - x_262 = x_254; +lean_object* x_274; lean_object* x_275; lean_object* x_276; lean_object* x_277; lean_object* x_278; +x_274 = lean_ctor_get(x_267, 1); +lean_inc(x_274); +lean_dec(x_267); +x_275 = lean_ctor_get(x_268, 0); +lean_inc(x_275); +if (lean_is_exclusive(x_268)) { + lean_ctor_release(x_268, 0); + x_276 = x_268; } else { - lean_dec_ref(x_254); - x_262 = lean_box(0); + lean_dec_ref(x_268); + x_276 = lean_box(0); } -if (lean_is_scalar(x_262)) { - x_263 = lean_alloc_ctor(0, 1, 0); +if (lean_is_scalar(x_276)) { + x_277 = lean_alloc_ctor(0, 1, 0); } else { - x_263 = x_262; + x_277 = x_276; } -lean_ctor_set(x_263, 0, x_261); -x_264 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_264, 0, x_263); -lean_ctor_set(x_264, 1, x_260); -return x_264; +lean_ctor_set(x_277, 0, x_275); +x_278 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_278, 0, x_277); +lean_ctor_set(x_278, 1, x_274); +return x_278; } } else { -lean_object* x_265; lean_object* x_266; -lean_dec(x_254); -x_265 = lean_ctor_get(x_253, 1); -lean_inc(x_265); -lean_dec(x_253); -x_266 = l_Lean_IR_Checker_checkObjType(x_1, x_3, x_265); -return x_266; +lean_object* x_279; lean_object* x_280; +lean_dec(x_268); +x_279 = lean_ctor_get(x_267, 1); +lean_inc(x_279); +lean_dec(x_267); +x_280 = l_Lean_IR_Checker_checkObjType(x_1, x_3, x_279); +return x_280; } } case 8: { -lean_object* x_267; lean_object* x_268; lean_object* x_269; lean_object* x_270; +lean_object* x_281; lean_object* x_282; lean_object* x_283; lean_object* x_284; lean_dec(x_1); -x_267 = lean_ctor_get(x_2, 0); -lean_inc(x_267); -x_268 = lean_ctor_get(x_2, 1); -lean_inc(x_268); +x_281 = lean_ctor_get(x_2, 0); +lean_inc(x_281); +x_282 = lean_ctor_get(x_2, 1); +lean_inc(x_282); lean_dec(x_2); lean_inc(x_3); -x_269 = l_Lean_IR_Checker_checkObjVar(x_267, x_3, x_4); -x_270 = lean_ctor_get(x_269, 0); -lean_inc(x_270); -if (lean_obj_tag(x_270) == 0) +x_283 = l_Lean_IR_Checker_checkObjVar(x_281, x_3, x_4); +x_284 = lean_ctor_get(x_283, 0); +lean_inc(x_284); +if (lean_obj_tag(x_284) == 0) { -uint8_t x_271; -lean_dec(x_268); +uint8_t x_285; +lean_dec(x_282); lean_dec(x_3); -x_271 = !lean_is_exclusive(x_269); -if (x_271 == 0) +x_285 = !lean_is_exclusive(x_283); +if (x_285 == 0) { -lean_object* x_272; uint8_t x_273; -x_272 = lean_ctor_get(x_269, 0); -lean_dec(x_272); -x_273 = !lean_is_exclusive(x_270); -if (x_273 == 0) +lean_object* x_286; uint8_t x_287; +x_286 = lean_ctor_get(x_283, 0); +lean_dec(x_286); +x_287 = !lean_is_exclusive(x_284); +if (x_287 == 0) { -return x_269; +return x_283; } else { -lean_object* x_274; lean_object* x_275; -x_274 = lean_ctor_get(x_270, 0); -lean_inc(x_274); -lean_dec(x_270); -x_275 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_275, 0, x_274); -lean_ctor_set(x_269, 0, x_275); -return x_269; +lean_object* x_288; lean_object* x_289; +x_288 = lean_ctor_get(x_284, 0); +lean_inc(x_288); +lean_dec(x_284); +x_289 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_289, 0, x_288); +lean_ctor_set(x_283, 0, x_289); +return x_283; } } else { -lean_object* x_276; lean_object* x_277; lean_object* x_278; lean_object* x_279; lean_object* x_280; -x_276 = lean_ctor_get(x_269, 1); -lean_inc(x_276); -lean_dec(x_269); -x_277 = lean_ctor_get(x_270, 0); -lean_inc(x_277); -if (lean_is_exclusive(x_270)) { - lean_ctor_release(x_270, 0); - x_278 = x_270; +lean_object* x_290; lean_object* x_291; lean_object* x_292; lean_object* x_293; lean_object* x_294; +x_290 = lean_ctor_get(x_283, 1); +lean_inc(x_290); +lean_dec(x_283); +x_291 = lean_ctor_get(x_284, 0); +lean_inc(x_291); +if (lean_is_exclusive(x_284)) { + lean_ctor_release(x_284, 0); + x_292 = x_284; } else { - lean_dec_ref(x_270); - x_278 = lean_box(0); + lean_dec_ref(x_284); + x_292 = lean_box(0); } -if (lean_is_scalar(x_278)) { - x_279 = lean_alloc_ctor(0, 1, 0); +if (lean_is_scalar(x_292)) { + x_293 = lean_alloc_ctor(0, 1, 0); } else { - x_279 = x_278; + x_293 = x_292; } -lean_ctor_set(x_279, 0, x_277); -x_280 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_280, 0, x_279); -lean_ctor_set(x_280, 1, x_276); -return x_280; +lean_ctor_set(x_293, 0, x_291); +x_294 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_294, 0, x_293); +lean_ctor_set(x_294, 1, x_290); +return x_294; } } else { -lean_object* x_281; lean_object* x_282; -lean_dec(x_270); -x_281 = lean_ctor_get(x_269, 1); -lean_inc(x_281); -lean_dec(x_269); -x_282 = l_Lean_IR_Checker_checkArgs(x_268, x_3, x_281); -lean_dec(x_268); -return x_282; +lean_object* x_295; lean_object* x_296; +lean_dec(x_284); +x_295 = lean_ctor_get(x_283, 1); +lean_inc(x_295); +lean_dec(x_283); +x_296 = l_Lean_IR_Checker_checkArgs(x_282, x_3, x_295); +lean_dec(x_282); +return x_296; } } case 9: { -lean_object* x_283; lean_object* x_284; lean_object* x_285; lean_object* x_286; -x_283 = lean_ctor_get(x_2, 0); -lean_inc(x_283); -x_284 = lean_ctor_get(x_2, 1); -lean_inc(x_284); +lean_object* x_297; lean_object* x_298; lean_object* x_299; lean_object* x_300; +x_297 = lean_ctor_get(x_2, 0); +lean_inc(x_297); +x_298 = lean_ctor_get(x_2, 1); +lean_inc(x_298); lean_dec(x_2); lean_inc(x_3); -x_285 = l_Lean_IR_Checker_checkObjType(x_1, x_3, x_4); -x_286 = lean_ctor_get(x_285, 0); -lean_inc(x_286); -if (lean_obj_tag(x_286) == 0) +x_299 = l_Lean_IR_Checker_checkObjType(x_1, x_3, x_4); +x_300 = lean_ctor_get(x_299, 0); +lean_inc(x_300); +if (lean_obj_tag(x_300) == 0) { -uint8_t x_287; -lean_dec(x_284); -lean_dec(x_283); +uint8_t x_301; +lean_dec(x_298); +lean_dec(x_297); lean_dec(x_3); -x_287 = !lean_is_exclusive(x_285); -if (x_287 == 0) +x_301 = !lean_is_exclusive(x_299); +if (x_301 == 0) { -lean_object* x_288; uint8_t x_289; -x_288 = lean_ctor_get(x_285, 0); -lean_dec(x_288); -x_289 = !lean_is_exclusive(x_286); -if (x_289 == 0) +lean_object* x_302; uint8_t x_303; +x_302 = lean_ctor_get(x_299, 0); +lean_dec(x_302); +x_303 = !lean_is_exclusive(x_300); +if (x_303 == 0) { -return x_285; +return x_299; } else { -lean_object* x_290; lean_object* x_291; -x_290 = lean_ctor_get(x_286, 0); -lean_inc(x_290); -lean_dec(x_286); -x_291 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_291, 0, x_290); -lean_ctor_set(x_285, 0, x_291); -return x_285; +lean_object* x_304; lean_object* x_305; +x_304 = lean_ctor_get(x_300, 0); +lean_inc(x_304); +lean_dec(x_300); +x_305 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_305, 0, x_304); +lean_ctor_set(x_299, 0, x_305); +return x_299; } } else { -lean_object* x_292; lean_object* x_293; lean_object* x_294; lean_object* x_295; lean_object* x_296; -x_292 = lean_ctor_get(x_285, 1); -lean_inc(x_292); -lean_dec(x_285); -x_293 = lean_ctor_get(x_286, 0); -lean_inc(x_293); -if (lean_is_exclusive(x_286)) { - lean_ctor_release(x_286, 0); - x_294 = x_286; +lean_object* x_306; lean_object* x_307; lean_object* x_308; lean_object* x_309; lean_object* x_310; +x_306 = lean_ctor_get(x_299, 1); +lean_inc(x_306); +lean_dec(x_299); +x_307 = lean_ctor_get(x_300, 0); +lean_inc(x_307); +if (lean_is_exclusive(x_300)) { + lean_ctor_release(x_300, 0); + x_308 = x_300; } else { - lean_dec_ref(x_286); - x_294 = lean_box(0); + lean_dec_ref(x_300); + x_308 = lean_box(0); } -if (lean_is_scalar(x_294)) { - x_295 = lean_alloc_ctor(0, 1, 0); +if (lean_is_scalar(x_308)) { + x_309 = lean_alloc_ctor(0, 1, 0); } else { - x_295 = x_294; + x_309 = x_308; } -lean_ctor_set(x_295, 0, x_293); -x_296 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_296, 0, x_295); -lean_ctor_set(x_296, 1, x_292); -return x_296; +lean_ctor_set(x_309, 0, x_307); +x_310 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_310, 0, x_309); +lean_ctor_set(x_310, 1, x_306); +return x_310; } } else { -lean_object* x_297; lean_object* x_298; lean_object* x_299; -lean_dec(x_286); -x_297 = lean_ctor_get(x_285, 1); -lean_inc(x_297); -lean_dec(x_285); +lean_object* x_311; lean_object* x_312; lean_object* x_313; +lean_dec(x_300); +x_311 = lean_ctor_get(x_299, 1); +lean_inc(x_311); +lean_dec(x_299); lean_inc(x_3); -lean_inc(x_284); -x_298 = l_Lean_IR_Checker_checkScalarVar(x_284, x_3, x_297); -x_299 = lean_ctor_get(x_298, 0); -lean_inc(x_299); -if (lean_obj_tag(x_299) == 0) +lean_inc(x_298); +x_312 = l_Lean_IR_Checker_checkScalarVar(x_298, x_3, x_311); +x_313 = lean_ctor_get(x_312, 0); +lean_inc(x_313); +if (lean_obj_tag(x_313) == 0) { -uint8_t x_300; -lean_dec(x_284); -lean_dec(x_283); +uint8_t x_314; +lean_dec(x_298); +lean_dec(x_297); lean_dec(x_3); -x_300 = !lean_is_exclusive(x_298); -if (x_300 == 0) +x_314 = !lean_is_exclusive(x_312); +if (x_314 == 0) { -lean_object* x_301; uint8_t x_302; -x_301 = lean_ctor_get(x_298, 0); -lean_dec(x_301); -x_302 = !lean_is_exclusive(x_299); -if (x_302 == 0) +lean_object* x_315; uint8_t x_316; +x_315 = lean_ctor_get(x_312, 0); +lean_dec(x_315); +x_316 = !lean_is_exclusive(x_313); +if (x_316 == 0) { -return x_298; +return x_312; } else { -lean_object* x_303; lean_object* x_304; -x_303 = lean_ctor_get(x_299, 0); -lean_inc(x_303); -lean_dec(x_299); -x_304 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_304, 0, x_303); -lean_ctor_set(x_298, 0, x_304); -return x_298; +lean_object* x_317; lean_object* x_318; +x_317 = lean_ctor_get(x_313, 0); +lean_inc(x_317); +lean_dec(x_313); +x_318 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_318, 0, x_317); +lean_ctor_set(x_312, 0, x_318); +return x_312; } } else { -lean_object* x_305; lean_object* x_306; lean_object* x_307; lean_object* x_308; lean_object* x_309; -x_305 = lean_ctor_get(x_298, 1); -lean_inc(x_305); -lean_dec(x_298); -x_306 = lean_ctor_get(x_299, 0); -lean_inc(x_306); -if (lean_is_exclusive(x_299)) { - lean_ctor_release(x_299, 0); - x_307 = x_299; +lean_object* x_319; lean_object* x_320; lean_object* x_321; lean_object* x_322; lean_object* x_323; +x_319 = lean_ctor_get(x_312, 1); +lean_inc(x_319); +lean_dec(x_312); +x_320 = lean_ctor_get(x_313, 0); +lean_inc(x_320); +if (lean_is_exclusive(x_313)) { + lean_ctor_release(x_313, 0); + x_321 = x_313; } else { - lean_dec_ref(x_299); - x_307 = lean_box(0); + lean_dec_ref(x_313); + x_321 = lean_box(0); } -if (lean_is_scalar(x_307)) { - x_308 = lean_alloc_ctor(0, 1, 0); +if (lean_is_scalar(x_321)) { + x_322 = lean_alloc_ctor(0, 1, 0); } else { - x_308 = x_307; + x_322 = x_321; } -lean_ctor_set(x_308, 0, x_306); -x_309 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_309, 0, x_308); -lean_ctor_set(x_309, 1, x_305); -return x_309; +lean_ctor_set(x_322, 0, x_320); +x_323 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_323, 0, x_322); +lean_ctor_set(x_323, 1, x_319); +return x_323; } } else { -lean_object* x_310; lean_object* x_311; lean_object* x_312; -lean_dec(x_299); -x_310 = lean_ctor_get(x_298, 1); -lean_inc(x_310); -lean_dec(x_298); -x_311 = l_Lean_IR_Checker_getType(x_284, x_3, x_310); -x_312 = lean_ctor_get(x_311, 0); -lean_inc(x_312); -if (lean_obj_tag(x_312) == 0) +lean_object* x_324; lean_object* x_325; lean_object* x_326; +lean_dec(x_313); +x_324 = lean_ctor_get(x_312, 1); +lean_inc(x_324); +lean_dec(x_312); +x_325 = l_Lean_IR_Checker_getType(x_298, x_3, x_324); +x_326 = lean_ctor_get(x_325, 0); +lean_inc(x_326); +if (lean_obj_tag(x_326) == 0) { -uint8_t x_313; -lean_dec(x_283); +uint8_t x_327; +lean_dec(x_297); lean_dec(x_3); -x_313 = !lean_is_exclusive(x_311); -if (x_313 == 0) +x_327 = !lean_is_exclusive(x_325); +if (x_327 == 0) { -lean_object* x_314; uint8_t x_315; -x_314 = lean_ctor_get(x_311, 0); -lean_dec(x_314); -x_315 = !lean_is_exclusive(x_312); -if (x_315 == 0) +lean_object* x_328; uint8_t x_329; +x_328 = lean_ctor_get(x_325, 0); +lean_dec(x_328); +x_329 = !lean_is_exclusive(x_326); +if (x_329 == 0) { -return x_311; +return x_325; } else { -lean_object* x_316; lean_object* x_317; -x_316 = lean_ctor_get(x_312, 0); -lean_inc(x_316); -lean_dec(x_312); -x_317 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_317, 0, x_316); -lean_ctor_set(x_311, 0, x_317); -return x_311; +lean_object* x_330; lean_object* x_331; +x_330 = lean_ctor_get(x_326, 0); +lean_inc(x_330); +lean_dec(x_326); +x_331 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_331, 0, x_330); +lean_ctor_set(x_325, 0, x_331); +return x_325; } } else { -lean_object* x_318; lean_object* x_319; lean_object* x_320; lean_object* x_321; lean_object* x_322; -x_318 = lean_ctor_get(x_311, 1); -lean_inc(x_318); -lean_dec(x_311); -x_319 = lean_ctor_get(x_312, 0); -lean_inc(x_319); -if (lean_is_exclusive(x_312)) { - lean_ctor_release(x_312, 0); - x_320 = x_312; +lean_object* x_332; lean_object* x_333; lean_object* x_334; lean_object* x_335; lean_object* x_336; +x_332 = lean_ctor_get(x_325, 1); +lean_inc(x_332); +lean_dec(x_325); +x_333 = lean_ctor_get(x_326, 0); +lean_inc(x_333); +if (lean_is_exclusive(x_326)) { + lean_ctor_release(x_326, 0); + x_334 = x_326; } else { - lean_dec_ref(x_312); - x_320 = lean_box(0); + lean_dec_ref(x_326); + x_334 = lean_box(0); } -if (lean_is_scalar(x_320)) { - x_321 = lean_alloc_ctor(0, 1, 0); +if (lean_is_scalar(x_334)) { + x_335 = lean_alloc_ctor(0, 1, 0); } else { - x_321 = x_320; + x_335 = x_334; } -lean_ctor_set(x_321, 0, x_319); -x_322 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_322, 0, x_321); -lean_ctor_set(x_322, 1, x_318); -return x_322; +lean_ctor_set(x_335, 0, x_333); +x_336 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_336, 0, x_335); +lean_ctor_set(x_336, 1, x_332); +return x_336; } } else { -uint8_t x_323; -x_323 = !lean_is_exclusive(x_311); -if (x_323 == 0) +uint8_t x_337; +x_337 = !lean_is_exclusive(x_325); +if (x_337 == 0) { -lean_object* x_324; lean_object* x_325; lean_object* x_326; uint8_t x_327; -x_324 = lean_ctor_get(x_311, 1); -x_325 = lean_ctor_get(x_311, 0); -lean_dec(x_325); -x_326 = lean_ctor_get(x_312, 0); -lean_inc(x_326); -lean_dec(x_312); -x_327 = l_Lean_IR_IRType_beq(x_326, x_283); -lean_dec(x_283); -if (x_327 == 0) -{ -lean_object* x_328; lean_object* x_329; lean_object* x_330; lean_object* x_331; lean_object* x_332; lean_object* x_333; lean_object* x_334; lean_object* x_335; lean_object* x_336; lean_object* x_337; -lean_free_object(x_311); -x_328 = l___private_Lean_Compiler_IR_Format_0__Lean_IR_formatIRType(x_326); -x_329 = l_Std_Format_defWidth; -x_330 = lean_format_pretty(x_328, x_329); -x_331 = l_Lean_IR_Checker_checkType___closed__1; -x_332 = lean_string_append(x_331, x_330); -lean_dec(x_330); -x_333 = l_Lean_IR_Checker_getDecl___closed__2; -x_334 = lean_string_append(x_332, x_333); -x_335 = l_Lean_IR_Checker_checkType___closed__2; -x_336 = lean_box(0); -x_337 = lean_apply_4(x_335, x_334, x_336, x_3, x_324); -return x_337; -} -else -{ -lean_object* x_338; -lean_dec(x_326); -lean_dec(x_3); -x_338 = l_Lean_IR_Checker_markIndex___lambda__1___closed__1; -lean_ctor_set(x_311, 0, x_338); -return x_311; -} -} -else -{ -lean_object* x_339; lean_object* x_340; uint8_t x_341; -x_339 = lean_ctor_get(x_311, 1); -lean_inc(x_339); -lean_dec(x_311); -x_340 = lean_ctor_get(x_312, 0); +lean_object* x_338; lean_object* x_339; lean_object* x_340; uint8_t x_341; +x_338 = lean_ctor_get(x_325, 1); +x_339 = lean_ctor_get(x_325, 0); +lean_dec(x_339); +x_340 = lean_ctor_get(x_326, 0); lean_inc(x_340); -lean_dec(x_312); -x_341 = l_Lean_IR_IRType_beq(x_340, x_283); -lean_dec(x_283); +lean_dec(x_326); +x_341 = l_Lean_IR_IRType_beq(x_340, x_297); +lean_dec(x_297); if (x_341 == 0) { lean_object* x_342; lean_object* x_343; lean_object* x_344; lean_object* x_345; lean_object* x_346; lean_object* x_347; lean_object* x_348; lean_object* x_349; lean_object* x_350; lean_object* x_351; +lean_free_object(x_325); x_342 = l___private_Lean_Compiler_IR_Format_0__Lean_IR_formatIRType(x_340); x_343 = l_Std_Format_defWidth; x_344 = lean_format_pretty(x_342, x_343); @@ -3927,19 +4041,56 @@ x_347 = l_Lean_IR_Checker_getDecl___closed__2; x_348 = lean_string_append(x_346, x_347); x_349 = l_Lean_IR_Checker_checkType___closed__2; x_350 = lean_box(0); -x_351 = lean_apply_4(x_349, x_348, x_350, x_3, x_339); +x_351 = lean_apply_4(x_349, x_348, x_350, x_3, x_338); return x_351; } else { -lean_object* x_352; lean_object* x_353; +lean_object* x_352; lean_dec(x_340); lean_dec(x_3); x_352 = l_Lean_IR_Checker_markIndex___lambda__1___closed__1; -x_353 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_353, 0, x_352); -lean_ctor_set(x_353, 1, x_339); -return x_353; +lean_ctor_set(x_325, 0, x_352); +return x_325; +} +} +else +{ +lean_object* x_353; lean_object* x_354; uint8_t x_355; +x_353 = lean_ctor_get(x_325, 1); +lean_inc(x_353); +lean_dec(x_325); +x_354 = lean_ctor_get(x_326, 0); +lean_inc(x_354); +lean_dec(x_326); +x_355 = l_Lean_IR_IRType_beq(x_354, x_297); +lean_dec(x_297); +if (x_355 == 0) +{ +lean_object* x_356; lean_object* x_357; lean_object* x_358; lean_object* x_359; lean_object* x_360; lean_object* x_361; lean_object* x_362; lean_object* x_363; lean_object* x_364; lean_object* x_365; +x_356 = l___private_Lean_Compiler_IR_Format_0__Lean_IR_formatIRType(x_354); +x_357 = l_Std_Format_defWidth; +x_358 = lean_format_pretty(x_356, x_357); +x_359 = l_Lean_IR_Checker_checkType___closed__1; +x_360 = lean_string_append(x_359, x_358); +lean_dec(x_358); +x_361 = l_Lean_IR_Checker_getDecl___closed__2; +x_362 = lean_string_append(x_360, x_361); +x_363 = l_Lean_IR_Checker_checkType___closed__2; +x_364 = lean_box(0); +x_365 = lean_apply_4(x_363, x_362, x_364, x_3, x_353); +return x_365; +} +else +{ +lean_object* x_366; lean_object* x_367; +lean_dec(x_354); +lean_dec(x_3); +x_366 = l_Lean_IR_Checker_markIndex___lambda__1___closed__1; +x_367 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_367, 0, x_366); +lean_ctor_set(x_367, 1, x_353); +return x_367; } } } @@ -3948,222 +4099,188 @@ return x_353; } case 10: { -lean_object* x_354; lean_object* x_355; lean_object* x_356; -x_354 = lean_ctor_get(x_2, 0); -lean_inc(x_354); +lean_object* x_368; lean_object* x_369; lean_object* x_370; +x_368 = lean_ctor_get(x_2, 0); +lean_inc(x_368); lean_dec(x_2); lean_inc(x_3); -x_355 = l_Lean_IR_Checker_checkScalarType(x_1, x_3, x_4); -x_356 = lean_ctor_get(x_355, 0); -lean_inc(x_356); -if (lean_obj_tag(x_356) == 0) +x_369 = l_Lean_IR_Checker_checkScalarType(x_1, x_3, x_4); +x_370 = lean_ctor_get(x_369, 0); +lean_inc(x_370); +if (lean_obj_tag(x_370) == 0) { -uint8_t x_357; -lean_dec(x_354); +uint8_t x_371; +lean_dec(x_368); lean_dec(x_3); -x_357 = !lean_is_exclusive(x_355); -if (x_357 == 0) +x_371 = !lean_is_exclusive(x_369); +if (x_371 == 0) { -lean_object* x_358; uint8_t x_359; -x_358 = lean_ctor_get(x_355, 0); -lean_dec(x_358); -x_359 = !lean_is_exclusive(x_356); -if (x_359 == 0) +lean_object* x_372; uint8_t x_373; +x_372 = lean_ctor_get(x_369, 0); +lean_dec(x_372); +x_373 = !lean_is_exclusive(x_370); +if (x_373 == 0) { -return x_355; +return x_369; } else { -lean_object* x_360; lean_object* x_361; -x_360 = lean_ctor_get(x_356, 0); -lean_inc(x_360); -lean_dec(x_356); -x_361 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_361, 0, x_360); -lean_ctor_set(x_355, 0, x_361); -return x_355; +lean_object* x_374; lean_object* x_375; +x_374 = lean_ctor_get(x_370, 0); +lean_inc(x_374); +lean_dec(x_370); +x_375 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_375, 0, x_374); +lean_ctor_set(x_369, 0, x_375); +return x_369; } } else { -lean_object* x_362; lean_object* x_363; lean_object* x_364; lean_object* x_365; lean_object* x_366; -x_362 = lean_ctor_get(x_355, 1); -lean_inc(x_362); -lean_dec(x_355); -x_363 = lean_ctor_get(x_356, 0); -lean_inc(x_363); -if (lean_is_exclusive(x_356)) { - lean_ctor_release(x_356, 0); - x_364 = x_356; +lean_object* x_376; lean_object* x_377; lean_object* x_378; lean_object* x_379; lean_object* x_380; +x_376 = lean_ctor_get(x_369, 1); +lean_inc(x_376); +lean_dec(x_369); +x_377 = lean_ctor_get(x_370, 0); +lean_inc(x_377); +if (lean_is_exclusive(x_370)) { + lean_ctor_release(x_370, 0); + x_378 = x_370; } else { - lean_dec_ref(x_356); - x_364 = lean_box(0); + lean_dec_ref(x_370); + x_378 = lean_box(0); } -if (lean_is_scalar(x_364)) { - x_365 = lean_alloc_ctor(0, 1, 0); +if (lean_is_scalar(x_378)) { + x_379 = lean_alloc_ctor(0, 1, 0); } else { - x_365 = x_364; + x_379 = x_378; } -lean_ctor_set(x_365, 0, x_363); -x_366 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_366, 0, x_365); -lean_ctor_set(x_366, 1, x_362); -return x_366; +lean_ctor_set(x_379, 0, x_377); +x_380 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_380, 0, x_379); +lean_ctor_set(x_380, 1, x_376); +return x_380; } } else { -lean_object* x_367; lean_object* x_368; -lean_dec(x_356); -x_367 = lean_ctor_get(x_355, 1); -lean_inc(x_367); -lean_dec(x_355); -x_368 = l_Lean_IR_Checker_checkObjVar(x_354, x_3, x_367); -return x_368; +lean_object* x_381; lean_object* x_382; +lean_dec(x_370); +x_381 = lean_ctor_get(x_369, 1); +lean_inc(x_381); +lean_dec(x_369); +x_382 = l_Lean_IR_Checker_checkObjVar(x_368, x_3, x_381); +return x_382; } } case 11: { -lean_object* x_369; -x_369 = lean_ctor_get(x_2, 0); -lean_inc(x_369); +lean_object* x_383; +x_383 = lean_ctor_get(x_2, 0); +lean_inc(x_383); lean_dec(x_2); -if (lean_obj_tag(x_369) == 0) +if (lean_obj_tag(x_383) == 0) { -lean_object* x_370; lean_object* x_371; -lean_dec(x_369); +lean_object* x_384; lean_object* x_385; +lean_dec(x_383); lean_dec(x_3); lean_dec(x_1); -x_370 = l_Lean_IR_Checker_markIndex___lambda__1___closed__1; -x_371 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_371, 0, x_370); -lean_ctor_set(x_371, 1, x_4); -return x_371; +x_384 = l_Lean_IR_Checker_markIndex___lambda__1___closed__1; +x_385 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_385, 0, x_384); +lean_ctor_set(x_385, 1, x_4); +return x_385; } else { -lean_object* x_372; -lean_dec(x_369); -x_372 = l_Lean_IR_Checker_checkObjType(x_1, x_3, x_4); -return x_372; +lean_object* x_386; +lean_dec(x_383); +x_386 = l_Lean_IR_Checker_checkObjType(x_1, x_3, x_4); +return x_386; } } default: { -lean_object* x_373; lean_object* x_374; lean_object* x_375; -x_373 = lean_ctor_get(x_2, 0); -lean_inc(x_373); +lean_object* x_387; lean_object* x_388; lean_object* x_389; +x_387 = lean_ctor_get(x_2, 0); +lean_inc(x_387); lean_dec(x_2); lean_inc(x_3); -x_374 = l_Lean_IR_Checker_checkObjVar(x_373, x_3, x_4); -x_375 = lean_ctor_get(x_374, 0); -lean_inc(x_375); -if (lean_obj_tag(x_375) == 0) +x_388 = l_Lean_IR_Checker_checkObjVar(x_387, x_3, x_4); +x_389 = lean_ctor_get(x_388, 0); +lean_inc(x_389); +if (lean_obj_tag(x_389) == 0) { -uint8_t x_376; +uint8_t x_390; lean_dec(x_3); lean_dec(x_1); -x_376 = !lean_is_exclusive(x_374); -if (x_376 == 0) +x_390 = !lean_is_exclusive(x_388); +if (x_390 == 0) { -lean_object* x_377; uint8_t x_378; -x_377 = lean_ctor_get(x_374, 0); -lean_dec(x_377); -x_378 = !lean_is_exclusive(x_375); -if (x_378 == 0) +lean_object* x_391; uint8_t x_392; +x_391 = lean_ctor_get(x_388, 0); +lean_dec(x_391); +x_392 = !lean_is_exclusive(x_389); +if (x_392 == 0) { -return x_374; +return x_388; } else { -lean_object* x_379; lean_object* x_380; -x_379 = lean_ctor_get(x_375, 0); -lean_inc(x_379); -lean_dec(x_375); -x_380 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_380, 0, x_379); -lean_ctor_set(x_374, 0, x_380); -return x_374; +lean_object* x_393; lean_object* x_394; +x_393 = lean_ctor_get(x_389, 0); +lean_inc(x_393); +lean_dec(x_389); +x_394 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_394, 0, x_393); +lean_ctor_set(x_388, 0, x_394); +return x_388; } } else { -lean_object* x_381; lean_object* x_382; lean_object* x_383; lean_object* x_384; lean_object* x_385; -x_381 = lean_ctor_get(x_374, 1); -lean_inc(x_381); -lean_dec(x_374); -x_382 = lean_ctor_get(x_375, 0); -lean_inc(x_382); -if (lean_is_exclusive(x_375)) { - lean_ctor_release(x_375, 0); - x_383 = x_375; +lean_object* x_395; lean_object* x_396; lean_object* x_397; lean_object* x_398; lean_object* x_399; +x_395 = lean_ctor_get(x_388, 1); +lean_inc(x_395); +lean_dec(x_388); +x_396 = lean_ctor_get(x_389, 0); +lean_inc(x_396); +if (lean_is_exclusive(x_389)) { + lean_ctor_release(x_389, 0); + x_397 = x_389; } else { - lean_dec_ref(x_375); - x_383 = lean_box(0); + lean_dec_ref(x_389); + x_397 = lean_box(0); } -if (lean_is_scalar(x_383)) { - x_384 = lean_alloc_ctor(0, 1, 0); +if (lean_is_scalar(x_397)) { + x_398 = lean_alloc_ctor(0, 1, 0); } else { - x_384 = x_383; -} -lean_ctor_set(x_384, 0, x_382); -x_385 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_385, 0, x_384); -lean_ctor_set(x_385, 1, x_381); -return x_385; + x_398 = x_397; } +lean_ctor_set(x_398, 0, x_396); +x_399 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_399, 0, x_398); +lean_ctor_set(x_399, 1, x_395); +return x_399; } -else -{ -uint8_t x_386; -lean_dec(x_375); -x_386 = !lean_is_exclusive(x_374); -if (x_386 == 0) -{ -lean_object* x_387; lean_object* x_388; lean_object* x_389; uint8_t x_390; -x_387 = lean_ctor_get(x_374, 1); -x_388 = lean_ctor_get(x_374, 0); -lean_dec(x_388); -x_389 = lean_box(1); -x_390 = l_Lean_IR_IRType_beq(x_1, x_389); -if (x_390 == 0) -{ -lean_object* x_391; lean_object* x_392; lean_object* x_393; lean_object* x_394; lean_object* x_395; lean_object* x_396; lean_object* x_397; lean_object* x_398; lean_object* x_399; lean_object* x_400; -lean_free_object(x_374); -x_391 = l___private_Lean_Compiler_IR_Format_0__Lean_IR_formatIRType(x_1); -x_392 = l_Std_Format_defWidth; -x_393 = lean_format_pretty(x_391, x_392); -x_394 = l_Lean_IR_Checker_checkType___closed__1; -x_395 = lean_string_append(x_394, x_393); -lean_dec(x_393); -x_396 = l_Lean_IR_Checker_getDecl___closed__2; -x_397 = lean_string_append(x_395, x_396); -x_398 = l_Lean_IR_Checker_checkType___closed__2; -x_399 = lean_box(0); -x_400 = lean_apply_4(x_398, x_397, x_399, x_3, x_387); -return x_400; } else { -lean_object* x_401; -lean_dec(x_3); -lean_dec(x_1); -x_401 = l_Lean_IR_Checker_markIndex___lambda__1___closed__1; -lean_ctor_set(x_374, 0, x_401); -return x_374; -} -} -else +uint8_t x_400; +lean_dec(x_389); +x_400 = !lean_is_exclusive(x_388); +if (x_400 == 0) { -lean_object* x_402; lean_object* x_403; uint8_t x_404; -x_402 = lean_ctor_get(x_374, 1); -lean_inc(x_402); -lean_dec(x_374); +lean_object* x_401; lean_object* x_402; lean_object* x_403; uint8_t x_404; +x_401 = lean_ctor_get(x_388, 1); +x_402 = lean_ctor_get(x_388, 0); +lean_dec(x_402); x_403 = lean_box(1); x_404 = l_Lean_IR_IRType_beq(x_1, x_403); if (x_404 == 0) { lean_object* x_405; lean_object* x_406; lean_object* x_407; lean_object* x_408; lean_object* x_409; lean_object* x_410; lean_object* x_411; lean_object* x_412; lean_object* x_413; lean_object* x_414; +lean_free_object(x_388); x_405 = l___private_Lean_Compiler_IR_Format_0__Lean_IR_formatIRType(x_1); x_406 = l_Std_Format_defWidth; x_407 = lean_format_pretty(x_405, x_406); @@ -4174,19 +4291,53 @@ x_410 = l_Lean_IR_Checker_getDecl___closed__2; x_411 = lean_string_append(x_409, x_410); x_412 = l_Lean_IR_Checker_checkType___closed__2; x_413 = lean_box(0); -x_414 = lean_apply_4(x_412, x_411, x_413, x_3, x_402); +x_414 = lean_apply_4(x_412, x_411, x_413, x_3, x_401); return x_414; } else { -lean_object* x_415; lean_object* x_416; +lean_object* x_415; lean_dec(x_3); lean_dec(x_1); x_415 = l_Lean_IR_Checker_markIndex___lambda__1___closed__1; -x_416 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_416, 0, x_415); -lean_ctor_set(x_416, 1, x_402); -return x_416; +lean_ctor_set(x_388, 0, x_415); +return x_388; +} +} +else +{ +lean_object* x_416; lean_object* x_417; uint8_t x_418; +x_416 = lean_ctor_get(x_388, 1); +lean_inc(x_416); +lean_dec(x_388); +x_417 = lean_box(1); +x_418 = l_Lean_IR_IRType_beq(x_1, x_417); +if (x_418 == 0) +{ +lean_object* x_419; lean_object* x_420; lean_object* x_421; lean_object* x_422; lean_object* x_423; lean_object* x_424; lean_object* x_425; lean_object* x_426; lean_object* x_427; lean_object* x_428; +x_419 = l___private_Lean_Compiler_IR_Format_0__Lean_IR_formatIRType(x_1); +x_420 = l_Std_Format_defWidth; +x_421 = lean_format_pretty(x_419, x_420); +x_422 = l_Lean_IR_Checker_checkType___closed__1; +x_423 = lean_string_append(x_422, x_421); +lean_dec(x_421); +x_424 = l_Lean_IR_Checker_getDecl___closed__2; +x_425 = lean_string_append(x_423, x_424); +x_426 = l_Lean_IR_Checker_checkType___closed__2; +x_427 = lean_box(0); +x_428 = lean_apply_4(x_426, x_425, x_427, x_3, x_416); +return x_428; +} +else +{ +lean_object* x_429; lean_object* x_430; +lean_dec(x_3); +lean_dec(x_1); +x_429 = l_Lean_IR_Checker_markIndex___lambda__1___closed__1; +x_430 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_430, 0, x_429); +lean_ctor_set(x_430, 1, x_416); +return x_430; } } } @@ -4214,6 +4365,15 @@ lean_dec(x_3); return x_7; } } +LEAN_EXPORT lean_object* l_Lean_IR_Checker_checkExpr___lambda__3___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +_start: +{ +lean_object* x_7; +x_7 = l_Lean_IR_Checker_checkExpr___lambda__3(x_1, x_2, x_3, x_4, x_5, x_6); +lean_dec(x_3); +return x_7; +} +} LEAN_EXPORT lean_object* l_Array_foldlMUnsafe_fold___at_Lean_IR_Checker_withParams___spec__1(lean_object* x_1, size_t x_2, size_t x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { _start: { @@ -6417,7 +6577,7 @@ static lean_object* _init_l_Lean_IR_checkDecl___closed__1() { _start: { lean_object* x_1; -x_1 = lean_mk_string_from_bytes("IR check failed at '", 20); +x_1 = lean_mk_string_from_bytes("compiler IR check failed at '", 29); return x_1; } } @@ -6699,6 +6859,10 @@ l_Lean_IR_Checker_maxCtorScalarsSize___closed__1 = _init_l_Lean_IR_Checker_maxCt lean_mark_persistent(l_Lean_IR_Checker_maxCtorScalarsSize___closed__1); l_Lean_IR_Checker_maxCtorScalarsSize = _init_l_Lean_IR_Checker_maxCtorScalarsSize(); lean_mark_persistent(l_Lean_IR_Checker_maxCtorScalarsSize); +l_Lean_IR_Checker_maxCtorTag___closed__1 = _init_l_Lean_IR_Checker_maxCtorTag___closed__1(); +lean_mark_persistent(l_Lean_IR_Checker_maxCtorTag___closed__1); +l_Lean_IR_Checker_maxCtorTag = _init_l_Lean_IR_Checker_maxCtorTag(); +lean_mark_persistent(l_Lean_IR_Checker_maxCtorTag); l_Lean_IR_Checker_usizeSize___closed__1 = _init_l_Lean_IR_Checker_usizeSize___closed__1(); lean_mark_persistent(l_Lean_IR_Checker_usizeSize___closed__1); l_Lean_IR_Checker_usizeSize = _init_l_Lean_IR_Checker_usizeSize(); @@ -6759,6 +6923,8 @@ l_Lean_IR_Checker_checkExpr___lambda__2___closed__1 = _init_l_Lean_IR_Checker_ch lean_mark_persistent(l_Lean_IR_Checker_checkExpr___lambda__2___closed__1); l_Lean_IR_Checker_checkExpr___lambda__2___closed__2 = _init_l_Lean_IR_Checker_checkExpr___lambda__2___closed__2(); lean_mark_persistent(l_Lean_IR_Checker_checkExpr___lambda__2___closed__2); +l_Lean_IR_Checker_checkExpr___lambda__3___closed__1 = _init_l_Lean_IR_Checker_checkExpr___lambda__3___closed__1(); +lean_mark_persistent(l_Lean_IR_Checker_checkExpr___lambda__3___closed__1); l_Lean_IR_Checker_checkExpr___closed__1 = _init_l_Lean_IR_Checker_checkExpr___closed__1(); lean_mark_persistent(l_Lean_IR_Checker_checkExpr___closed__1); l_Lean_IR_Checker_checkExpr___closed__2 = _init_l_Lean_IR_Checker_checkExpr___closed__2(); @@ -6767,6 +6933,8 @@ l_Lean_IR_Checker_checkExpr___closed__3 = _init_l_Lean_IR_Checker_checkExpr___cl lean_mark_persistent(l_Lean_IR_Checker_checkExpr___closed__3); l_Lean_IR_Checker_checkExpr___closed__4 = _init_l_Lean_IR_Checker_checkExpr___closed__4(); lean_mark_persistent(l_Lean_IR_Checker_checkExpr___closed__4); +l_Lean_IR_Checker_checkExpr___closed__5 = _init_l_Lean_IR_Checker_checkExpr___closed__5(); +lean_mark_persistent(l_Lean_IR_Checker_checkExpr___closed__5); l_Lean_IR_checkDecl___closed__1 = _init_l_Lean_IR_checkDecl___closed__1(); lean_mark_persistent(l_Lean_IR_checkDecl___closed__1); l_Lean_IR_checkDecl___closed__2 = _init_l_Lean_IR_checkDecl___closed__2(); diff --git a/stage0/stdlib/Lean/Compiler/LCNF/MonoTypes.c b/stage0/stdlib/Lean/Compiler/LCNF/MonoTypes.c index a87204fc0023..3b557a2423e5 100644 --- a/stage0/stdlib/Lean/Compiler/LCNF/MonoTypes.c +++ b/stage0/stdlib/Lean/Compiler/LCNF/MonoTypes.c @@ -1,6 +1,6 @@ // Lean compiler output // Module: Lean.Compiler.LCNF.MonoTypes -// Imports: Init Lean.Meta.InferType Lean.Compiler.LCNF.Util Lean.Compiler.LCNF.BaseTypes Lean.Compiler.LCNF.CompilerM +// Imports: Init Lean.Meta.InferType Lean.Compiler.OpaqueReprAttr Lean.Compiler.LCNF.Util Lean.Compiler.LCNF.BaseTypes Lean.Compiler.LCNF.CompilerM #include #if defined(__clang__) #pragma clang diagnostic ignored "-Wunused-parameter" @@ -19,6 +19,7 @@ lean_object* l___private_Init_Util_0__outOfBounds___rarg(lean_object*); lean_object* l_Lean_Name_reprPrec(lean_object*, lean_object*); static lean_object* l_Lean_Compiler_LCNF_toMonoType_visitApp___closed__2; LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_toMonoType_visitApp___spec__2___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_MonoTypes___hyg_1989____closed__1; LEAN_EXPORT lean_object* l_Lean_Expr_withAppAux___at_Lean_Compiler_LCNF_toMonoType___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l___private_Lean_Compiler_LCNF_MonoTypes_0__Lean_Compiler_LCNF_reprTrivialStructureInfo____x40_Lean_Compiler_LCNF_MonoTypes___hyg_468____closed__15; static lean_object* l___private_Lean_Compiler_LCNF_MonoTypes_0__Lean_Compiler_LCNF_reprTrivialStructureInfo____x40_Lean_Compiler_LCNF_MonoTypes___hyg_468____closed__11; @@ -29,12 +30,10 @@ static lean_object* l_Lean_Compiler_LCNF_getRelevantCtorFields___closed__9; lean_object* l___private_Lean_Expr_0__Lean_Expr_getAppNumArgsAux(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_toMonoType_visitApp(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_monoTypeExt; -extern lean_object* l_Lean_Compiler_LCNF_builtinRuntimeTypes; LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_hasTrivialStructure_x3f___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l___private_Lean_Compiler_LCNF_MonoTypes_0__Lean_Compiler_LCNF_reprTrivialStructureInfo____x40_Lean_Compiler_LCNF_MonoTypes___hyg_468____closed__9; lean_object* l_Lean_Meta_isProp(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Compiler_LCNF_getRelevantCtorFields___closed__30; -uint8_t l_List_elem___at_Lean_NameHashSet_insert___spec__2(lean_object*, lean_object*); static lean_object* l___private_Lean_Compiler_LCNF_MonoTypes_0__Lean_Compiler_LCNF_reprTrivialStructureInfo____x40_Lean_Compiler_LCNF_MonoTypes___hyg_468____closed__3; lean_object* l_Lean_Core_instInhabitedCoreM___boxed(lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Compiler_LCNF_getRelevantCtorFields___closed__11; @@ -62,6 +61,7 @@ static lean_object* l_Lean_Compiler_LCNF_toMonoType_visitApp___closed__4; static lean_object* l_Lean_Compiler_LCNF_getRelevantCtorFields___closed__7; static lean_object* l_Lean_Compiler_LCNF_getRelevantCtorFields___closed__21; static lean_object* l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_toMonoType_visitApp___spec__2___closed__1; +extern lean_object* l_Lean_opaqueReprAttr; static lean_object* l_Lean_Compiler_LCNF_instInhabitedTrivialStructureInfo___closed__1; extern lean_object* l_Lean_Expr_instBEqExpr; static lean_object* l_Lean_Compiler_LCNF_getRelevantCtorFields___closed__4; @@ -81,12 +81,12 @@ LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_instReprTrivialStructureInfo; static lean_object* l_Lean_Compiler_LCNF_toMonoType_visitApp___closed__3; lean_object* l_Lean_EnvExtensionInterfaceUnsafe_getState___rarg(lean_object*, lean_object*, lean_object*); lean_object* lean_nat_to_int(lean_object*); +uint8_t l_Lean_TagAttribute_hasTag(lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Compiler_LCNF_getRelevantCtorFields___closed__6; LEAN_EXPORT lean_object* l___private_Lean_Compiler_LCNF_MonoTypes_0__Lean_Compiler_LCNF_reprTrivialStructureInfo____x40_Lean_Compiler_LCNF_MonoTypes___hyg_468_(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_hasTrivialStructure_x3f___lambda__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Compiler_LCNF_toMonoType___closed__1; LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_instInhabitedMonoTypeExtState; -LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_MonoTypes___hyg_1970_(lean_object*); lean_object* l_Lean_Meta_isTypeFormerType(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Compiler_LCNF_getRelevantCtorFields___closed__5; static lean_object* l___private_Lean_Compiler_LCNF_MonoTypes_0__Lean_Compiler_LCNF_reprTrivialStructureInfo____x40_Lean_Compiler_LCNF_MonoTypes___hyg_468____closed__7; @@ -121,6 +121,7 @@ lean_object* l_Lean_Compiler_LCNF_getOtherDeclBaseType(lean_object*, lean_object static lean_object* l_Lean_Compiler_LCNF_getRelevantCtorFields___closed__2; LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_toMonoType_visitApp___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_Lean_Expr_isErased(lean_object*); +static lean_object* l_Lean_Compiler_LCNF_hasTrivialStructure_x3f___closed__1; lean_object* l_Lean_EnvExtensionInterfaceUnsafe_imp___elambda__2___rarg(lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Compiler_LCNF_getRelevantCtorFields___closed__15; LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_toMonoType_visitApp___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -182,10 +183,10 @@ uint8_t lean_usize_dec_lt(size_t, size_t); static lean_object* l_Lean_Compiler_LCNF_getRelevantCtorFields___closed__8; lean_object* lean_nat_add(lean_object*, lean_object*); lean_object* l_Array_instBEqArray___rarg___boxed(lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_MonoTypes___hyg_1989_(lean_object*); lean_object* lean_expr_instantiate1(lean_object*, lean_object*); static lean_object* l_Lean_Compiler_LCNF_getRelevantCtorFields___closed__1; lean_object* l_Nat_repr(lean_object*); -static lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_MonoTypes___hyg_1970____closed__1; static lean_object* l_Lean_Compiler_LCNF_getRelevantCtorFields___closed__28; static lean_object* _init_l_panic___at_Lean_Compiler_LCNF_getRelevantCtorFields___spec__1___closed__1() { _start: @@ -525,7 +526,7 @@ static lean_object* _init_l_Lean_Compiler_LCNF_getRelevantCtorFields___closed__4 lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; x_1 = l_Lean_Compiler_LCNF_getRelevantCtorFields___closed__1; x_2 = l_Lean_Compiler_LCNF_getRelevantCtorFields___closed__2; -x_3 = lean_unsigned_to_nat(18u); +x_3 = lean_unsigned_to_nat(19u); x_4 = lean_unsigned_to_nat(47u); x_5 = l_Lean_Compiler_LCNF_getRelevantCtorFields___closed__3; x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); @@ -2037,30 +2038,83 @@ return x_35; } } } +static lean_object* _init_l_Lean_Compiler_LCNF_hasTrivialStructure_x3f___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = l_Lean_opaqueReprAttr; +return x_1; +} +} LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_hasTrivialStructure_x3f(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; uint8_t x_6; -x_5 = l_Lean_Compiler_LCNF_builtinRuntimeTypes; -x_6 = l_List_elem___at_Lean_NameHashSet_insert___spec__2(x_1, x_5); +x_5 = lean_st_ref_get(x_3, x_4); +x_6 = !lean_is_exclusive(x_5); if (x_6 == 0) { -lean_object* x_7; lean_object* x_8; -x_7 = lean_box(0); -x_8 = l_Lean_Compiler_LCNF_hasTrivialStructure_x3f___lambda__3(x_1, x_7, x_2, x_3, x_4); -return x_8; +lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; uint8_t x_11; +x_7 = lean_ctor_get(x_5, 0); +x_8 = lean_ctor_get(x_5, 1); +x_9 = lean_ctor_get(x_7, 0); +lean_inc(x_9); +lean_dec(x_7); +x_10 = l_Lean_Compiler_LCNF_hasTrivialStructure_x3f___closed__1; +lean_inc(x_1); +x_11 = l_Lean_TagAttribute_hasTag(x_10, x_9, x_1); +if (x_11 == 0) +{ +lean_object* x_12; lean_object* x_13; +lean_free_object(x_5); +x_12 = lean_box(0); +x_13 = l_Lean_Compiler_LCNF_hasTrivialStructure_x3f___lambda__3(x_1, x_12, x_2, x_3, x_8); +return x_13; } else { -lean_object* x_9; lean_object* x_10; +lean_object* x_14; lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); -x_9 = lean_box(0); -x_10 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_10, 0, x_9); -lean_ctor_set(x_10, 1, x_4); -return x_10; +x_14 = lean_box(0); +lean_ctor_set(x_5, 0, x_14); +return x_5; +} +} +else +{ +lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; uint8_t x_19; +x_15 = lean_ctor_get(x_5, 0); +x_16 = lean_ctor_get(x_5, 1); +lean_inc(x_16); +lean_inc(x_15); +lean_dec(x_5); +x_17 = lean_ctor_get(x_15, 0); +lean_inc(x_17); +lean_dec(x_15); +x_18 = l_Lean_Compiler_LCNF_hasTrivialStructure_x3f___closed__1; +lean_inc(x_1); +x_19 = l_Lean_TagAttribute_hasTag(x_18, x_17, x_1); +if (x_19 == 0) +{ +lean_object* x_20; lean_object* x_21; +x_20 = lean_box(0); +x_21 = l_Lean_Compiler_LCNF_hasTrivialStructure_x3f___lambda__3(x_1, x_20, x_2, x_3, x_16); +return x_21; +} +else +{ +lean_object* x_22; lean_object* x_23; +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_22 = lean_box(0); +x_23 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_23, 0, x_22); +lean_ctor_set(x_23, 1, x_16); +return x_23; +} } } } @@ -2184,7 +2238,7 @@ static lean_object* _init_l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_toMon lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; x_1 = l_Lean_Compiler_LCNF_getRelevantCtorFields___closed__1; x_2 = l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_toMonoType_visitApp___spec__2___closed__1; -x_3 = lean_unsigned_to_nat(98u); +x_3 = lean_unsigned_to_nat(99u); x_4 = lean_unsigned_to_nat(50u); x_5 = l_Lean_Compiler_LCNF_getRelevantCtorFields___closed__3; x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); @@ -3107,7 +3161,7 @@ x_1 = l_Lean_Compiler_LCNF_getRelevantCtorFields___closed__16; return x_1; } } -static lean_object* _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_MonoTypes___hyg_1970____closed__1() { +static lean_object* _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_MonoTypes___hyg_1989____closed__1() { _start: { lean_object* x_1; lean_object* x_2; @@ -3117,11 +3171,11 @@ lean_closure_set(x_2, 0, x_1); return x_2; } } -LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_MonoTypes___hyg_1970_(lean_object* x_1) { +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_MonoTypes___hyg_1989_(lean_object* x_1) { _start: { lean_object* x_2; lean_object* x_3; -x_2 = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_MonoTypes___hyg_1970____closed__1; +x_2 = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_MonoTypes___hyg_1989____closed__1; x_3 = l_Lean_EnvExtensionInterfaceUnsafe_registerExt___rarg(x_2, x_1); return x_3; } @@ -3547,6 +3601,7 @@ return x_99; } lean_object* initialize_Init(uint8_t builtin, lean_object*); lean_object* initialize_Lean_Meta_InferType(uint8_t builtin, lean_object*); +lean_object* initialize_Lean_Compiler_OpaqueReprAttr(uint8_t builtin, lean_object*); lean_object* initialize_Lean_Compiler_LCNF_Util(uint8_t builtin, lean_object*); lean_object* initialize_Lean_Compiler_LCNF_BaseTypes(uint8_t builtin, lean_object*); lean_object* initialize_Lean_Compiler_LCNF_CompilerM(uint8_t builtin, lean_object*); @@ -3561,6 +3616,9 @@ lean_dec_ref(res); res = initialize_Lean_Meta_InferType(builtin, lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); +res = initialize_Lean_Compiler_OpaqueReprAttr(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); res = initialize_Lean_Compiler_LCNF_Util(builtin, lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); @@ -3688,6 +3746,8 @@ l_Lean_Compiler_LCNF_instReprTrivialStructureInfo = _init_l_Lean_Compiler_LCNF_i lean_mark_persistent(l_Lean_Compiler_LCNF_instReprTrivialStructureInfo); l_Lean_Compiler_LCNF_hasTrivialStructure_x3f___lambda__2___closed__1 = _init_l_Lean_Compiler_LCNF_hasTrivialStructure_x3f___lambda__2___closed__1(); lean_mark_persistent(l_Lean_Compiler_LCNF_hasTrivialStructure_x3f___lambda__2___closed__1); +l_Lean_Compiler_LCNF_hasTrivialStructure_x3f___closed__1 = _init_l_Lean_Compiler_LCNF_hasTrivialStructure_x3f___closed__1(); +lean_mark_persistent(l_Lean_Compiler_LCNF_hasTrivialStructure_x3f___closed__1); l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_toMonoType_visitApp___spec__2___closed__1 = _init_l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_toMonoType_visitApp___spec__2___closed__1(); lean_mark_persistent(l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_toMonoType_visitApp___spec__2___closed__1); l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_toMonoType_visitApp___spec__2___closed__2 = _init_l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_toMonoType_visitApp___spec__2___closed__2(); @@ -3708,9 +3768,9 @@ l_Lean_Compiler_LCNF_MonoTypeExtState_mono___default = _init_l_Lean_Compiler_LCN lean_mark_persistent(l_Lean_Compiler_LCNF_MonoTypeExtState_mono___default); l_Lean_Compiler_LCNF_instInhabitedMonoTypeExtState = _init_l_Lean_Compiler_LCNF_instInhabitedMonoTypeExtState(); lean_mark_persistent(l_Lean_Compiler_LCNF_instInhabitedMonoTypeExtState); -l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_MonoTypes___hyg_1970____closed__1 = _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_MonoTypes___hyg_1970____closed__1(); -lean_mark_persistent(l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_MonoTypes___hyg_1970____closed__1); -if (builtin) {res = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_MonoTypes___hyg_1970_(lean_io_mk_world()); +l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_MonoTypes___hyg_1989____closed__1 = _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_MonoTypes___hyg_1989____closed__1(); +lean_mark_persistent(l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_MonoTypes___hyg_1989____closed__1); +if (builtin) {res = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_MonoTypes___hyg_1989_(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; l_Lean_Compiler_LCNF_monoTypeExt = lean_io_result_get_value(res); lean_mark_persistent(l_Lean_Compiler_LCNF_monoTypeExt); diff --git a/stage0/stdlib/Lean/Compiler/LCNF/ToLCNF.c b/stage0/stdlib/Lean/Compiler/LCNF/ToLCNF.c index cdb481306a06..e91842d10d02 100644 --- a/stage0/stdlib/Lean/Compiler/LCNF/ToLCNF.c +++ b/stage0/stdlib/Lean/Compiler/LCNF/ToLCNF.c @@ -1,6 +1,6 @@ // Lean compiler output // Module: Lean.Compiler.LCNF.ToLCNF -// Imports: Init Lean.ProjFns Lean.Compiler.BorrowedAnnotation Lean.Compiler.LCNF.Types Lean.Compiler.LCNF.Bind Lean.Compiler.LCNF.InferType Lean.Compiler.LCNF.Util +// Imports: Init Lean.ProjFns Lean.Compiler.BorrowedAnnotation Lean.Compiler.OpaqueReprAttr Lean.Compiler.LCNF.Types Lean.Compiler.LCNF.Bind Lean.Compiler.LCNF.InferType Lean.Compiler.LCNF.Util #include #if defined(__clang__) #pragma clang diagnostic ignored "-Wunused-parameter" @@ -48,7 +48,6 @@ LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_ToLCNF_visitLambda_go___boxed(lean LEAN_EXPORT lean_object* l_Lean_Expr_ReplaceImpl_replaceUnsafeM_visit___at_Lean_Compiler_LCNF_ToLCNF_applyToAny___spec__1___boxed(lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Compiler_LCNF_ToLCNF_liftMetaM___rarg___closed__13; LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_ToLCNF_toLCNF(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -extern lean_object* l_Lean_Compiler_LCNF_builtinRuntimeTypes; LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_ToLCNF_bindCases_go___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___closed__13; static lean_object* l_Lean_Compiler_LCNF_ToLCNF_run___rarg___closed__2; @@ -62,7 +61,6 @@ lean_object* l_Lean_Meta_isProp(lean_object*, lean_object*, lean_object*, lean_o LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_ToLCNF_toLCNF_mkOverApplication___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_ToLCNF_letValueToArg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_AssocList_find_x3f___at_Lean_Compiler_LCNF_ToLCNF_toLCNFType___spec__2___boxed(lean_object*, lean_object*); -uint8_t l_List_elem___at_Lean_NameHashSet_insert___spec__2(lean_object*, lean_object*); static lean_object* l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitCases___lambda__1___closed__1; static lean_object* l_Lean_Compiler_LCNF_ToLCNF_bindCases_go___closed__7; LEAN_EXPORT lean_object* l_Lean_getProjectionFnInfo_x3f___at_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___spec__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -133,6 +131,7 @@ static lean_object* l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitQuotLift___lambda__1 lean_object* l_Lean_stringToMessageData(lean_object*); LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_ToLCNF_toLCNF_mkOverApplication(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_RBNode_balRight___rarg(lean_object*, lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_opaqueReprAttr; uint8_t l_Lean_MapDeclarationExtension_contains___rarg(lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___closed__11; extern lean_object* l_Lean_Expr_instBEqExpr; @@ -203,6 +202,7 @@ lean_object* l_Lean_RBNode_setBlack___rarg(lean_object*); lean_object* l_Lean_Compiler_LCNF_Code_inferParamType(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Core_instantiateValueLevelParams(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_ToLCNF_State_typeCache___default; +uint8_t l_Lean_TagAttribute_hasTag(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Compiler_LCNF_mkCasesResultType(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Compiler_LCNF_joinTypes(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Subarray_forInUnsafe_loop___at_Lean_Compiler_LCNF_ToLCNF_bindCases_go___spec__5___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -365,6 +365,7 @@ uint8_t lean_nat_dec_eq(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_ToLCNF_mustEtaExpand___boxed(lean_object*, lean_object*); static lean_object* l_Lean_Compiler_LCNF_ToLCNF_liftMetaM___rarg___closed__6; lean_object* l_Lean_Compiler_LCNF_mkParam(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitProjFn___closed__3; uint8_t lean_nat_dec_lt(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visit___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitFalseRec___closed__1; @@ -11774,7 +11775,7 @@ static lean_object* _init_l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitCore___lambda_ lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; x_1 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitCore___lambda__2___closed__1; x_2 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitCore___lambda__2___closed__2; -x_3 = lean_unsigned_to_nat(431u); +x_3 = lean_unsigned_to_nat(432u); x_4 = lean_unsigned_to_nat(57u); x_5 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitCore___lambda__2___closed__3; x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); @@ -15145,7 +15146,7 @@ static lean_object* _init_l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitAppDefaultCons lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; x_1 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitCore___lambda__2___closed__1; x_2 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitAppDefaultConst___closed__1; -x_3 = lean_unsigned_to_nat(473u); +x_3 = lean_unsigned_to_nat(474u); x_4 = lean_unsigned_to_nat(34u); x_5 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitCore___lambda__2___closed__3; x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); @@ -15436,17 +15437,25 @@ static lean_object* _init_l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitProjFn___close _start: { lean_object* x_1; -x_1 = lean_mk_string_from_bytes("Lean.Compiler.LCNF.ToLCNF.toLCNF.visitProjFn", 44); +x_1 = l_Lean_opaqueReprAttr; return x_1; } } static lean_object* _init_l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitProjFn___closed__2() { _start: { +lean_object* x_1; +x_1 = lean_mk_string_from_bytes("Lean.Compiler.LCNF.ToLCNF.toLCNF.visitProjFn", 44); +return x_1; +} +} +static lean_object* _init_l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitProjFn___closed__3() { +_start: +{ lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; x_1 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitCore___lambda__2___closed__1; -x_2 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitProjFn___closed__1; -x_3 = lean_unsigned_to_nat(655u); +x_2 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitProjFn___closed__2; +x_3 = lean_unsigned_to_nat(656u); x_4 = lean_unsigned_to_nat(45u); x_5 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitCore___lambda__2___closed__3; x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); @@ -15456,201 +15465,209 @@ return x_6; LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitProjFn(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { _start: { -lean_object* x_9; lean_object* x_10; lean_object* x_11; uint8_t x_12; +lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; uint8_t x_16; x_9 = lean_ctor_get(x_1, 0); lean_inc(x_9); x_10 = l_Lean_Name_getPrefix(x_9); lean_dec(x_9); -x_11 = l_Lean_Compiler_LCNF_builtinRuntimeTypes; -x_12 = l_List_elem___at_Lean_NameHashSet_insert___spec__2(x_10, x_11); -lean_dec(x_10); -if (x_12 == 0) +x_11 = lean_st_ref_get(x_7, x_8); +x_12 = lean_ctor_get(x_11, 0); +lean_inc(x_12); +x_13 = lean_ctor_get(x_11, 1); +lean_inc(x_13); +lean_dec(x_11); +x_14 = lean_ctor_get(x_12, 0); +lean_inc(x_14); +lean_dec(x_12); +x_15 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitProjFn___closed__1; +x_16 = l_Lean_TagAttribute_hasTag(x_15, x_14, x_10); +if (x_16 == 0) { -lean_object* x_13; +lean_object* x_17; lean_dec(x_1); -x_13 = l_Lean_Expr_getAppFn(x_2); -if (lean_obj_tag(x_13) == 4) -{ -lean_object* x_14; lean_object* x_15; lean_object* x_16; -x_14 = lean_ctor_get(x_13, 0); -lean_inc(x_14); -x_15 = lean_ctor_get(x_13, 1); -lean_inc(x_15); -lean_dec(x_13); -x_16 = l_Lean_getConstInfo___at_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitProjFn___spec__1(x_14, x_3, x_4, x_5, x_6, x_7, x_8); -if (lean_obj_tag(x_16) == 0) +x_17 = l_Lean_Expr_getAppFn(x_2); +if (lean_obj_tag(x_17) == 4) { -lean_object* x_17; lean_object* x_18; lean_object* x_19; -x_17 = lean_ctor_get(x_16, 0); -lean_inc(x_17); -x_18 = lean_ctor_get(x_16, 1); +lean_object* x_18; lean_object* x_19; lean_object* x_20; +x_18 = lean_ctor_get(x_17, 0); lean_inc(x_18); -lean_dec(x_16); -lean_inc(x_7); -lean_inc(x_6); -x_19 = l_Lean_Core_instantiateValueLevelParams(x_17, x_15, x_6, x_7, x_18); +x_19 = lean_ctor_get(x_17, 1); +lean_inc(x_19); lean_dec(x_17); -if (lean_obj_tag(x_19) == 0) +x_20 = l_Lean_getConstInfo___at_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitProjFn___spec__1(x_18, x_3, x_4, x_5, x_6, x_7, x_13); +if (lean_obj_tag(x_20) == 0) { -lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; -x_20 = lean_ctor_get(x_19, 0); -lean_inc(x_20); -x_21 = lean_ctor_get(x_19, 1); +lean_object* x_21; lean_object* x_22; lean_object* x_23; +x_21 = lean_ctor_get(x_20, 0); lean_inc(x_21); -lean_dec(x_19); -x_22 = lean_unsigned_to_nat(0u); -x_23 = l___private_Lean_Expr_0__Lean_Expr_getAppNumArgsAux(x_2, x_22); -x_24 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___closed__1; -lean_inc(x_23); -x_25 = lean_mk_array(x_23, x_24); -x_26 = lean_unsigned_to_nat(1u); -x_27 = lean_nat_sub(x_23, x_26); +x_22 = lean_ctor_get(x_20, 1); +lean_inc(x_22); +lean_dec(x_20); +lean_inc(x_7); +lean_inc(x_6); +x_23 = l_Lean_Core_instantiateValueLevelParams(x_21, x_19, x_6, x_7, x_22); +lean_dec(x_21); +if (lean_obj_tag(x_23) == 0) +{ +lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; +x_24 = lean_ctor_get(x_23, 0); +lean_inc(x_24); +x_25 = lean_ctor_get(x_23, 1); +lean_inc(x_25); lean_dec(x_23); -x_28 = l___private_Lean_Expr_0__Lean_Expr_getAppArgsAux(x_2, x_25, x_27); -x_29 = l_Lean_Expr_beta(x_20, x_28); -x_30 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visit(x_29, x_3, x_4, x_5, x_6, x_7, x_21); -return x_30; +x_26 = lean_unsigned_to_nat(0u); +x_27 = l___private_Lean_Expr_0__Lean_Expr_getAppNumArgsAux(x_2, x_26); +x_28 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___closed__1; +lean_inc(x_27); +x_29 = lean_mk_array(x_27, x_28); +x_30 = lean_unsigned_to_nat(1u); +x_31 = lean_nat_sub(x_27, x_30); +lean_dec(x_27); +x_32 = l___private_Lean_Expr_0__Lean_Expr_getAppArgsAux(x_2, x_29, x_31); +x_33 = l_Lean_Expr_beta(x_24, x_32); +x_34 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visit(x_33, x_3, x_4, x_5, x_6, x_7, x_25); +return x_34; } else { -uint8_t x_31; +uint8_t x_35; lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); -x_31 = !lean_is_exclusive(x_19); -if (x_31 == 0) +x_35 = !lean_is_exclusive(x_23); +if (x_35 == 0) { -return x_19; +return x_23; } else { -lean_object* x_32; lean_object* x_33; lean_object* x_34; -x_32 = lean_ctor_get(x_19, 0); -x_33 = lean_ctor_get(x_19, 1); -lean_inc(x_33); -lean_inc(x_32); -lean_dec(x_19); -x_34 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_34, 0, x_32); -lean_ctor_set(x_34, 1, x_33); -return x_34; +lean_object* x_36; lean_object* x_37; lean_object* x_38; +x_36 = lean_ctor_get(x_23, 0); +x_37 = lean_ctor_get(x_23, 1); +lean_inc(x_37); +lean_inc(x_36); +lean_dec(x_23); +x_38 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_38, 0, x_36); +lean_ctor_set(x_38, 1, x_37); +return x_38; } } } else { -uint8_t x_35; -lean_dec(x_15); +uint8_t x_39; +lean_dec(x_19); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); -x_35 = !lean_is_exclusive(x_16); -if (x_35 == 0) +x_39 = !lean_is_exclusive(x_20); +if (x_39 == 0) { -return x_16; +return x_20; } else { -lean_object* x_36; lean_object* x_37; lean_object* x_38; -x_36 = lean_ctor_get(x_16, 0); -x_37 = lean_ctor_get(x_16, 1); -lean_inc(x_37); -lean_inc(x_36); -lean_dec(x_16); -x_38 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_38, 0, x_36); -lean_ctor_set(x_38, 1, x_37); -return x_38; +lean_object* x_40; lean_object* x_41; lean_object* x_42; +x_40 = lean_ctor_get(x_20, 0); +x_41 = lean_ctor_get(x_20, 1); +lean_inc(x_41); +lean_inc(x_40); +lean_dec(x_20); +x_42 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_42, 0, x_40); +lean_ctor_set(x_42, 1, x_41); +return x_42; } } } else { -lean_object* x_39; lean_object* x_40; -lean_dec(x_13); +lean_object* x_43; lean_object* x_44; +lean_dec(x_17); lean_dec(x_2); -x_39 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitProjFn___closed__2; -x_40 = l_panic___at_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitCore___spec__5(x_39, x_3, x_4, x_5, x_6, x_7, x_8); -return x_40; +x_43 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitProjFn___closed__3; +x_44 = l_panic___at_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitCore___spec__5(x_43, x_3, x_4, x_5, x_6, x_7, x_13); +return x_44; } } else { -lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; uint8_t x_46; -x_41 = lean_unsigned_to_nat(0u); -x_42 = l___private_Lean_Expr_0__Lean_Expr_getAppNumArgsAux(x_2, x_41); -x_43 = lean_ctor_get(x_1, 1); -lean_inc(x_43); +lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; uint8_t x_50; +x_45 = lean_unsigned_to_nat(0u); +x_46 = l___private_Lean_Expr_0__Lean_Expr_getAppNumArgsAux(x_2, x_45); +x_47 = lean_ctor_get(x_1, 1); +lean_inc(x_47); lean_dec(x_1); -x_44 = lean_unsigned_to_nat(1u); -x_45 = lean_nat_add(x_43, x_44); -lean_dec(x_43); -x_46 = lean_nat_dec_lt(x_42, x_45); -if (x_46 == 0) +x_48 = lean_unsigned_to_nat(1u); +x_49 = lean_nat_add(x_47, x_48); +lean_dec(x_47); +x_50 = lean_nat_dec_lt(x_46, x_49); +if (x_50 == 0) { -lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; -lean_dec(x_45); -x_47 = l_Lean_Expr_getAppFn(x_2); -x_48 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___closed__1; -lean_inc(x_42); -x_49 = lean_mk_array(x_42, x_48); -x_50 = lean_nat_sub(x_42, x_44); -lean_dec(x_42); -x_51 = l___private_Lean_Expr_0__Lean_Expr_getAppArgsAux(x_2, x_49, x_50); -x_52 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitAppDefaultConst(x_47, x_51, x_3, x_4, x_5, x_6, x_7, x_8); -return x_52; +lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; +lean_dec(x_49); +x_51 = l_Lean_Expr_getAppFn(x_2); +x_52 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitApp___closed__1; +lean_inc(x_46); +x_53 = lean_mk_array(x_46, x_52); +x_54 = lean_nat_sub(x_46, x_48); +lean_dec(x_46); +x_55 = l___private_Lean_Expr_0__Lean_Expr_getAppArgsAux(x_2, x_53, x_54); +x_56 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitAppDefaultConst(x_51, x_55, x_3, x_4, x_5, x_6, x_7, x_13); +return x_56; } else { -lean_object* x_53; lean_object* x_54; -x_53 = lean_nat_sub(x_45, x_42); -lean_dec(x_42); -lean_dec(x_45); +lean_object* x_57; lean_object* x_58; +x_57 = lean_nat_sub(x_49, x_46); +lean_dec(x_46); +lean_dec(x_49); lean_inc(x_7); lean_inc(x_6); -x_54 = l_Lean_Compiler_LCNF_ToLCNF_etaExpandN(x_2, x_53, x_3, x_4, x_5, x_6, x_7, x_8); -if (lean_obj_tag(x_54) == 0) +x_58 = l_Lean_Compiler_LCNF_ToLCNF_etaExpandN(x_2, x_57, x_3, x_4, x_5, x_6, x_7, x_13); +if (lean_obj_tag(x_58) == 0) { -lean_object* x_55; lean_object* x_56; lean_object* x_57; -x_55 = lean_ctor_get(x_54, 0); -lean_inc(x_55); -x_56 = lean_ctor_get(x_54, 1); -lean_inc(x_56); -lean_dec(x_54); -x_57 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visit(x_55, x_3, x_4, x_5, x_6, x_7, x_56); -return x_57; +lean_object* x_59; lean_object* x_60; lean_object* x_61; +x_59 = lean_ctor_get(x_58, 0); +lean_inc(x_59); +x_60 = lean_ctor_get(x_58, 1); +lean_inc(x_60); +lean_dec(x_58); +x_61 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visit(x_59, x_3, x_4, x_5, x_6, x_7, x_60); +return x_61; } else { -uint8_t x_58; +uint8_t x_62; lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); -x_58 = !lean_is_exclusive(x_54); -if (x_58 == 0) +x_62 = !lean_is_exclusive(x_58); +if (x_62 == 0) { -return x_54; +return x_58; } else { -lean_object* x_59; lean_object* x_60; lean_object* x_61; -x_59 = lean_ctor_get(x_54, 0); -x_60 = lean_ctor_get(x_54, 1); -lean_inc(x_60); -lean_inc(x_59); -lean_dec(x_54); -x_61 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_61, 0, x_59); -lean_ctor_set(x_61, 1, x_60); -return x_61; +lean_object* x_63; lean_object* x_64; lean_object* x_65; +x_63 = lean_ctor_get(x_58, 0); +x_64 = lean_ctor_get(x_58, 1); +lean_inc(x_64); +lean_inc(x_63); +lean_dec(x_58); +x_65 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_65, 0, x_63); +lean_ctor_set(x_65, 1, x_64); +return x_65; } } } @@ -16186,7 +16203,7 @@ static lean_object* _init_l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitNoConfusion___ lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; x_1 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitCore___lambda__2___closed__1; x_2 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitNoConfusion___closed__1; -x_3 = lean_unsigned_to_nat(611u); +x_3 = lean_unsigned_to_nat(612u); x_4 = lean_unsigned_to_nat(42u); x_5 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitCore___lambda__2___closed__3; x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); @@ -16199,7 +16216,7 @@ static lean_object* _init_l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitNoConfusion___ lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; x_1 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitCore___lambda__2___closed__1; x_2 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitNoConfusion___closed__1; -x_3 = lean_unsigned_to_nat(613u); +x_3 = lean_unsigned_to_nat(614u); x_4 = lean_unsigned_to_nat(56u); x_5 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitCore___lambda__2___closed__3; x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); @@ -19108,7 +19125,7 @@ static lean_object* _init_l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitCases___lambda lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; x_1 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitCore___lambda__2___closed__1; x_2 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitCases___lambda__1___closed__1; -x_3 = lean_unsigned_to_nat(548u); +x_3 = lean_unsigned_to_nat(549u); x_4 = lean_unsigned_to_nat(57u); x_5 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitCore___lambda__2___closed__3; x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); @@ -21324,7 +21341,7 @@ static lean_object* _init_l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitQuotLift___lam lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; x_1 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitCore___lambda__2___closed__1; x_2 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitQuotLift___lambda__1___closed__1; -x_3 = lean_unsigned_to_nat(579u); +x_3 = lean_unsigned_to_nat(580u); x_4 = lean_unsigned_to_nat(42u); x_5 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitCore___lambda__2___closed__3; x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); @@ -21364,7 +21381,7 @@ static lean_object* _init_l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitQuotLift___lam lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; x_1 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitCore___lambda__2___closed__1; x_2 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitQuotLift___lambda__1___closed__1; -x_3 = lean_unsigned_to_nat(583u); +x_3 = lean_unsigned_to_nat(584u); x_4 = lean_unsigned_to_nat(19u); x_5 = l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitCore___lambda__2___closed__3; x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); @@ -22315,6 +22332,7 @@ return x_10; lean_object* initialize_Init(uint8_t builtin, lean_object*); lean_object* initialize_Lean_ProjFns(uint8_t builtin, lean_object*); lean_object* initialize_Lean_Compiler_BorrowedAnnotation(uint8_t builtin, lean_object*); +lean_object* initialize_Lean_Compiler_OpaqueReprAttr(uint8_t builtin, lean_object*); lean_object* initialize_Lean_Compiler_LCNF_Types(uint8_t builtin, lean_object*); lean_object* initialize_Lean_Compiler_LCNF_Bind(uint8_t builtin, lean_object*); lean_object* initialize_Lean_Compiler_LCNF_InferType(uint8_t builtin, lean_object*); @@ -22333,6 +22351,9 @@ lean_dec_ref(res); res = initialize_Lean_Compiler_BorrowedAnnotation(builtin, lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); +res = initialize_Lean_Compiler_OpaqueReprAttr(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); res = initialize_Lean_Compiler_LCNF_Types(builtin, lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); @@ -22549,6 +22570,8 @@ l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitProjFn___closed__1 = _init_l_Lean_Compil lean_mark_persistent(l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitProjFn___closed__1); l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitProjFn___closed__2 = _init_l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitProjFn___closed__2(); lean_mark_persistent(l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitProjFn___closed__2); +l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitProjFn___closed__3 = _init_l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitProjFn___closed__3(); +lean_mark_persistent(l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitProjFn___closed__3); l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitNoConfusion___lambda__2___closed__1 = _init_l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitNoConfusion___lambda__2___closed__1(); lean_mark_persistent(l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitNoConfusion___lambda__2___closed__1); l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitNoConfusion___lambda__2___closed__2 = _init_l_Lean_Compiler_LCNF_ToLCNF_toLCNF_visitNoConfusion___lambda__2___closed__2(); diff --git a/stage0/stdlib/Lean/Compiler/LCNF/Util.c b/stage0/stdlib/Lean/Compiler/LCNF/Util.c index 202e325e9117..525f3aa42b7c 100644 --- a/stage0/stdlib/Lean/Compiler/LCNF/Util.c +++ b/stage0/stdlib/Lean/Compiler/LCNF/Util.c @@ -14,57 +14,35 @@ extern "C" { #endif lean_object* l_Lean_Expr_const___override(lean_object*, lean_object*); -static lean_object* l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__5; LEAN_EXPORT lean_object* l_Lean_throwError___at___private_Lean_Compiler_LCNF_Util_0__Lean_Compiler_LCNF_getCasesOnInductiveVal_x3f___spec__2(lean_object*, lean_object*, lean_object*, lean_object*); -static lean_object* l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__4; -static lean_object* l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__22; static lean_object* l_Array_mapMUnsafe_map___at_Lean_Compiler_LCNF_getCasesInfo_x3f___spec__2___closed__2; LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Compiler_LCNF_getCasesInfo_x3f___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_mk_empty_array_with_capacity(lean_object*); lean_object* l___private_Lean_Expr_0__Lean_Expr_getAppNumArgsAux(lean_object*, lean_object*); -LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_builtinRuntimeTypes; -uint8_t l_List_elem___at_Lean_NameHashSet_insert___spec__2(lean_object*, lean_object*); lean_object* l_Lean_Core_instInhabitedCoreM___boxed(lean_object*, lean_object*, lean_object*); uint8_t l_Lean_Expr_isAppOfArity(lean_object*, lean_object*, lean_object*); -static lean_object* l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__11; -static lean_object* l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__39; -static lean_object* l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__29; static lean_object* l_Lean_Compiler_LCNF_isCasesApp_x3f___closed__2; -static lean_object* l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__15; static lean_object* l_Lean_Compiler_LCNF_isLcCast_x3f___closed__2; static lean_object* l_Lean_Compiler_LCNF_isCasesApp_x3f___closed__4; -static lean_object* l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__26; lean_object* lean_environment_find(lean_object*, lean_object*); static lean_object* l_Array_mapMUnsafe_map___at_Lean_Compiler_LCNF_getCasesInfo_x3f___spec__2___closed__3; -static lean_object* l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__36; lean_object* l_Lean_stringToMessageData(lean_object*); -static lean_object* l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__12; -static lean_object* l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__42; -static lean_object* l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__6; lean_object* l_Lean_Expr_appArg_x21(lean_object*); -LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_isRuntimeBultinType___boxed(lean_object*); static lean_object* l_Lean_Compiler_LCNF_isCasesApp_x3f___closed__5; LEAN_EXPORT lean_object* l___private_Lean_Compiler_LCNF_Util_0__Lean_Compiler_LCNF_getCasesOnInductiveVal_x3f___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); size_t lean_usize_of_nat(lean_object*); -static lean_object* l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__3; LEAN_EXPORT lean_object* l_panic___at_Lean_Compiler_LCNF_getCasesInfo_x3f___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_getCtorArity_x3f(lean_object*, lean_object*, lean_object*, lean_object*); uint8_t lean_nat_dec_eq(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Compiler_LCNF_getCasesInfo_x3f___spec__2(size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_getConstInfo___at___private_Lean_Compiler_LCNF_Util_0__Lean_Compiler_LCNF_getCasesOnInductiveVal_x3f___spec__1___closed__1; -static lean_object* l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__37; -static lean_object* l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__20; static lean_object* l_Lean_getConstInfo___at___private_Lean_Compiler_LCNF_Util_0__Lean_Compiler_LCNF_getCasesOnInductiveVal_x3f___spec__1___closed__3; static lean_object* l_Lean_getConstInfo___at___private_Lean_Compiler_LCNF_Util_0__Lean_Compiler_LCNF_getCasesOnInductiveVal_x3f___spec__1___closed__4; lean_object* l_Lean_Name_getPrefix(lean_object*); -static lean_object* l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__28; LEAN_EXPORT lean_object* l_panic___at_Lean_Compiler_LCNF_isCasesApp_x3f___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l___private_Lean_Compiler_LCNF_Util_0__Lean_Compiler_LCNF_getCasesOnInductiveVal_x3f(lean_object*, lean_object*, lean_object*, lean_object*); -static lean_object* l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__25; lean_object* lean_st_ref_get(lean_object*, lean_object*); lean_object* l_Lean_addMessageContextPartial___at_Lean_Core_instAddMessageContextCoreM___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); -static lean_object* l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__16; -static lean_object* l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__14; static lean_object* l_Lean_Compiler_LCNF_isCasesApp_x3f___closed__3; LEAN_EXPORT lean_object* l_Lean_getConstInfo___at___private_Lean_Compiler_LCNF_Util_0__Lean_Compiler_LCNF_getCasesOnInductiveVal_x3f___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT uint8_t l_Lean_Compiler_LCNF_isCompilerRelevantMData(lean_object*); @@ -74,57 +52,33 @@ static lean_object* l_Lean_Compiler_LCNF_isCasesApp_x3f___closed__1; lean_object* l___private_Init_Util_0__mkPanicMessageWithDecl(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_getCtorArity_x3f___boxed(lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Array_mapMUnsafe_map___at_Lean_Compiler_LCNF_getCasesInfo_x3f___spec__2___closed__4; -static lean_object* l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__18; LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_CasesInfo_numAlts(lean_object*); -static lean_object* l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__7; -static lean_object* l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__38; -LEAN_EXPORT uint8_t l_Lean_Compiler_LCNF_isRuntimeBultinType(lean_object*); -static lean_object* l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__41; static lean_object* l_Array_mapMUnsafe_map___at_Lean_Compiler_LCNF_getCasesInfo_x3f___spec__2___closed__1; -static lean_object* l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__32; lean_object* l_Lean_MessageData_ofExpr(lean_object*); -static lean_object* l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__8; -static lean_object* l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__27; LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_getCasesInfo_x3f(lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_CasesInfo_numAlts___boxed(lean_object*); static lean_object* l_panic___at_Lean_Compiler_LCNF_getCasesInfo_x3f___spec__1___closed__1; LEAN_EXPORT lean_object* l___private_Lean_Compiler_LCNF_Util_0__Lean_Compiler_LCNF_getCasesOnInductiveVal_x3f___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -static lean_object* l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__40; static lean_object* l_Lean_Compiler_LCNF_isLcCast_x3f___closed__1; -static lean_object* l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__2; -static lean_object* l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__34; -static lean_object* l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__1; lean_object* lean_panic_fn(lean_object*, lean_object*); lean_object* l_Lean_Expr_getAppFn(lean_object*); -static lean_object* l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__35; -static lean_object* l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__17; -static lean_object* l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__21; -static lean_object* l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__31; LEAN_EXPORT lean_object* l_Lean_getConstInfo___at___private_Lean_Compiler_LCNF_Util_0__Lean_Compiler_LCNF_getCasesOnInductiveVal_x3f___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); size_t lean_usize_add(size_t, size_t); -static lean_object* l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__24; lean_object* lean_array_uget(lean_object*, size_t); -static lean_object* l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__9; LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_isLcCast_x3f(lean_object*); lean_object* l_List_redLength___rarg(lean_object*); lean_object* lean_string_append(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_isCasesApp_x3f(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_array_get_size(lean_object*); uint8_t lean_usize_dec_lt(size_t, size_t); -static lean_object* l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__10; lean_object* lean_nat_add(lean_object*, lean_object*); -static lean_object* l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__13; LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_isLcCast_x3f___boxed(lean_object*); LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_isCompilerRelevantMData___boxed(lean_object*); LEAN_EXPORT lean_object* l_Lean_throwError___at___private_Lean_Compiler_LCNF_Util_0__Lean_Compiler_LCNF_getCasesOnInductiveVal_x3f___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_InductiveVal_numCtors(lean_object*); lean_object* lean_array_uset(lean_object*, size_t, lean_object*); uint8_t l_Lean_isCasesOnRecursor(lean_object*, lean_object*); -static lean_object* l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__33; -static lean_object* l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__23; -static lean_object* l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__30; lean_object* l_List_toArrayAux___rarg(lean_object*, lean_object*); -static lean_object* l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__19; LEAN_EXPORT uint8_t l_Lean_Compiler_LCNF_isCompilerRelevantMData(lean_object* x_1) { _start: { @@ -1478,453 +1432,6 @@ lean_dec(x_2); return x_5; } } -static lean_object* _init_l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__1() { -_start: -{ -lean_object* x_1; -x_1 = lean_mk_string_from_bytes("String", 6); -return x_1; -} -} -static lean_object* _init_l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__2() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = lean_box(0); -x_2 = l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__1; -x_3 = l_Lean_Name_str___override(x_1, x_2); -return x_3; -} -} -static lean_object* _init_l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__3() { -_start: -{ -lean_object* x_1; -x_1 = lean_mk_string_from_bytes("UInt8", 5); -return x_1; -} -} -static lean_object* _init_l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__4() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = lean_box(0); -x_2 = l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__3; -x_3 = l_Lean_Name_str___override(x_1, x_2); -return x_3; -} -} -static lean_object* _init_l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__5() { -_start: -{ -lean_object* x_1; -x_1 = lean_mk_string_from_bytes("UInt16", 6); -return x_1; -} -} -static lean_object* _init_l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__6() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = lean_box(0); -x_2 = l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__5; -x_3 = l_Lean_Name_str___override(x_1, x_2); -return x_3; -} -} -static lean_object* _init_l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__7() { -_start: -{ -lean_object* x_1; -x_1 = lean_mk_string_from_bytes("UInt32", 6); -return x_1; -} -} -static lean_object* _init_l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__8() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = lean_box(0); -x_2 = l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__7; -x_3 = l_Lean_Name_str___override(x_1, x_2); -return x_3; -} -} -static lean_object* _init_l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__9() { -_start: -{ -lean_object* x_1; -x_1 = lean_mk_string_from_bytes("UInt64", 6); -return x_1; -} -} -static lean_object* _init_l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__10() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = lean_box(0); -x_2 = l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__9; -x_3 = l_Lean_Name_str___override(x_1, x_2); -return x_3; -} -} -static lean_object* _init_l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__11() { -_start: -{ -lean_object* x_1; -x_1 = lean_mk_string_from_bytes("USize", 5); -return x_1; -} -} -static lean_object* _init_l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__12() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = lean_box(0); -x_2 = l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__11; -x_3 = l_Lean_Name_str___override(x_1, x_2); -return x_3; -} -} -static lean_object* _init_l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__13() { -_start: -{ -lean_object* x_1; -x_1 = lean_mk_string_from_bytes("Float", 5); -return x_1; -} -} -static lean_object* _init_l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__14() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = lean_box(0); -x_2 = l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__13; -x_3 = l_Lean_Name_str___override(x_1, x_2); -return x_3; -} -} -static lean_object* _init_l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__15() { -_start: -{ -lean_object* x_1; -x_1 = lean_mk_string_from_bytes("Thunk", 5); -return x_1; -} -} -static lean_object* _init_l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__16() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = lean_box(0); -x_2 = l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__15; -x_3 = l_Lean_Name_str___override(x_1, x_2); -return x_3; -} -} -static lean_object* _init_l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__17() { -_start: -{ -lean_object* x_1; -x_1 = lean_mk_string_from_bytes("Task", 4); -return x_1; -} -} -static lean_object* _init_l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__18() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = lean_box(0); -x_2 = l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__17; -x_3 = l_Lean_Name_str___override(x_1, x_2); -return x_3; -} -} -static lean_object* _init_l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__19() { -_start: -{ -lean_object* x_1; -x_1 = lean_mk_string_from_bytes("Array", 5); -return x_1; -} -} -static lean_object* _init_l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__20() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = lean_box(0); -x_2 = l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__19; -x_3 = l_Lean_Name_str___override(x_1, x_2); -return x_3; -} -} -static lean_object* _init_l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__21() { -_start: -{ -lean_object* x_1; -x_1 = lean_mk_string_from_bytes("ByteArray", 9); -return x_1; -} -} -static lean_object* _init_l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__22() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = lean_box(0); -x_2 = l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__21; -x_3 = l_Lean_Name_str___override(x_1, x_2); -return x_3; -} -} -static lean_object* _init_l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__23() { -_start: -{ -lean_object* x_1; -x_1 = lean_mk_string_from_bytes("FloatArray", 10); -return x_1; -} -} -static lean_object* _init_l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__24() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = lean_box(0); -x_2 = l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__23; -x_3 = l_Lean_Name_str___override(x_1, x_2); -return x_3; -} -} -static lean_object* _init_l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__25() { -_start: -{ -lean_object* x_1; -x_1 = lean_mk_string_from_bytes("Nat", 3); -return x_1; -} -} -static lean_object* _init_l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__26() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = lean_box(0); -x_2 = l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__25; -x_3 = l_Lean_Name_str___override(x_1, x_2); -return x_3; -} -} -static lean_object* _init_l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__27() { -_start: -{ -lean_object* x_1; -x_1 = lean_mk_string_from_bytes("Int", 3); -return x_1; -} -} -static lean_object* _init_l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__28() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = lean_box(0); -x_2 = l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__27; -x_3 = l_Lean_Name_str___override(x_1, x_2); -return x_3; -} -} -static lean_object* _init_l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__29() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = lean_box(0); -x_2 = l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__28; -x_3 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_3, 0, x_2); -lean_ctor_set(x_3, 1, x_1); -return x_3; -} -} -static lean_object* _init_l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__30() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__26; -x_2 = l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__29; -x_3 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_3, 0, x_1); -lean_ctor_set(x_3, 1, x_2); -return x_3; -} -} -static lean_object* _init_l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__31() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__24; -x_2 = l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__30; -x_3 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_3, 0, x_1); -lean_ctor_set(x_3, 1, x_2); -return x_3; -} -} -static lean_object* _init_l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__32() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__22; -x_2 = l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__31; -x_3 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_3, 0, x_1); -lean_ctor_set(x_3, 1, x_2); -return x_3; -} -} -static lean_object* _init_l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__33() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__20; -x_2 = l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__32; -x_3 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_3, 0, x_1); -lean_ctor_set(x_3, 1, x_2); -return x_3; -} -} -static lean_object* _init_l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__34() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__18; -x_2 = l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__33; -x_3 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_3, 0, x_1); -lean_ctor_set(x_3, 1, x_2); -return x_3; -} -} -static lean_object* _init_l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__35() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__16; -x_2 = l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__34; -x_3 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_3, 0, x_1); -lean_ctor_set(x_3, 1, x_2); -return x_3; -} -} -static lean_object* _init_l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__36() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__14; -x_2 = l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__35; -x_3 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_3, 0, x_1); -lean_ctor_set(x_3, 1, x_2); -return x_3; -} -} -static lean_object* _init_l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__37() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__12; -x_2 = l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__36; -x_3 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_3, 0, x_1); -lean_ctor_set(x_3, 1, x_2); -return x_3; -} -} -static lean_object* _init_l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__38() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__10; -x_2 = l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__37; -x_3 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_3, 0, x_1); -lean_ctor_set(x_3, 1, x_2); -return x_3; -} -} -static lean_object* _init_l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__39() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__8; -x_2 = l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__38; -x_3 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_3, 0, x_1); -lean_ctor_set(x_3, 1, x_2); -return x_3; -} -} -static lean_object* _init_l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__40() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__6; -x_2 = l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__39; -x_3 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_3, 0, x_1); -lean_ctor_set(x_3, 1, x_2); -return x_3; -} -} -static lean_object* _init_l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__41() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__4; -x_2 = l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__40; -x_3 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_3, 0, x_1); -lean_ctor_set(x_3, 1, x_2); -return x_3; -} -} -static lean_object* _init_l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__42() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__2; -x_2 = l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__41; -x_3 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_3, 0, x_1); -lean_ctor_set(x_3, 1, x_2); -return x_3; -} -} -static lean_object* _init_l_Lean_Compiler_LCNF_builtinRuntimeTypes() { -_start: -{ -lean_object* x_1; -x_1 = l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__42; -return x_1; -} -} -LEAN_EXPORT uint8_t l_Lean_Compiler_LCNF_isRuntimeBultinType(lean_object* x_1) { -_start: -{ -lean_object* x_2; uint8_t x_3; -x_2 = l_Lean_Compiler_LCNF_builtinRuntimeTypes; -x_3 = l_List_elem___at_Lean_NameHashSet_insert___spec__2(x_1, x_2); -return x_3; -} -} -LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_isRuntimeBultinType___boxed(lean_object* x_1) { -_start: -{ -uint8_t x_2; lean_object* x_3; -x_2 = l_Lean_Compiler_LCNF_isRuntimeBultinType(x_1); -lean_dec(x_1); -x_3 = lean_box(x_2); -return x_3; -} -} lean_object* initialize_Init(uint8_t builtin, lean_object*); lean_object* initialize_Lean_CoreM(uint8_t builtin, lean_object*); lean_object* initialize_Lean_MonadEnv(uint8_t builtin, lean_object*); @@ -1978,92 +1485,6 @@ l_Lean_Compiler_LCNF_isCasesApp_x3f___closed__4 = _init_l_Lean_Compiler_LCNF_isC lean_mark_persistent(l_Lean_Compiler_LCNF_isCasesApp_x3f___closed__4); l_Lean_Compiler_LCNF_isCasesApp_x3f___closed__5 = _init_l_Lean_Compiler_LCNF_isCasesApp_x3f___closed__5(); lean_mark_persistent(l_Lean_Compiler_LCNF_isCasesApp_x3f___closed__5); -l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__1 = _init_l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__1(); -lean_mark_persistent(l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__1); -l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__2 = _init_l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__2(); -lean_mark_persistent(l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__2); -l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__3 = _init_l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__3(); -lean_mark_persistent(l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__3); -l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__4 = _init_l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__4(); -lean_mark_persistent(l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__4); -l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__5 = _init_l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__5(); -lean_mark_persistent(l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__5); -l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__6 = _init_l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__6(); -lean_mark_persistent(l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__6); -l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__7 = _init_l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__7(); -lean_mark_persistent(l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__7); -l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__8 = _init_l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__8(); -lean_mark_persistent(l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__8); -l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__9 = _init_l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__9(); -lean_mark_persistent(l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__9); -l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__10 = _init_l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__10(); -lean_mark_persistent(l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__10); -l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__11 = _init_l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__11(); -lean_mark_persistent(l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__11); -l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__12 = _init_l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__12(); -lean_mark_persistent(l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__12); -l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__13 = _init_l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__13(); -lean_mark_persistent(l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__13); -l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__14 = _init_l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__14(); -lean_mark_persistent(l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__14); -l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__15 = _init_l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__15(); -lean_mark_persistent(l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__15); -l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__16 = _init_l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__16(); -lean_mark_persistent(l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__16); -l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__17 = _init_l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__17(); -lean_mark_persistent(l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__17); -l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__18 = _init_l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__18(); -lean_mark_persistent(l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__18); -l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__19 = _init_l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__19(); -lean_mark_persistent(l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__19); -l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__20 = _init_l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__20(); -lean_mark_persistent(l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__20); -l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__21 = _init_l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__21(); -lean_mark_persistent(l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__21); -l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__22 = _init_l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__22(); -lean_mark_persistent(l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__22); -l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__23 = _init_l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__23(); -lean_mark_persistent(l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__23); -l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__24 = _init_l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__24(); -lean_mark_persistent(l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__24); -l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__25 = _init_l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__25(); -lean_mark_persistent(l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__25); -l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__26 = _init_l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__26(); -lean_mark_persistent(l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__26); -l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__27 = _init_l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__27(); -lean_mark_persistent(l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__27); -l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__28 = _init_l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__28(); -lean_mark_persistent(l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__28); -l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__29 = _init_l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__29(); -lean_mark_persistent(l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__29); -l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__30 = _init_l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__30(); -lean_mark_persistent(l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__30); -l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__31 = _init_l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__31(); -lean_mark_persistent(l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__31); -l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__32 = _init_l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__32(); -lean_mark_persistent(l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__32); -l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__33 = _init_l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__33(); -lean_mark_persistent(l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__33); -l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__34 = _init_l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__34(); -lean_mark_persistent(l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__34); -l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__35 = _init_l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__35(); -lean_mark_persistent(l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__35); -l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__36 = _init_l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__36(); -lean_mark_persistent(l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__36); -l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__37 = _init_l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__37(); -lean_mark_persistent(l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__37); -l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__38 = _init_l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__38(); -lean_mark_persistent(l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__38); -l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__39 = _init_l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__39(); -lean_mark_persistent(l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__39); -l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__40 = _init_l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__40(); -lean_mark_persistent(l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__40); -l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__41 = _init_l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__41(); -lean_mark_persistent(l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__41); -l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__42 = _init_l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__42(); -lean_mark_persistent(l_Lean_Compiler_LCNF_builtinRuntimeTypes___closed__42); -l_Lean_Compiler_LCNF_builtinRuntimeTypes = _init_l_Lean_Compiler_LCNF_builtinRuntimeTypes(); -lean_mark_persistent(l_Lean_Compiler_LCNF_builtinRuntimeTypes); return lean_io_result_mk_ok(lean_box(0)); } #ifdef __cplusplus diff --git a/stage0/stdlib/Lean/Compiler/OpaqueReprAttr.c b/stage0/stdlib/Lean/Compiler/OpaqueReprAttr.c new file mode 100644 index 000000000000..9e3d09f0e703 --- /dev/null +++ b/stage0/stdlib/Lean/Compiler/OpaqueReprAttr.c @@ -0,0 +1,197 @@ +// Lean compiler output +// Module: Lean.Compiler.OpaqueReprAttr +// Imports: Init Lean.Environment Lean.Attributes +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +LEAN_EXPORT uint8_t lean_has_opaque_repr_attribute(lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_opaqueReprAttr; +LEAN_EXPORT lean_object* l_Lean_initFn____x40_Lean_Compiler_OpaqueReprAttr___hyg_4_(lean_object*); +uint8_t l_Lean_TagAttribute_hasTag(lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_initFn____x40_Lean_Compiler_OpaqueReprAttr___hyg_4____lambda__1(lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_hasOpaqueReprAttribute___boxed(lean_object*, lean_object*); +static lean_object* l_Lean_hasOpaqueReprAttribute___closed__1; +static lean_object* l_Lean_initFn____x40_Lean_Compiler_OpaqueReprAttr___hyg_4____closed__2; +lean_object* l_Lean_Name_str___override(lean_object*, lean_object*); +lean_object* l_Lean_registerTagAttribute(lean_object*, lean_object*, lean_object*, lean_object*, uint8_t, lean_object*); +static lean_object* l_Lean_initFn____x40_Lean_Compiler_OpaqueReprAttr___hyg_4____closed__1; +static lean_object* l_Lean_initFn____x40_Lean_Compiler_OpaqueReprAttr___hyg_4____closed__3; +lean_object* l_Lean_Name_mkStr2(lean_object*, lean_object*); +static lean_object* l_Lean_initFn____x40_Lean_Compiler_OpaqueReprAttr___hyg_4____closed__7; +LEAN_EXPORT lean_object* l_Lean_initFn____x40_Lean_Compiler_OpaqueReprAttr___hyg_4____lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_Lean_initFn____x40_Lean_Compiler_OpaqueReprAttr___hyg_4____closed__4; +static lean_object* l_Lean_initFn____x40_Lean_Compiler_OpaqueReprAttr___hyg_4____closed__6; +static lean_object* l_Lean_initFn____x40_Lean_Compiler_OpaqueReprAttr___hyg_4____closed__5; +LEAN_EXPORT lean_object* l_Lean_initFn____x40_Lean_Compiler_OpaqueReprAttr___hyg_4____lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; lean_object* x_6; +x_5 = lean_box(0); +x_6 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_6, 0, x_5); +lean_ctor_set(x_6, 1, x_4); +return x_6; +} +} +static lean_object* _init_l_Lean_initFn____x40_Lean_Compiler_OpaqueReprAttr___hyg_4____closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_from_bytes("opaque_repr", 11); +return x_1; +} +} +static lean_object* _init_l_Lean_initFn____x40_Lean_Compiler_OpaqueReprAttr___hyg_4____closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l_Lean_initFn____x40_Lean_Compiler_OpaqueReprAttr___hyg_4____closed__1; +x_3 = l_Lean_Name_str___override(x_1, x_2); +return x_3; +} +} +static lean_object* _init_l_Lean_initFn____x40_Lean_Compiler_OpaqueReprAttr___hyg_4____closed__3() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_from_bytes("Lean", 4); +return x_1; +} +} +static lean_object* _init_l_Lean_initFn____x40_Lean_Compiler_OpaqueReprAttr___hyg_4____closed__4() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_from_bytes("opaqueReprAttr", 14); +return x_1; +} +} +static lean_object* _init_l_Lean_initFn____x40_Lean_Compiler_OpaqueReprAttr___hyg_4____closed__5() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_initFn____x40_Lean_Compiler_OpaqueReprAttr___hyg_4____closed__3; +x_2 = l_Lean_initFn____x40_Lean_Compiler_OpaqueReprAttr___hyg_4____closed__4; +x_3 = l_Lean_Name_mkStr2(x_1, x_2); +return x_3; +} +} +static lean_object* _init_l_Lean_initFn____x40_Lean_Compiler_OpaqueReprAttr___hyg_4____closed__6() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_from_bytes("instruct the compiler that this type has an opaque representation, and should not be treated as a wrapper type.", 111); +return x_1; +} +} +static lean_object* _init_l_Lean_initFn____x40_Lean_Compiler_OpaqueReprAttr___hyg_4____closed__7() { +_start: +{ +lean_object* x_1; +x_1 = lean_alloc_closure((void*)(l_Lean_initFn____x40_Lean_Compiler_OpaqueReprAttr___hyg_4____lambda__1___boxed), 4, 0); +return x_1; +} +} +LEAN_EXPORT lean_object* l_Lean_initFn____x40_Lean_Compiler_OpaqueReprAttr___hyg_4_(lean_object* x_1) { +_start: +{ +lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; uint8_t x_6; lean_object* x_7; +x_2 = l_Lean_initFn____x40_Lean_Compiler_OpaqueReprAttr___hyg_4____closed__2; +x_3 = l_Lean_initFn____x40_Lean_Compiler_OpaqueReprAttr___hyg_4____closed__6; +x_4 = l_Lean_initFn____x40_Lean_Compiler_OpaqueReprAttr___hyg_4____closed__7; +x_5 = l_Lean_initFn____x40_Lean_Compiler_OpaqueReprAttr___hyg_4____closed__5; +x_6 = 0; +x_7 = l_Lean_registerTagAttribute(x_2, x_3, x_4, x_5, x_6, x_1); +return x_7; +} +} +LEAN_EXPORT lean_object* l_Lean_initFn____x40_Lean_Compiler_OpaqueReprAttr___hyg_4____lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; +x_5 = l_Lean_initFn____x40_Lean_Compiler_OpaqueReprAttr___hyg_4____lambda__1(x_1, x_2, x_3, x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +return x_5; +} +} +static lean_object* _init_l_Lean_hasOpaqueReprAttribute___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = l_Lean_opaqueReprAttr; +return x_1; +} +} +LEAN_EXPORT uint8_t lean_has_opaque_repr_attribute(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; uint8_t x_4; +x_3 = l_Lean_hasOpaqueReprAttribute___closed__1; +x_4 = l_Lean_TagAttribute_hasTag(x_3, x_1, x_2); +return x_4; +} +} +LEAN_EXPORT lean_object* l_Lean_hasOpaqueReprAttribute___boxed(lean_object* x_1, lean_object* x_2) { +_start: +{ +uint8_t x_3; lean_object* x_4; +x_3 = lean_has_opaque_repr_attribute(x_1, x_2); +x_4 = lean_box(x_3); +return x_4; +} +} +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_Lean_Environment(uint8_t builtin, lean_object*); +lean_object* initialize_Lean_Attributes(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_Lean_Compiler_OpaqueReprAttr(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_Lean_Environment(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_Lean_Attributes(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +l_Lean_initFn____x40_Lean_Compiler_OpaqueReprAttr___hyg_4____closed__1 = _init_l_Lean_initFn____x40_Lean_Compiler_OpaqueReprAttr___hyg_4____closed__1(); +lean_mark_persistent(l_Lean_initFn____x40_Lean_Compiler_OpaqueReprAttr___hyg_4____closed__1); +l_Lean_initFn____x40_Lean_Compiler_OpaqueReprAttr___hyg_4____closed__2 = _init_l_Lean_initFn____x40_Lean_Compiler_OpaqueReprAttr___hyg_4____closed__2(); +lean_mark_persistent(l_Lean_initFn____x40_Lean_Compiler_OpaqueReprAttr___hyg_4____closed__2); +l_Lean_initFn____x40_Lean_Compiler_OpaqueReprAttr___hyg_4____closed__3 = _init_l_Lean_initFn____x40_Lean_Compiler_OpaqueReprAttr___hyg_4____closed__3(); +lean_mark_persistent(l_Lean_initFn____x40_Lean_Compiler_OpaqueReprAttr___hyg_4____closed__3); +l_Lean_initFn____x40_Lean_Compiler_OpaqueReprAttr___hyg_4____closed__4 = _init_l_Lean_initFn____x40_Lean_Compiler_OpaqueReprAttr___hyg_4____closed__4(); +lean_mark_persistent(l_Lean_initFn____x40_Lean_Compiler_OpaqueReprAttr___hyg_4____closed__4); +l_Lean_initFn____x40_Lean_Compiler_OpaqueReprAttr___hyg_4____closed__5 = _init_l_Lean_initFn____x40_Lean_Compiler_OpaqueReprAttr___hyg_4____closed__5(); +lean_mark_persistent(l_Lean_initFn____x40_Lean_Compiler_OpaqueReprAttr___hyg_4____closed__5); +l_Lean_initFn____x40_Lean_Compiler_OpaqueReprAttr___hyg_4____closed__6 = _init_l_Lean_initFn____x40_Lean_Compiler_OpaqueReprAttr___hyg_4____closed__6(); +lean_mark_persistent(l_Lean_initFn____x40_Lean_Compiler_OpaqueReprAttr___hyg_4____closed__6); +l_Lean_initFn____x40_Lean_Compiler_OpaqueReprAttr___hyg_4____closed__7 = _init_l_Lean_initFn____x40_Lean_Compiler_OpaqueReprAttr___hyg_4____closed__7(); +lean_mark_persistent(l_Lean_initFn____x40_Lean_Compiler_OpaqueReprAttr___hyg_4____closed__7); +if (builtin) {res = l_Lean_initFn____x40_Lean_Compiler_OpaqueReprAttr___hyg_4_(lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +l_Lean_opaqueReprAttr = lean_io_result_get_value(res); +lean_mark_persistent(l_Lean_opaqueReprAttr); +lean_dec_ref(res); +}l_Lean_hasOpaqueReprAttribute___closed__1 = _init_l_Lean_hasOpaqueReprAttribute___closed__1(); +lean_mark_persistent(l_Lean_hasOpaqueReprAttribute___closed__1); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/stage0/stdlib/Lean/Compiler/Specialize.c b/stage0/stdlib/Lean/Compiler/Specialize.c index 59dc524f343f..6014d3abfc0e 100644 --- a/stage0/stdlib/Lean/Compiler/Specialize.c +++ b/stage0/stdlib/Lean/Compiler/Specialize.c @@ -19,7 +19,6 @@ static lean_object* l_Lean_Compiler_instInhabitedSpecState___closed__4; LEAN_EXPORT lean_object* l___private_Lean_Compiler_Specialize_0__Lean_Compiler_elabSpecArgs___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at___private_Lean_Compiler_Specialize_0__Lean_Compiler_elabSpecArgs___spec__8___lambda__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Init_Util_0__outOfBounds___rarg(lean_object*); -LEAN_EXPORT lean_object* l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1597_(lean_object*); LEAN_EXPORT uint8_t l_Lean_AssocList_contains___at_Lean_Compiler_SpecState_addEntry___spec__7(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Compiler_instBEqSpecializeAttributeKind; static lean_object* l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_841____lambda__1___closed__7; @@ -29,19 +28,16 @@ LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_insertAux___at_Lean_Compiler_S lean_object* lean_mk_empty_array_with_capacity(lean_object*); static lean_object* l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_841____lambda__1___closed__9; size_t lean_usize_shift_right(size_t, size_t); -LEAN_EXPORT lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1597____spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_PersistentHashMap_insertAux___at_Lean_Compiler_SpecState_addEntry___spec__3___closed__3; static lean_object* l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_48____closed__7; static lean_object* l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_841____closed__7; lean_object* l_Lean_ConstantInfo_type(lean_object*); static lean_object* l_Lean_Compiler_getSpecializationArgs_x3f___closed__1; uint8_t lean_usize_dec_le(size_t, size_t); -LEAN_EXPORT lean_object* l_Lean_mkStateFromImportedEntries___at_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1597____spec__1(lean_object*, lean_object*); static lean_object* l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_48____closed__5; static lean_object* l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_48____closed__3; static lean_object* l_Lean_Compiler_addSpecializationInfo___closed__1; size_t lean_uint64_to_usize(uint64_t); -static lean_object* l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1597____closed__6; LEAN_EXPORT lean_object* l_Lean_Compiler_SpecArgKind_toCtorIdx___boxed(lean_object*); static lean_object* l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_841____lambda__1___closed__21; LEAN_EXPORT lean_object* l_Lean_mkHashMap___at_Lean_Compiler_SpecState_cache___default___spec__1___boxed(lean_object*); @@ -58,7 +54,6 @@ LEAN_EXPORT uint8_t l_Lean_Compiler_instInhabitedSpecializeAttributeKind; lean_object* l_Lean_instBEqLocalInstance___boxed(lean_object*, lean_object*); size_t lean_usize_mul(size_t, size_t); lean_object* lean_mk_array(lean_object*, lean_object*); -static lean_object* l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1597____closed__5; uint8_t lean_usize_dec_eq(size_t, size_t); lean_object* l_Lean_throwError___at___private_Lean_Meta_Basic_0__Lean_Meta_processPostponedStep___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_841____closed__3; @@ -71,7 +66,6 @@ static lean_object* l_Array_forInUnsafe_loop___at___private_Lean_Compiler_Specia LEAN_EXPORT lean_object* l_Lean_HashMap_insert___at_Lean_Compiler_SpecState_addEntry___spec__6(lean_object*, lean_object*, lean_object*); lean_object* lean_array_fget(lean_object*, lean_object*); lean_object* lean_array_fset(lean_object*, lean_object*, lean_object*); -LEAN_EXPORT lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1597____spec__3(lean_object*, size_t, size_t, lean_object*); static size_t l_Lean_PersistentHashMap_insertAux___at_Lean_Compiler_SpecState_addEntry___spec__3___closed__2; LEAN_EXPORT uint8_t l_Array_getIdx_x3f___at___private_Lean_Compiler_Specialize_0__Lean_Compiler_elabSpecArgs___spec__2___lambda__1(lean_object*, lean_object*); lean_object* l_Lean_Expr_fvarId_x21(lean_object*); @@ -81,7 +75,6 @@ static lean_object* l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg lean_object* l_Lean_Meta_forallTelescopeReducing___at_Lean_Meta_getParamNames___spec__2___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Array_forInUnsafe_loop___at___private_Lean_Compiler_Specialize_0__Lean_Compiler_elabSpecArgs___spec__8___closed__6; LEAN_EXPORT lean_object* l_Lean_SMap_find_x3f___at_Lean_Compiler_getCachedSpecialization___spec__1(lean_object*, lean_object*); -static lean_object* l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1597____closed__4; static lean_object* l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_841____lambda__1___closed__26; LEAN_EXPORT lean_object* l_Lean_throwErrorAt___at___private_Lean_Compiler_Specialize_0__Lean_Compiler_elabSpecArgs___spec__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l___private_Lean_Compiler_Specialize_0__Lean_Compiler_elabSpecArgs(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -89,8 +82,10 @@ lean_object* l_Lean_stringToMessageData(lean_object*); LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_insert___at_Lean_Compiler_SpecState_addEntry___spec__2(lean_object*, lean_object*, lean_object*); static lean_object* l_Array_qsort_sort___at___private_Lean_Compiler_Specialize_0__Lean_Compiler_elabSpecArgs___spec__9___closed__1; LEAN_EXPORT uint8_t l_Lean_Compiler_instInhabitedSpecArgKind; +LEAN_EXPORT lean_object* l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1598____lambda__1(lean_object*); static lean_object* l_Lean_Compiler_instInhabitedSpecInfo___closed__1; LEAN_EXPORT lean_object* l_Lean_Compiler_instInhabitedSpecEntry; +LEAN_EXPORT lean_object* l_Lean_mkStateFromImportedEntries___at_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1598____spec__1(lean_object*, lean_object*); static lean_object* l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_48____closed__4; extern lean_object* l_Lean_Expr_instBEqExpr; LEAN_EXPORT lean_object* l_Lean_throwError___at___private_Lean_Compiler_Specialize_0__Lean_Compiler_elabSpecArgs___spec__7___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -127,6 +122,7 @@ uint8_t l_Lean_TagAttribute_hasTag(lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_findAtAux___at_Lean_Compiler_getSpecializationInfo___spec__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_findAux___at_Lean_Compiler_getCachedSpecialization___spec__3___boxed(lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Compiler_hasNospecializeAttribute___closed__1; +LEAN_EXPORT lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1598____spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Compiler_SpecState_cache___default___closed__1; lean_object* l_Lean_PersistentEnvExtension_addEntry___rarg(lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_48____closed__2; @@ -143,21 +139,25 @@ static lean_object* l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg static lean_object* l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_841____lambda__1___closed__25; LEAN_EXPORT lean_object* l_Lean_SMap_find_x3f___at_Lean_Compiler_getSpecializationInfo___spec__1(lean_object*, lean_object*); static lean_object* l_Array_forInUnsafe_loop___at___private_Lean_Compiler_Specialize_0__Lean_Compiler_elabSpecArgs___spec__8___closed__7; +static lean_object* l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1598____closed__5; LEAN_EXPORT lean_object* l_Lean_SMap_insert___at_Lean_Compiler_SpecState_addEntry___spec__12(lean_object*, lean_object*, lean_object*); LEAN_EXPORT uint8_t l_Lean_Compiler_hasSpecializeAttribute(lean_object*, lean_object*); -static lean_object* l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1597____closed__1; lean_object* lean_st_ref_get(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_insertAux___at_Lean_Compiler_SpecState_addEntry___spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_st_mk_ref(lean_object*, lean_object*); +static lean_object* l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1598____closed__6; lean_object* lean_list_to_array(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Compiler_SpecArgKind_toCtorIdx(uint8_t); LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_insertAux___at_Lean_Compiler_SpecState_addEntry___spec__14___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Expr_instHashableExpr; +LEAN_EXPORT lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1598____spec__2(lean_object*, size_t, size_t, lean_object*); LEAN_EXPORT lean_object* l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_841____lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_841____closed__4; static lean_object* l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_841____lambda__1___closed__16; uint64_t l_Lean_Expr_hash(lean_object*); LEAN_EXPORT lean_object* l_Lean_mkHashMap___at_Lean_Compiler_SpecState_specInfo___default___spec__1___boxed(lean_object*); +LEAN_EXPORT lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1598____spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1598____closed__2; static lean_object* l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_841____lambda__1___closed__1; LEAN_EXPORT uint8_t lean_has_nospecialize_attribute(lean_object*, lean_object*); lean_object* l_Lean_instHashableLocalInstance___boxed(lean_object*); @@ -185,6 +185,7 @@ static lean_object* l_Lean_Compiler_instInhabitedSpecState___closed__1; static lean_object* l_Array_forInUnsafe_loop___at___private_Lean_Compiler_Specialize_0__Lean_Compiler_elabSpecArgs___spec__8___lambda__2___closed__4; lean_object* l_Lean_registerTagAttribute(lean_object*, lean_object*, lean_object*, lean_object*, uint8_t, lean_object*); static lean_object* l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_841____lambda__1___closed__24; +static lean_object* l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1598____closed__4; LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_insertAux_traverse___at_Lean_Compiler_SpecState_addEntry___spec__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_SMap_switch___at_Lean_Compiler_SpecState_switch___spec__2(lean_object*); static lean_object* l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_48____closed__6; @@ -201,6 +202,7 @@ LEAN_EXPORT lean_object* lean_get_cached_specialization(lean_object*, lean_objec static lean_object* l_Lean_Compiler_instInhabitedSpecState___closed__2; LEAN_EXPORT lean_object* l_Lean_HashMapImp_find_x3f___at_Lean_Compiler_getCachedSpecialization___spec__5(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_findAtAux___at_Lean_Compiler_getCachedSpecialization___spec__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1598_(lean_object*); LEAN_EXPORT lean_object* l_Lean_AssocList_find_x3f___at_Lean_Compiler_getSpecializationInfo___spec__6___boxed(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_AssocList_find_x3f___at_Lean_Compiler_getCachedSpecialization___spec__6___boxed(lean_object*, lean_object*); static lean_object* l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_841____lambda__1___closed__5; @@ -211,7 +213,6 @@ LEAN_EXPORT lean_object* l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize_ LEAN_EXPORT lean_object* l_Lean_AssocList_contains___at_Lean_Compiler_SpecState_addEntry___spec__7___boxed(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_getIdx_x3f___at___private_Lean_Compiler_Specialize_0__Lean_Compiler_elabSpecArgs___spec__2(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_AssocList_foldlM___at_Lean_Compiler_SpecState_addEntry___spec__10(lean_object*, lean_object*); -LEAN_EXPORT lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1597____spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*); uint8_t lean_nat_dec_lt(lean_object*, lean_object*); static lean_object* l_Array_forInUnsafe_loop___at___private_Lean_Compiler_Specialize_0__Lean_Compiler_elabSpecArgs___spec__8___lambda__3___closed__1; static lean_object* l___private_Lean_Compiler_Specialize_0__Lean_Compiler_elabSpecArgs___lambda__1___closed__1; @@ -220,6 +221,7 @@ static lean_object* l_Array_forInUnsafe_loop___at___private_Lean_Compiler_Specia LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_findAux___at_Lean_Compiler_getSpecializationInfo___spec__3(lean_object*, size_t, lean_object*); LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_insert___at_Lean_Compiler_SpecState_addEntry___spec__13(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_ParametricAttribute_getParam_x3f___rarg(lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1598____closed__1; static lean_object* l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_841____lambda__1___closed__27; lean_object* l_Lean_PersistentHashMap_mkEmptyEntries(lean_object*, lean_object*); lean_object* l_Lean_FVarId_getUserName(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -240,7 +242,6 @@ lean_object* l_Lean_Meta_InfoCacheKey_instHashableInfoCacheKey___boxed(lean_obje LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at___private_Lean_Compiler_Specialize_0__Lean_Compiler_elabSpecArgs___spec__8(lean_object*, lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_getIdx_x3f___at___private_Lean_Compiler_Specialize_0__Lean_Compiler_elabSpecArgs___spec__2___lambda__1___boxed(lean_object*, lean_object*); lean_object* l_Lean_PersistentHashMap_mkCollisionNode___rarg(lean_object*, lean_object*, lean_object*, lean_object*); -static lean_object* l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1597____closed__2; lean_object* l_Lean_PersistentHashMap_mkEmptyEntriesArray(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Compiler_SpecState_specInfo___default; LEAN_EXPORT lean_object* l_Lean_throwErrorAt___at___private_Lean_Compiler_Specialize_0__Lean_Compiler_elabSpecArgs___spec__6(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -256,17 +257,15 @@ LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at___private_Lean_Compiler_S size_t lean_usize_sub(size_t, size_t); lean_object* l_Lean_mkHashMapImp___rarg(lean_object*); LEAN_EXPORT lean_object* l_Array_anyMUnsafe_any___at___private_Lean_Compiler_Specialize_0__Lean_Compiler_elabSpecArgs___spec__5___boxed(lean_object*, lean_object*, lean_object*, lean_object*); -LEAN_EXPORT lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1597____spec__2(lean_object*, size_t, size_t, lean_object*); size_t lean_usize_add(size_t, size_t); static lean_object* l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_841____closed__8; -LEAN_EXPORT lean_object* l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1597____lambda__1(lean_object*); LEAN_EXPORT lean_object* l___private_Lean_Compiler_Specialize_0__Lean_Compiler_elabSpecArgs___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1598____closed__3; extern lean_object* l_Lean_instInhabitedName; LEAN_EXPORT uint8_t lean_has_specialize_attribute(lean_object*, lean_object*); lean_object* lean_array_uget(lean_object*, size_t); static lean_object* l_Array_forInUnsafe_loop___at___private_Lean_Compiler_Specialize_0__Lean_Compiler_elabSpecArgs___spec__8___closed__2; static lean_object* l_Array_forInUnsafe_loop___at___private_Lean_Compiler_Specialize_0__Lean_Compiler_elabSpecArgs___spec__8___lambda__3___closed__3; -static lean_object* l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1597____closed__3; LEAN_EXPORT lean_object* l_Lean_HashMapImp_find_x3f___at_Lean_Compiler_getSpecializationInfo___spec__5(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_qsort_sort___at___private_Lean_Compiler_Specialize_0__Lean_Compiler_elabSpecArgs___spec__9___boxed(lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Compiler_hasNospecializeAttributeOld___boxed(lean_object*, lean_object*); @@ -300,6 +299,7 @@ LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_insertAux_traverse___at_Lean_C LEAN_EXPORT lean_object* l_Lean_Compiler_hasSpecializeAttributeOld___boxed(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Compiler_instInhabitedSpecState; uint8_t l_Lean_Name_isInternal(lean_object*); +LEAN_EXPORT lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1598____spec__3(lean_object*, size_t, size_t, lean_object*); lean_object* lean_array_uset(lean_object*, size_t, lean_object*); lean_object* l_Lean_MessageData_ofName(lean_object*); lean_object* lean_array_get(lean_object*, lean_object*, lean_object*); @@ -2711,13 +2711,12 @@ return x_1; static lean_object* _init_l_Lean_Compiler_instInhabitedSpecInfo___closed__1() { _start: { -lean_object* x_1; uint8_t x_2; lean_object* x_3; +lean_object* x_1; lean_object* x_2; x_1 = lean_box(0); -x_2 = 0; -x_3 = lean_alloc_ctor(0, 1, 1); -lean_ctor_set(x_3, 0, x_1); -lean_ctor_set_uint8(x_3, sizeof(void*)*1, x_2); -return x_3; +x_2 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_2, 0, x_1); +lean_ctor_set(x_2, 1, x_1); +return x_2; } } static lean_object* _init_l_Lean_Compiler_instInhabitedSpecInfo() { @@ -4995,7 +4994,7 @@ return x_11; } } } -LEAN_EXPORT lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1597____spec__2(lean_object* x_1, size_t x_2, size_t x_3, lean_object* x_4) { +LEAN_EXPORT lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1598____spec__2(lean_object* x_1, size_t x_2, size_t x_3, lean_object* x_4) { _start: { uint8_t x_5; @@ -5017,7 +5016,7 @@ return x_4; } } } -LEAN_EXPORT lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1597____spec__3(lean_object* x_1, size_t x_2, size_t x_3, lean_object* x_4) { +LEAN_EXPORT lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1598____spec__3(lean_object* x_1, size_t x_2, size_t x_3, lean_object* x_4) { _start: { uint8_t x_5; @@ -5055,7 +5054,7 @@ size_t x_15; size_t x_16; lean_object* x_17; x_15 = 0; x_16 = lean_usize_of_nat(x_7); lean_dec(x_7); -x_17 = l_Array_foldlMUnsafe_fold___at_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1597____spec__2(x_6, x_15, x_16, x_4); +x_17 = l_Array_foldlMUnsafe_fold___at_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1598____spec__2(x_6, x_15, x_16, x_4); lean_dec(x_6); x_2 = x_11; x_4 = x_17; @@ -5069,7 +5068,7 @@ return x_4; } } } -LEAN_EXPORT lean_object* l_Lean_mkStateFromImportedEntries___at_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1597____spec__1(lean_object* x_1, lean_object* x_2) { +LEAN_EXPORT lean_object* l_Lean_mkStateFromImportedEntries___at_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1598____spec__1(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; lean_object* x_4; uint8_t x_5; @@ -5098,24 +5097,24 @@ size_t x_7; size_t x_8; lean_object* x_9; x_7 = 0; x_8 = lean_usize_of_nat(x_3); lean_dec(x_3); -x_9 = l_Array_foldlMUnsafe_fold___at_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1597____spec__3(x_2, x_7, x_8, x_1); +x_9 = l_Array_foldlMUnsafe_fold___at_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1598____spec__3(x_2, x_7, x_8, x_1); lean_dec(x_2); return x_9; } } } } -LEAN_EXPORT lean_object* l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1597____lambda__1(lean_object* x_1) { +LEAN_EXPORT lean_object* l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1598____lambda__1(lean_object* x_1) { _start: { lean_object* x_2; lean_object* x_3; lean_object* x_4; x_2 = l_Lean_Compiler_instInhabitedSpecState___closed__4; -x_3 = l_Lean_mkStateFromImportedEntries___at_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1597____spec__1(x_2, x_1); +x_3 = l_Lean_mkStateFromImportedEntries___at_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1598____spec__1(x_2, x_1); x_4 = l_Lean_Compiler_SpecState_switch(x_3); return x_4; } } -static lean_object* _init_l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1597____closed__1() { +static lean_object* _init_l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1598____closed__1() { _start: { lean_object* x_1; @@ -5123,18 +5122,18 @@ x_1 = lean_mk_string_from_bytes("specExtension", 13); return x_1; } } -static lean_object* _init_l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1597____closed__2() { +static lean_object* _init_l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1598____closed__2() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; x_1 = l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_48____closed__3; x_2 = l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_48____closed__4; -x_3 = l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1597____closed__1; +x_3 = l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1598____closed__1; x_4 = l_Lean_Name_mkStr3(x_1, x_2, x_3); return x_4; } } -static lean_object* _init_l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1597____closed__3() { +static lean_object* _init_l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1598____closed__3() { _start: { lean_object* x_1; @@ -5143,7 +5142,7 @@ lean_closure_set(x_1, 0, lean_box(0)); return x_1; } } -static lean_object* _init_l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1597____closed__4() { +static lean_object* _init_l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1598____closed__4() { _start: { lean_object* x_1; @@ -5151,22 +5150,22 @@ x_1 = lean_alloc_closure((void*)(l_Lean_Compiler_SpecState_addEntry), 2, 0); return x_1; } } -static lean_object* _init_l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1597____closed__5() { +static lean_object* _init_l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1598____closed__5() { _start: { lean_object* x_1; -x_1 = lean_alloc_closure((void*)(l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1597____lambda__1), 1, 0); +x_1 = lean_alloc_closure((void*)(l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1598____lambda__1), 1, 0); return x_1; } } -static lean_object* _init_l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1597____closed__6() { +static lean_object* _init_l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1598____closed__6() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; -x_1 = l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1597____closed__2; -x_2 = l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1597____closed__4; -x_3 = l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1597____closed__5; -x_4 = l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1597____closed__3; +x_1 = l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1598____closed__2; +x_2 = l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1598____closed__4; +x_3 = l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1598____closed__5; +x_4 = l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1598____closed__3; x_5 = lean_alloc_ctor(0, 4, 0); lean_ctor_set(x_5, 0, x_1); lean_ctor_set(x_5, 1, x_2); @@ -5175,16 +5174,16 @@ lean_ctor_set(x_5, 3, x_4); return x_5; } } -LEAN_EXPORT lean_object* l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1597_(lean_object* x_1) { +LEAN_EXPORT lean_object* l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1598_(lean_object* x_1) { _start: { lean_object* x_2; lean_object* x_3; -x_2 = l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1597____closed__6; +x_2 = l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1598____closed__6; x_3 = l_Lean_registerSimplePersistentEnvExtension___rarg(x_2, x_1); return x_3; } } -LEAN_EXPORT lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1597____spec__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +LEAN_EXPORT lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1598____spec__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { size_t x_5; size_t x_6; lean_object* x_7; @@ -5192,12 +5191,12 @@ x_5 = lean_unbox_usize(x_2); lean_dec(x_2); x_6 = lean_unbox_usize(x_3); lean_dec(x_3); -x_7 = l_Array_foldlMUnsafe_fold___at_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1597____spec__2(x_1, x_5, x_6, x_4); +x_7 = l_Array_foldlMUnsafe_fold___at_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1598____spec__2(x_1, x_5, x_6, x_4); lean_dec(x_1); return x_7; } } -LEAN_EXPORT lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1597____spec__3___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +LEAN_EXPORT lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1598____spec__3___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { size_t x_5; size_t x_6; lean_object* x_7; @@ -5205,7 +5204,7 @@ x_5 = lean_unbox_usize(x_2); lean_dec(x_2); x_6 = lean_unbox_usize(x_3); lean_dec(x_3); -x_7 = l_Array_foldlMUnsafe_fold___at_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1597____spec__3(x_1, x_5, x_6, x_4); +x_7 = l_Array_foldlMUnsafe_fold___at_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1598____spec__3(x_1, x_5, x_6, x_4); lean_dec(x_1); return x_7; } @@ -6015,19 +6014,19 @@ l_Lean_PersistentHashMap_insertAux___at_Lean_Compiler_SpecState_addEntry___spec_ l_Lean_PersistentHashMap_insertAux___at_Lean_Compiler_SpecState_addEntry___spec__3___closed__2 = _init_l_Lean_PersistentHashMap_insertAux___at_Lean_Compiler_SpecState_addEntry___spec__3___closed__2(); l_Lean_PersistentHashMap_insertAux___at_Lean_Compiler_SpecState_addEntry___spec__3___closed__3 = _init_l_Lean_PersistentHashMap_insertAux___at_Lean_Compiler_SpecState_addEntry___spec__3___closed__3(); lean_mark_persistent(l_Lean_PersistentHashMap_insertAux___at_Lean_Compiler_SpecState_addEntry___spec__3___closed__3); -l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1597____closed__1 = _init_l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1597____closed__1(); -lean_mark_persistent(l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1597____closed__1); -l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1597____closed__2 = _init_l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1597____closed__2(); -lean_mark_persistent(l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1597____closed__2); -l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1597____closed__3 = _init_l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1597____closed__3(); -lean_mark_persistent(l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1597____closed__3); -l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1597____closed__4 = _init_l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1597____closed__4(); -lean_mark_persistent(l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1597____closed__4); -l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1597____closed__5 = _init_l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1597____closed__5(); -lean_mark_persistent(l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1597____closed__5); -l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1597____closed__6 = _init_l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1597____closed__6(); -lean_mark_persistent(l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1597____closed__6); -if (builtin) {res = l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1597_(lean_io_mk_world()); +l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1598____closed__1 = _init_l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1598____closed__1(); +lean_mark_persistent(l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1598____closed__1); +l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1598____closed__2 = _init_l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1598____closed__2(); +lean_mark_persistent(l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1598____closed__2); +l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1598____closed__3 = _init_l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1598____closed__3(); +lean_mark_persistent(l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1598____closed__3); +l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1598____closed__4 = _init_l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1598____closed__4(); +lean_mark_persistent(l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1598____closed__4); +l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1598____closed__5 = _init_l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1598____closed__5(); +lean_mark_persistent(l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1598____closed__5); +l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1598____closed__6 = _init_l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1598____closed__6(); +lean_mark_persistent(l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1598____closed__6); +if (builtin) {res = l_Lean_Compiler_initFn____x40_Lean_Compiler_Specialize___hyg_1598_(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; l_Lean_Compiler_specExtension = lean_io_result_get_value(res); lean_mark_persistent(l_Lean_Compiler_specExtension); diff --git a/stage0/stdlib/Lean/Syntax.c b/stage0/stdlib/Lean/Syntax.c index ddb3d1f78b8b..b6dc2f8d0d54 100644 --- a/stage0/stdlib/Lean/Syntax.c +++ b/stage0/stdlib/Lean/Syntax.c @@ -66,12 +66,12 @@ LEAN_EXPORT lean_object* l_Lean_Syntax_getAntiquotSuffixSpliceInner(lean_object* static lean_object* l_Lean_Syntax_identComponents___closed__1; lean_object* l_Lean_Syntax_getArgs(lean_object*); LEAN_EXPORT uint8_t l_String_Range_includes(lean_object*, lean_object*); -LEAN_EXPORT lean_object* l_List_mapTR_loop___at_Lean_Syntax_identComponents___spec__4(lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_isLitKind___closed__10; LEAN_EXPORT lean_object* l_Lean_Syntax_instForInTopDownSyntax_loop___rarg___lambda__7(lean_object*, lean_object*, lean_object*, lean_object*, uint8_t, lean_object*, lean_object*); lean_object* l_Lean_Syntax_getPos_x3f(lean_object*, uint8_t); LEAN_EXPORT lean_object* l___private_Lean_Syntax_0__Lean_Syntax_updateInfo(lean_object*, lean_object*, lean_object*); lean_object* lean_array_fget(lean_object*, lean_object*); +static lean_object* l_List_mapTR_loop___at_Lean_Syntax_identComponents___spec__3___closed__1; LEAN_EXPORT lean_object* l_Lean_SyntaxNode_getArg(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Syntax_ifNode(lean_object*); lean_object* lean_array_fset(lean_object*, lean_object*, lean_object*); @@ -85,9 +85,7 @@ static lean_object* l_Lean_Syntax_mkAntiquotNode___closed__6; LEAN_EXPORT lean_object* l_Lean_Syntax_instForInTopDownSyntax_loop___rarg___lambda__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Syntax_ifNodeKind___rarg(lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Syntax_getIdAt(lean_object*, lean_object*); -static lean_object* l_Lean_Syntax_identComponents___closed__7; static lean_object* l_Lean_Syntax_mkAntiquotSpliceNode___closed__6; -static lean_object* l_Lean_Syntax_identComponents___closed__8; static lean_object* l_Lean_Syntax_getAtomVal___closed__1; LEAN_EXPORT lean_object* l_Lean_SyntaxNode_getNumArgs___boxed(lean_object*); LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Syntax_reprint___spec__4(uint8_t, lean_object*, lean_object*, lean_object*, size_t, size_t, lean_object*); @@ -104,7 +102,6 @@ static lean_object* l_Lean_Syntax_mkAntiquotSpliceNode___closed__4; LEAN_EXPORT lean_object* l_Lean_Syntax_Traverser_left(lean_object*); uint8_t lean_string_dec_eq(lean_object*, lean_object*); static lean_object* l___private_Lean_Syntax_0__String_reprRange____x40_Lean_Syntax___hyg_36____closed__2; -LEAN_EXPORT lean_object* l_List_mapTR_loop___at_Lean_Syntax_identComponents___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_Lean_Syntax_isAtom(lean_object*); LEAN_EXPORT lean_object* l_Lean_Syntax_identComponents_nameComps___boxed(lean_object*, lean_object*); static lean_object* l_Lean_Syntax_hasMissing___closed__1; @@ -149,6 +146,7 @@ static lean_object* l_Lean_Syntax_antiquotSpliceKind_x3f___closed__1; LEAN_EXPORT lean_object* l_Lean_Syntax_hasMissing___lambda__1___boxed(lean_object*); static lean_object* l_Lean_Syntax_isQuot___closed__3; LEAN_EXPORT lean_object* l_Lean_Syntax_ifNodeKind___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Syntax_identComponents___lambda__1(lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Syntax_updateTrailing(lean_object*, lean_object*); static lean_object* l_Lean_Syntax_mkAntiquotNode___closed__14; lean_object* lean_nat_to_int(lean_object*); @@ -160,7 +158,7 @@ LEAN_EXPORT lean_object* l_Lean_Syntax_instForInTopDownSyntax_loop___at_Lean_Syn LEAN_EXPORT uint8_t l_Lean_Syntax_Stack_matches(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Syntax_getAntiquotSpliceContents___boxed(lean_object*); LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Syntax_hasMissing___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -LEAN_EXPORT lean_object* l_List_mapTR_loop___at_Lean_Syntax_identComponents___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_List_mapTR_loop___at_Lean_Syntax_identComponents___spec__2(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Name_components(lean_object*); LEAN_EXPORT lean_object* l_Lean_SyntaxNode_getIdAt(lean_object*, lean_object*); static lean_object* l_Lean_Syntax_hasMissing___closed__2; @@ -169,7 +167,6 @@ static lean_object* l_Lean_isLitKind___closed__5; LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Syntax_rewriteBottomUp___spec__2(lean_object*, size_t, size_t, lean_object*); LEAN_EXPORT lean_object* l_Lean_Syntax_MonadTraverser_getCur___rarg___lambda__1___boxed(lean_object*); static lean_object* l_Lean_Syntax_reprint_reprintLeaf___closed__1; -static lean_object* l_Lean_Syntax_identComponents___closed__6; LEAN_EXPORT lean_object* l_Lean_Syntax_MonadTraverser_getCur___rarg(lean_object*, lean_object*); lean_object* l_Array_back_x3f___rarg(lean_object*); LEAN_EXPORT lean_object* l_Lean_Syntax_isEscapedAntiquot___boxed(lean_object*); @@ -178,6 +175,7 @@ static lean_object* l_Lean_Syntax_instForInTopDownSyntax_loop___rarg___lambda__7 static lean_object* l_Lean_Syntax_mkAntiquotNode___closed__23; lean_object* lean_array_pop(lean_object*); static lean_object* l_Lean_isLitKind___closed__4; +uint8_t l_List_isEmpty___rarg(lean_object*); static lean_object* l_Lean_Syntax_asNode___closed__4; LEAN_EXPORT lean_object* l_Lean_Syntax_antiquotSuffixSplice_x3f(lean_object*); lean_object* lean_array_to_list(lean_object*, lean_object*); @@ -207,13 +205,12 @@ LEAN_EXPORT lean_object* l_String_instBEqRange; lean_object* l_List_lengthTRAux___rarg(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Syntax_instForInTopDownSyntax___rarg___lambda__1(lean_object*, lean_object*); static lean_object* l_Lean_Syntax_mkAntiquotSuffixSpliceNode___closed__1; -static lean_object* l_Lean_Syntax_identComponents___closed__9; LEAN_EXPORT lean_object* l_Lean_Syntax_getAntiquotSpliceSuffix___boxed(lean_object*); LEAN_EXPORT lean_object* l_Lean_Syntax_reprint_reprintLeaf(lean_object*, lean_object*); uint8_t lean_name_eq(lean_object*, lean_object*); lean_object* l_Lean_Name_str___override(lean_object*, lean_object*); -LEAN_EXPORT lean_object* l_List_foldl___at_Lean_Syntax_identComponents___spec__3___boxed(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Syntax_instForInTopDownSyntax_loop___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_List_mapTR_loop___at_Lean_Syntax_identComponents___spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Syntax_asNode(lean_object*); LEAN_EXPORT lean_object* l_Lean_SyntaxNode_getArgs___boxed(lean_object*); LEAN_EXPORT lean_object* l_Lean_Syntax_replaceM___rarg___lambda__1(lean_object*, lean_object*, lean_object*); @@ -230,7 +227,6 @@ LEAN_EXPORT lean_object* l_Lean_SyntaxNode_getNumArgs(lean_object*); LEAN_EXPORT uint8_t l_Lean_Syntax_isTokenAntiquot(lean_object*); uint8_t l_Lean_Syntax_isIdent(lean_object*); LEAN_EXPORT lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Syntax_antiquotKinds___spec__2(lean_object*, size_t, size_t, lean_object*); -static lean_object* l_List_mapTR_loop___at_Lean_Syntax_identComponents___spec__2___closed__2; LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Syntax_updateLeading___spec__2(size_t, size_t, lean_object*, lean_object*); static lean_object* l_Lean_Syntax_findStack_x3f_go___lambda__2___closed__1; static lean_object* l_Lean_isLitKind___closed__1; @@ -241,6 +237,7 @@ LEAN_EXPORT lean_object* l_Lean_Syntax_isTokenAntiquot___boxed(lean_object*); LEAN_EXPORT lean_object* l_Lean_Syntax_replaceM___rarg(lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_SourceInfo_updateTrailing(lean_object*, lean_object*); static lean_object* l_Lean_isLitKind___closed__3; +static lean_object* l_List_mapTR_loop___at_Lean_Syntax_identComponents___spec__3___closed__2; static lean_object* l_Lean_Syntax_mkAntiquotNode___closed__10; static lean_object* l___private_Lean_Syntax_0__String_reprRange____x40_Lean_Syntax___hyg_36____closed__10; LEAN_EXPORT uint8_t l_Lean_Syntax_hasMissing___lambda__1(lean_object*); @@ -259,6 +256,7 @@ LEAN_EXPORT lean_object* l_Lean_Syntax_reprint(lean_object*); lean_object* l_Lean_SourceInfo_getPos_x3f(lean_object*, uint8_t); LEAN_EXPORT lean_object* l_Lean_Syntax_instForInTopDownSyntax___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Syntax_setArg(lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_List_mapTR_loop___at_Lean_Syntax_identComponents___spec__6(lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_panic___at_Lean_Syntax_identComponents___spec__1(lean_object*); LEAN_EXPORT lean_object* l_Lean_Syntax_modifyArg___boxed(lean_object*, lean_object*, lean_object*); LEAN_EXPORT uint8_t l_Lean_Syntax_isQuot(lean_object*); @@ -287,7 +285,6 @@ lean_object* l_Array_mapMUnsafe_map___rarg(lean_object*, lean_object*, size_t, s lean_object* l_List_drop___rarg(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_SyntaxNode_getIdAt___boxed(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Syntax_findStack_x3f(lean_object*, lean_object*, lean_object*); -LEAN_EXPORT lean_object* l_List_foldl___at_Lean_Syntax_identComponents___spec__3(lean_object*, lean_object*); uint8_t lean_nat_dec_lt(lean_object*, lean_object*); static lean_object* l_Lean_Syntax_mkAntiquotNode___closed__7; LEAN_EXPORT lean_object* l_Array_filterMapM___at_Lean_Syntax_antiquotKinds___spec__1___boxed(lean_object*, lean_object*, lean_object*); @@ -303,12 +300,14 @@ LEAN_EXPORT lean_object* l_Lean_Syntax_instForInTopDownSyntax_loop___rarg___lamb LEAN_EXPORT lean_object* l_Lean_Syntax_replaceM(lean_object*); LEAN_EXPORT lean_object* l_Lean_Syntax_MonadTraverser_goLeft(lean_object*); LEAN_EXPORT lean_object* l_Lean_Syntax_isAntiquots___boxed(lean_object*); +LEAN_EXPORT lean_object* l_List_foldl___at_Lean_Syntax_identComponents___spec__4(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Syntax_rewriteBottomUp___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_array_set(lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Syntax_instForInTopDownSyntax_loop___at_Lean_Syntax_hasMissing___spec__1___closed__2; LEAN_EXPORT lean_object* l_String_instHashableRange; LEAN_EXPORT lean_object* l_Lean_unreachIsNodeMissing(lean_object*, lean_object*); lean_object* lean_panic_fn(lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_List_mapTR_loop___at_Lean_Syntax_identComponents___spec__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_nat_sub(lean_object*, lean_object*); static lean_object* l_Lean_Syntax_isAntiquot___closed__1; LEAN_EXPORT lean_object* l_Lean_Syntax_Traverser_setCur(lean_object*, lean_object*); @@ -365,6 +364,7 @@ static lean_object* l_Lean_Syntax_asNode___closed__2; LEAN_EXPORT lean_object* l_Lean_Syntax_findStack_x3f_go(lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Syntax_MonadTraverser_goDown___rarg___lambda__1(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Syntax_MonadTraverser_getIdx___rarg___lambda__1___boxed(lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_List_foldl___at_Lean_Syntax_identComponents___spec__4___boxed(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Syntax_MonadTraverser_goUp___rarg___lambda__1(lean_object*); LEAN_EXPORT lean_object* l_Lean_Syntax_MonadTraverser_getIdx___rarg(lean_object*, lean_object*); lean_object* lean_array_get_size(lean_object*); @@ -386,7 +386,6 @@ LEAN_EXPORT lean_object* l_Lean_Syntax_setAtomVal(lean_object*, lean_object*); LEAN_EXPORT uint64_t l___private_Lean_Syntax_0__String_hashRange____x40_Lean_Syntax___hyg_202_(lean_object*); LEAN_EXPORT lean_object* l_Lean_SyntaxNode_getKind(lean_object*); LEAN_EXPORT uint8_t l_Lean_Syntax_isAntiquots(lean_object*); -static lean_object* l_List_mapTR_loop___at_Lean_Syntax_identComponents___spec__2___closed__1; lean_object* lean_array_uset(lean_object*, size_t, lean_object*); lean_object* lean_array_get(lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Syntax_unescapeAntiquot(lean_object*); @@ -2932,7 +2931,86 @@ x_3 = lean_panic_fn(x_2, x_1); return x_3; } } -static lean_object* _init_l_List_mapTR_loop___at_Lean_Syntax_identComponents___spec__2___closed__1() { +LEAN_EXPORT lean_object* l_List_mapTR_loop___at_Lean_Syntax_identComponents___spec__2(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +if (lean_obj_tag(x_2) == 0) +{ +lean_object* x_4; +lean_dec(x_1); +x_4 = l_List_reverse___rarg(x_3); +return x_4; +} +else +{ +uint8_t x_5; +x_5 = !lean_is_exclusive(x_2); +if (x_5 == 0) +{ +lean_object* x_6; lean_object* x_7; uint8_t x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; +x_6 = lean_ctor_get(x_2, 0); +x_7 = lean_ctor_get(x_2, 1); +x_8 = 1; +lean_inc(x_6); +x_9 = l_Lean_Name_toString(x_6, x_8); +x_10 = lean_string_utf8_byte_size(x_9); +x_11 = lean_unsigned_to_nat(0u); +x_12 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_12, 0, x_9); +lean_ctor_set(x_12, 1, x_11); +lean_ctor_set(x_12, 2, x_10); +x_13 = lean_box(0); +lean_inc(x_1); +x_14 = lean_alloc_ctor(3, 4, 0); +lean_ctor_set(x_14, 0, x_1); +lean_ctor_set(x_14, 1, x_12); +lean_ctor_set(x_14, 2, x_6); +lean_ctor_set(x_14, 3, x_13); +lean_ctor_set(x_2, 1, x_3); +lean_ctor_set(x_2, 0, x_14); +{ +lean_object* _tmp_1 = x_7; +lean_object* _tmp_2 = x_2; +x_2 = _tmp_1; +x_3 = _tmp_2; +} +goto _start; +} +else +{ +lean_object* x_16; lean_object* x_17; uint8_t x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; +x_16 = lean_ctor_get(x_2, 0); +x_17 = lean_ctor_get(x_2, 1); +lean_inc(x_17); +lean_inc(x_16); +lean_dec(x_2); +x_18 = 1; +lean_inc(x_16); +x_19 = l_Lean_Name_toString(x_16, x_18); +x_20 = lean_string_utf8_byte_size(x_19); +x_21 = lean_unsigned_to_nat(0u); +x_22 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_22, 0, x_19); +lean_ctor_set(x_22, 1, x_21); +lean_ctor_set(x_22, 2, x_20); +x_23 = lean_box(0); +lean_inc(x_1); +x_24 = lean_alloc_ctor(3, 4, 0); +lean_ctor_set(x_24, 0, x_1); +lean_ctor_set(x_24, 1, x_22); +lean_ctor_set(x_24, 2, x_16); +lean_ctor_set(x_24, 3, x_23); +x_25 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_25, 0, x_24); +lean_ctor_set(x_25, 1, x_3); +x_2 = x_17; +x_3 = x_25; +goto _start; +} +} +} +} +static lean_object* _init_l_List_mapTR_loop___at_Lean_Syntax_identComponents___spec__3___closed__1() { _start: { lean_object* x_1; lean_object* x_2; @@ -2941,13 +3019,13 @@ x_2 = lean_string_utf8_byte_size(x_1); return x_2; } } -static lean_object* _init_l_List_mapTR_loop___at_Lean_Syntax_identComponents___spec__2___closed__2() { +static lean_object* _init_l_List_mapTR_loop___at_Lean_Syntax_identComponents___spec__3___closed__2() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; x_1 = l_Lean_Syntax_getAtomVal___closed__1; x_2 = lean_unsigned_to_nat(0u); -x_3 = l_List_mapTR_loop___at_Lean_Syntax_identComponents___spec__2___closed__1; +x_3 = l_List_mapTR_loop___at_Lean_Syntax_identComponents___spec__3___closed__1; x_4 = lean_alloc_ctor(0, 3, 0); lean_ctor_set(x_4, 0, x_1); lean_ctor_set(x_4, 1, x_2); @@ -2955,7 +3033,7 @@ lean_ctor_set(x_4, 2, x_3); return x_4; } } -LEAN_EXPORT lean_object* l_List_mapTR_loop___at_Lean_Syntax_identComponents___spec__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +LEAN_EXPORT lean_object* l_List_mapTR_loop___at_Lean_Syntax_identComponents___spec__3(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { _start: { if (lean_obj_tag(x_5) == 0) @@ -3009,7 +3087,7 @@ lean_dec(x_23); lean_dec(x_24); x_26 = lean_nat_add(x_21, x_25); lean_dec(x_25); -x_27 = l_List_mapTR_loop___at_Lean_Syntax_identComponents___spec__2___closed__2; +x_27 = l_List_mapTR_loop___at_Lean_Syntax_identComponents___spec__3___closed__2; x_28 = lean_alloc_ctor(0, 4, 0); lean_ctor_set(x_28, 0, x_27); lean_ctor_set(x_28, 1, x_21); @@ -3042,7 +3120,7 @@ lean_dec(x_31); lean_dec(x_32); x_34 = lean_nat_add(x_21, x_33); lean_dec(x_33); -x_35 = l_List_mapTR_loop___at_Lean_Syntax_identComponents___spec__2___closed__2; +x_35 = l_List_mapTR_loop___at_Lean_Syntax_identComponents___spec__3___closed__2; lean_inc(x_4); x_36 = lean_alloc_ctor(0, 4, 0); lean_ctor_set(x_36, 0, x_35); @@ -3079,7 +3157,7 @@ lean_dec(x_39); lean_dec(x_40); x_42 = lean_nat_add(x_21, x_41); lean_dec(x_41); -x_43 = l_List_mapTR_loop___at_Lean_Syntax_identComponents___spec__2___closed__2; +x_43 = l_List_mapTR_loop___at_Lean_Syntax_identComponents___spec__3___closed__2; lean_inc(x_2); x_44 = lean_alloc_ctor(0, 4, 0); lean_ctor_set(x_44, 0, x_2); @@ -3179,7 +3257,7 @@ lean_dec(x_68); lean_dec(x_69); x_71 = lean_nat_add(x_66, x_70); lean_dec(x_70); -x_72 = l_List_mapTR_loop___at_Lean_Syntax_identComponents___spec__2___closed__2; +x_72 = l_List_mapTR_loop___at_Lean_Syntax_identComponents___spec__3___closed__2; x_73 = lean_alloc_ctor(0, 4, 0); lean_ctor_set(x_73, 0, x_72); lean_ctor_set(x_73, 1, x_66); @@ -3209,7 +3287,7 @@ lean_dec(x_77); lean_dec(x_78); x_80 = lean_nat_add(x_66, x_79); lean_dec(x_79); -x_81 = l_List_mapTR_loop___at_Lean_Syntax_identComponents___spec__2___closed__2; +x_81 = l_List_mapTR_loop___at_Lean_Syntax_identComponents___spec__3___closed__2; lean_inc(x_4); x_82 = lean_alloc_ctor(0, 4, 0); lean_ctor_set(x_82, 0, x_81); @@ -3243,7 +3321,7 @@ lean_dec(x_86); lean_dec(x_87); x_89 = lean_nat_add(x_66, x_88); lean_dec(x_88); -x_90 = l_List_mapTR_loop___at_Lean_Syntax_identComponents___spec__2___closed__2; +x_90 = l_List_mapTR_loop___at_Lean_Syntax_identComponents___spec__3___closed__2; lean_inc(x_2); x_91 = lean_alloc_ctor(0, 4, 0); lean_ctor_set(x_91, 0, x_2); @@ -3298,7 +3376,7 @@ goto _start; } } } -LEAN_EXPORT lean_object* l_List_foldl___at_Lean_Syntax_identComponents___spec__3(lean_object* x_1, lean_object* x_2) { +LEAN_EXPORT lean_object* l_List_foldl___at_Lean_Syntax_identComponents___spec__4(lean_object* x_1, lean_object* x_2) { _start: { if (lean_obj_tag(x_2) == 0) @@ -3325,7 +3403,7 @@ goto _start; } } } -LEAN_EXPORT lean_object* l_List_mapTR_loop___at_Lean_Syntax_identComponents___spec__4(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +LEAN_EXPORT lean_object* l_List_mapTR_loop___at_Lean_Syntax_identComponents___spec__5(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { if (lean_obj_tag(x_2) == 0) @@ -3404,7 +3482,7 @@ goto _start; } } } -LEAN_EXPORT lean_object* l_List_mapTR_loop___at_Lean_Syntax_identComponents___spec__5(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +LEAN_EXPORT lean_object* l_List_mapTR_loop___at_Lean_Syntax_identComponents___spec__6(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { if (lean_obj_tag(x_2) == 0) @@ -3483,6 +3561,16 @@ goto _start; } } } +LEAN_EXPORT lean_object* l_Lean_Syntax_identComponents___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; lean_object* x_5; +lean_dec(x_3); +x_4 = lean_box(0); +x_5 = l_List_mapTR_loop___at_Lean_Syntax_identComponents___spec__2(x_1, x_2, x_4); +return x_5; +} +} static lean_object* _init_l_Lean_Syntax_identComponents___closed__1() { _start: { @@ -3513,7 +3601,7 @@ static lean_object* _init_l_Lean_Syntax_identComponents___closed__4() { lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; x_1 = l_Lean_Syntax_identComponents___closed__1; x_2 = l_Lean_Syntax_identComponents___closed__2; -x_3 = lean_unsigned_to_nat(227u); +x_3 = lean_unsigned_to_nat(230u); x_4 = lean_unsigned_to_nat(9u); x_5 = l_Lean_Syntax_identComponents___closed__3; x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); @@ -3523,45 +3611,6 @@ return x_6; static lean_object* _init_l_Lean_Syntax_identComponents___closed__5() { _start: { -lean_object* x_1; -x_1 = lean_mk_string_from_bytes("assertion violation: ", 21); -return x_1; -} -} -static lean_object* _init_l_Lean_Syntax_identComponents___closed__6() { -_start: -{ -lean_object* x_1; -x_1 = lean_mk_string_from_bytes("nameComps.length == rawComps.length\n ", 40); -return x_1; -} -} -static lean_object* _init_l_Lean_Syntax_identComponents___closed__7() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Syntax_identComponents___closed__5; -x_2 = l_Lean_Syntax_identComponents___closed__6; -x_3 = lean_string_append(x_1, x_2); -return x_3; -} -} -static lean_object* _init_l_Lean_Syntax_identComponents___closed__8() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; -x_1 = l_Lean_Syntax_identComponents___closed__1; -x_2 = l_Lean_Syntax_identComponents___closed__2; -x_3 = lean_unsigned_to_nat(214u); -x_4 = lean_unsigned_to_nat(4u); -x_5 = l_Lean_Syntax_identComponents___closed__7; -x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); -return x_6; -} -} -static lean_object* _init_l_Lean_Syntax_identComponents___closed__9() { -_start: -{ lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l_Lean_Syntax_getAtomVal___closed__1; x_2 = lean_unsigned_to_nat(0u); @@ -3583,7 +3632,7 @@ lean_inc(x_3); switch (lean_obj_tag(x_3)) { case 0: { -lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; +lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; uint8_t x_12; x_4 = lean_ctor_get(x_1, 1); lean_inc(x_4); x_5 = lean_ctor_get(x_1, 2); @@ -3595,219 +3644,236 @@ x_7 = lean_ctor_get(x_3, 1); lean_inc(x_7); x_8 = lean_ctor_get(x_3, 2); lean_inc(x_8); -lean_dec(x_3); x_9 = lean_erase_macro_scopes(x_5); x_10 = l_Lean_Syntax_identComponents_nameComps(x_9, x_2); lean_inc(x_4); x_11 = l_Lean_Syntax_splitNameLit(x_4); -x_12 = lean_unsigned_to_nat(0u); -x_13 = l_List_lengthTRAux___rarg(x_10, x_12); +x_12 = l_List_isEmpty___rarg(x_11); +if (x_12 == 0) +{ +lean_object* x_13; lean_object* x_14; lean_object* x_15; +x_13 = lean_unsigned_to_nat(0u); +x_14 = l_List_lengthTRAux___rarg(x_10, x_13); if (lean_obj_tag(x_2) == 0) { -x_14 = x_11; -goto block_22; +x_15 = x_11; +goto block_23; } else { -lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; uint8_t x_34; -x_23 = lean_ctor_get(x_2, 0); -lean_inc(x_23); +lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; uint8_t x_35; +x_24 = lean_ctor_get(x_2, 0); +lean_inc(x_24); lean_dec(x_2); -x_24 = l_List_lengthTRAux___rarg(x_11, x_12); -x_25 = lean_nat_sub(x_24, x_23); -lean_dec(x_23); +x_25 = l_List_lengthTRAux___rarg(x_11, x_13); +x_26 = lean_nat_sub(x_25, x_24); lean_dec(x_24); +lean_dec(x_25); lean_inc(x_11); -x_26 = l_List_take___rarg(x_25, x_11); -x_27 = l_List_foldl___at_Lean_Syntax_identComponents___spec__3(x_12, x_26); -lean_dec(x_26); -x_28 = lean_unsigned_to_nat(1u); -x_29 = lean_nat_sub(x_27, x_28); +x_27 = l_List_take___rarg(x_26, x_11); +x_28 = l_List_foldl___at_Lean_Syntax_identComponents___spec__4(x_13, x_27); lean_dec(x_27); -x_30 = l_List_drop___rarg(x_25, x_11); +x_29 = lean_unsigned_to_nat(1u); +x_30 = lean_nat_sub(x_28, x_29); +lean_dec(x_28); +x_31 = l_List_drop___rarg(x_26, x_11); lean_dec(x_11); -x_31 = lean_ctor_get(x_4, 0); -lean_inc(x_31); -x_32 = lean_ctor_get(x_4, 1); +x_32 = lean_ctor_get(x_4, 0); lean_inc(x_32); -x_33 = lean_ctor_get(x_4, 2); +x_33 = lean_ctor_get(x_4, 1); lean_inc(x_33); -x_34 = lean_nat_dec_le(x_29, x_12); -if (x_34 == 0) -{ -lean_object* x_35; uint8_t x_36; lean_object* x_37; uint8_t x_38; -x_35 = lean_nat_add(x_32, x_12); -x_36 = lean_nat_dec_le(x_33, x_35); -x_37 = lean_nat_add(x_32, x_29); -lean_dec(x_29); -lean_dec(x_32); -x_38 = lean_nat_dec_le(x_33, x_37); -if (x_36 == 0) -{ -if (x_38 == 0) +x_34 = lean_ctor_get(x_4, 2); +lean_inc(x_34); +x_35 = lean_nat_dec_le(x_30, x_13); +if (x_35 == 0) { -lean_object* x_39; lean_object* x_40; +lean_object* x_36; uint8_t x_37; lean_object* x_38; uint8_t x_39; +x_36 = lean_nat_add(x_33, x_13); +x_37 = lean_nat_dec_le(x_34, x_36); +x_38 = lean_nat_add(x_33, x_30); +lean_dec(x_30); lean_dec(x_33); -x_39 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_39, 0, x_31); -lean_ctor_set(x_39, 1, x_35); -lean_ctor_set(x_39, 2, x_37); -x_40 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_40, 0, x_39); -lean_ctor_set(x_40, 1, x_30); -x_14 = x_40; -goto block_22; +x_39 = lean_nat_dec_le(x_34, x_38); +if (x_37 == 0) +{ +if (x_39 == 0) +{ +lean_object* x_40; lean_object* x_41; +lean_dec(x_34); +x_40 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_40, 0, x_32); +lean_ctor_set(x_40, 1, x_36); +lean_ctor_set(x_40, 2, x_38); +x_41 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_41, 0, x_40); +lean_ctor_set(x_41, 1, x_31); +x_15 = x_41; +goto block_23; } else { -lean_object* x_41; lean_object* x_42; -lean_dec(x_37); -x_41 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_41, 0, x_31); -lean_ctor_set(x_41, 1, x_35); -lean_ctor_set(x_41, 2, x_33); -x_42 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_42, 0, x_41); -lean_ctor_set(x_42, 1, x_30); -x_14 = x_42; -goto block_22; +lean_object* x_42; lean_object* x_43; +lean_dec(x_38); +x_42 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_42, 0, x_32); +lean_ctor_set(x_42, 1, x_36); +lean_ctor_set(x_42, 2, x_34); +x_43 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_43, 0, x_42); +lean_ctor_set(x_43, 1, x_31); +x_15 = x_43; +goto block_23; } } else { -lean_dec(x_35); -if (x_38 == 0) +lean_dec(x_36); +if (x_39 == 0) { -lean_object* x_43; lean_object* x_44; -x_43 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_43, 0, x_31); -lean_ctor_set(x_43, 1, x_33); -lean_ctor_set(x_43, 2, x_37); -x_44 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_44, 0, x_43); -lean_ctor_set(x_44, 1, x_30); -x_14 = x_44; -goto block_22; +lean_object* x_44; lean_object* x_45; +x_44 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_44, 0, x_32); +lean_ctor_set(x_44, 1, x_34); +lean_ctor_set(x_44, 2, x_38); +x_45 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_45, 0, x_44); +lean_ctor_set(x_45, 1, x_31); +x_15 = x_45; +goto block_23; } else { -lean_object* x_45; lean_object* x_46; -lean_dec(x_37); -lean_inc(x_33); -x_45 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_45, 0, x_31); -lean_ctor_set(x_45, 1, x_33); -lean_ctor_set(x_45, 2, x_33); -x_46 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_46, 0, x_45); -lean_ctor_set(x_46, 1, x_30); -x_14 = x_46; -goto block_22; +lean_object* x_46; lean_object* x_47; +lean_dec(x_38); +lean_inc(x_34); +x_46 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_46, 0, x_32); +lean_ctor_set(x_46, 1, x_34); +lean_ctor_set(x_46, 2, x_34); +x_47 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_47, 0, x_46); +lean_ctor_set(x_47, 1, x_31); +x_15 = x_47; +goto block_23; } } } else { -lean_object* x_47; lean_object* x_48; +lean_object* x_48; lean_object* x_49; +lean_dec(x_34); lean_dec(x_33); lean_dec(x_32); -lean_dec(x_31); -lean_dec(x_29); -x_47 = l_Lean_Syntax_identComponents___closed__9; -x_48 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_48, 0, x_47); -lean_ctor_set(x_48, 1, x_30); -x_14 = x_48; -goto block_22; +lean_dec(x_30); +x_48 = l_Lean_Syntax_identComponents___closed__5; +x_49 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_49, 0, x_48); +lean_ctor_set(x_49, 1, x_31); +x_15 = x_49; +goto block_23; } } -block_22: +block_23: { -lean_object* x_15; uint8_t x_16; -x_15 = l_List_lengthTRAux___rarg(x_14, x_12); -x_16 = lean_nat_dec_eq(x_13, x_15); -lean_dec(x_15); -lean_dec(x_13); -if (x_16 == 0) -{ -lean_object* x_17; lean_object* x_18; +lean_object* x_16; uint8_t x_17; +x_16 = l_List_lengthTRAux___rarg(x_15, x_13); +x_17 = lean_nat_dec_eq(x_14, x_16); +lean_dec(x_16); lean_dec(x_14); -lean_dec(x_10); +if (x_17 == 0) +{ +lean_object* x_18; lean_object* x_19; +lean_dec(x_15); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_4); -x_17 = l_Lean_Syntax_identComponents___closed__8; -x_18 = l_panic___at_Lean_Syntax_identComponents___spec__1(x_17); -return x_18; +x_18 = lean_box(0); +x_19 = l_Lean_Syntax_identComponents___lambda__1(x_3, x_10, x_18); +return x_19; } else { -lean_object* x_19; lean_object* x_20; lean_object* x_21; -x_19 = l_List_zipWith___at_List_zip___spec__1___rarg(x_10, x_14); +lean_object* x_20; lean_object* x_21; lean_object* x_22; +lean_dec(x_3); +x_20 = l_List_zipWith___at_List_zip___spec__1___rarg(x_10, x_15); lean_dec(x_10); -x_20 = lean_box(0); -x_21 = l_List_mapTR_loop___at_Lean_Syntax_identComponents___spec__2(x_4, x_6, x_7, x_8, x_19, x_20); +x_21 = lean_box(0); +x_22 = l_List_mapTR_loop___at_Lean_Syntax_identComponents___spec__3(x_4, x_6, x_7, x_8, x_20, x_21); lean_dec(x_7); lean_dec(x_4); -return x_21; +return x_22; +} } } +else +{ +lean_object* x_50; lean_object* x_51; +lean_dec(x_11); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_4); +lean_dec(x_2); +x_50 = lean_box(0); +x_51 = l_Lean_Syntax_identComponents___lambda__1(x_3, x_10, x_50); +return x_51; +} } case 1: { -lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; -x_49 = lean_ctor_get(x_1, 2); -lean_inc(x_49); +lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; +x_52 = lean_ctor_get(x_1, 2); +lean_inc(x_52); lean_dec(x_1); -x_50 = lean_erase_macro_scopes(x_49); -x_51 = l_Lean_Syntax_identComponents_nameComps(x_50, x_2); +x_53 = lean_erase_macro_scopes(x_52); +x_54 = l_Lean_Syntax_identComponents_nameComps(x_53, x_2); lean_dec(x_2); -x_52 = lean_box(0); -x_53 = l_List_mapTR_loop___at_Lean_Syntax_identComponents___spec__4(x_3, x_51, x_52); -return x_53; +x_55 = lean_box(0); +x_56 = l_List_mapTR_loop___at_Lean_Syntax_identComponents___spec__5(x_3, x_54, x_55); +return x_56; } default: { -lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; -x_54 = lean_ctor_get(x_1, 2); -lean_inc(x_54); +lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; +x_57 = lean_ctor_get(x_1, 2); +lean_inc(x_57); lean_dec(x_1); -x_55 = lean_erase_macro_scopes(x_54); -x_56 = l_Lean_Syntax_identComponents_nameComps(x_55, x_2); +x_58 = lean_erase_macro_scopes(x_57); +x_59 = l_Lean_Syntax_identComponents_nameComps(x_58, x_2); lean_dec(x_2); -x_57 = lean_box(0); -x_58 = l_List_mapTR_loop___at_Lean_Syntax_identComponents___spec__5(x_3, x_56, x_57); -return x_58; +x_60 = lean_box(0); +x_61 = l_List_mapTR_loop___at_Lean_Syntax_identComponents___spec__6(x_3, x_59, x_60); +return x_61; } } } else { -lean_object* x_59; lean_object* x_60; +lean_object* x_62; lean_object* x_63; lean_dec(x_2); lean_dec(x_1); -x_59 = l_Lean_Syntax_identComponents___closed__4; -x_60 = l_panic___at_Lean_Syntax_identComponents___spec__1(x_59); -return x_60; +x_62 = l_Lean_Syntax_identComponents___closed__4; +x_63 = l_panic___at_Lean_Syntax_identComponents___spec__1(x_62); +return x_63; } } } -LEAN_EXPORT lean_object* l_List_mapTR_loop___at_Lean_Syntax_identComponents___spec__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +LEAN_EXPORT lean_object* l_List_mapTR_loop___at_Lean_Syntax_identComponents___spec__3___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { _start: { lean_object* x_7; -x_7 = l_List_mapTR_loop___at_Lean_Syntax_identComponents___spec__2(x_1, x_2, x_3, x_4, x_5, x_6); +x_7 = l_List_mapTR_loop___at_Lean_Syntax_identComponents___spec__3(x_1, x_2, x_3, x_4, x_5, x_6); lean_dec(x_3); lean_dec(x_1); return x_7; } } -LEAN_EXPORT lean_object* l_List_foldl___at_Lean_Syntax_identComponents___spec__3___boxed(lean_object* x_1, lean_object* x_2) { +LEAN_EXPORT lean_object* l_List_foldl___at_Lean_Syntax_identComponents___spec__4___boxed(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; -x_3 = l_List_foldl___at_Lean_Syntax_identComponents___spec__3(x_1, x_2); +x_3 = l_List_foldl___at_Lean_Syntax_identComponents___spec__4(x_1, x_2); lean_dec(x_2); return x_3; } @@ -8485,10 +8551,10 @@ l_Lean_Syntax_asNode___closed__3 = _init_l_Lean_Syntax_asNode___closed__3(); lean_mark_persistent(l_Lean_Syntax_asNode___closed__3); l_Lean_Syntax_asNode___closed__4 = _init_l_Lean_Syntax_asNode___closed__4(); lean_mark_persistent(l_Lean_Syntax_asNode___closed__4); -l_List_mapTR_loop___at_Lean_Syntax_identComponents___spec__2___closed__1 = _init_l_List_mapTR_loop___at_Lean_Syntax_identComponents___spec__2___closed__1(); -lean_mark_persistent(l_List_mapTR_loop___at_Lean_Syntax_identComponents___spec__2___closed__1); -l_List_mapTR_loop___at_Lean_Syntax_identComponents___spec__2___closed__2 = _init_l_List_mapTR_loop___at_Lean_Syntax_identComponents___spec__2___closed__2(); -lean_mark_persistent(l_List_mapTR_loop___at_Lean_Syntax_identComponents___spec__2___closed__2); +l_List_mapTR_loop___at_Lean_Syntax_identComponents___spec__3___closed__1 = _init_l_List_mapTR_loop___at_Lean_Syntax_identComponents___spec__3___closed__1(); +lean_mark_persistent(l_List_mapTR_loop___at_Lean_Syntax_identComponents___spec__3___closed__1); +l_List_mapTR_loop___at_Lean_Syntax_identComponents___spec__3___closed__2 = _init_l_List_mapTR_loop___at_Lean_Syntax_identComponents___spec__3___closed__2(); +lean_mark_persistent(l_List_mapTR_loop___at_Lean_Syntax_identComponents___spec__3___closed__2); l_Lean_Syntax_identComponents___closed__1 = _init_l_Lean_Syntax_identComponents___closed__1(); lean_mark_persistent(l_Lean_Syntax_identComponents___closed__1); l_Lean_Syntax_identComponents___closed__2 = _init_l_Lean_Syntax_identComponents___closed__2(); @@ -8499,14 +8565,6 @@ l_Lean_Syntax_identComponents___closed__4 = _init_l_Lean_Syntax_identComponents_ lean_mark_persistent(l_Lean_Syntax_identComponents___closed__4); l_Lean_Syntax_identComponents___closed__5 = _init_l_Lean_Syntax_identComponents___closed__5(); lean_mark_persistent(l_Lean_Syntax_identComponents___closed__5); -l_Lean_Syntax_identComponents___closed__6 = _init_l_Lean_Syntax_identComponents___closed__6(); -lean_mark_persistent(l_Lean_Syntax_identComponents___closed__6); -l_Lean_Syntax_identComponents___closed__7 = _init_l_Lean_Syntax_identComponents___closed__7(); -lean_mark_persistent(l_Lean_Syntax_identComponents___closed__7); -l_Lean_Syntax_identComponents___closed__8 = _init_l_Lean_Syntax_identComponents___closed__8(); -lean_mark_persistent(l_Lean_Syntax_identComponents___closed__8); -l_Lean_Syntax_identComponents___closed__9 = _init_l_Lean_Syntax_identComponents___closed__9(); -lean_mark_persistent(l_Lean_Syntax_identComponents___closed__9); l_Lean_Syntax_instForInTopDownSyntax_loop___rarg___lambda__7___closed__1 = _init_l_Lean_Syntax_instForInTopDownSyntax_loop___rarg___lambda__7___closed__1(); lean_mark_persistent(l_Lean_Syntax_instForInTopDownSyntax_loop___rarg___lambda__7___closed__1); l_Lean_Syntax_instForInTopDownSyntax_loop___rarg___lambda__7___closed__2 = _init_l_Lean_Syntax_instForInTopDownSyntax_loop___rarg___lambda__7___closed__2(); diff --git a/tests/lean/opaqueReprAttr.lean b/tests/lean/opaqueReprAttr.lean new file mode 100644 index 000000000000..8b22222a4510 --- /dev/null +++ b/tests/lean/opaqueReprAttr.lean @@ -0,0 +1,40 @@ +namespace MkAndValAreOptimizedAway + +structure MyZero where + val : Nat + +def MyZero.valImpl (_self : MyZero) : Nat := 0 +attribute [implemented_by MyZero.valImpl] MyZero.val + +unsafe def MyZero.mkImpl (_val : Nat) : MyZero := unsafeCast 0 +attribute [implemented_by MyZero.mkImpl] MyZero.mk + +#eval (MyZero.mk 1).val -- 1 + +end MkAndValAreOptimizedAway + +namespace UsingAttr + +@[opaque_repr] +structure MyZero where + val : Nat + +def MyZero.valImpl (_self : MyZero) : Nat := 0 +attribute [implemented_by MyZero.valImpl] MyZero.val + +unsafe def MyZero.mkImpl (_val : Nat) : MyZero := unsafeCast 0 +attribute [implemented_by MyZero.mkImpl] MyZero.mk + +#eval (MyZero.mk 1).val -- 0 + +-- FIXME: it would be nice if we didn't have to override casesOn too +@[inline] def MyZero.casesOnImpl {motive : MyZero → Sort u} (t : MyZero) + (mk : ∀ val, motive { val }) : motive t := mk _ +attribute [implemented_by MyZero.casesOnImpl] MyZero.casesOn + +-- we need a blackBox here because the compiler will optimize +-- `(MyZero.mk n).casesOn f` to `f n` otherwise (and this is desirable, even for opaque_repr types) +@[noinline] def blackBox := @id +#eval ((blackBox (MyZero.mk 1)).casesOn fun n => n : Nat) -- 0 + +end UsingAttr diff --git a/tests/lean/opaqueReprAttr.lean.expected.out b/tests/lean/opaqueReprAttr.lean.expected.out new file mode 100644 index 000000000000..e22493782f08 --- /dev/null +++ b/tests/lean/opaqueReprAttr.lean.expected.out @@ -0,0 +1,3 @@ +1 +0 +0