# Path: src/som/interp_type.py
# @jit.elidable
# def is_ast_interpreter():
#     return _interp_type == _AST
# 
# @jit.elidable
# def is_bytecode_interpreter():
#     return _interp_type == _BC


from rlib.unroll import unrolling_iterable
from functools import reduce
from ..interp_type import is_ast_interpreter, is_bytecode_interpreter
    from som.primitives.primitives import Primitives
    from importlib import import_module
    from glob import glob
    import inspect
    import inspect
        import sys


"""Captures the known primitives at load time of this module, i.e., at compile
   time with RPython.
"""

EXPECTED_NUMBER_OF_PRIMITIVE_FILES = 13


class PrimitivesNotFound(Exception): pass


def _is_primitives_class(e):
    "NOT_RPYTHON"
    entry_name, entry = e

    return (inspect.isclass(entry) and
            issubclass(entry, Primitives)
            and entry is not Primitives
            and entry is not None
            and entry_name is not None
            and not entry_name.startswith("_"))


def _setup_primitives():
    "NOT_RPYTHON"
    base_package = "som.primitives."

# Path: src/som/interp_type.py
# @jit.elidable
# def is_ast_interpreter():
#     return _interp_type == _AST
# 
# @jit.elidable
# def is_bytecode_interpreter():
#     return _interp_type == _BC


# Path: src/som/primitives/known.py
from rlib.unroll import unrolling_iterable
from functools import reduce
from ..interp_type import is_ast_interpreter, is_bytecode_interpreter
    from som.primitives.primitives import Primitives
    from importlib import import_module
    from glob import glob
    import inspect
    import inspect
        import sys



"""Captures the known primitives at load time of this module, i.e., at compile
   time with RPython.
"""

EXPECTED_NUMBER_OF_PRIMITIVE_FILES = 13


class PrimitivesNotFound(Exception): pass


def _is_primitives_class(e):
    "NOT_RPYTHON"
    entry_name, entry = e

    return (inspect.isclass(entry) and
            issubclass(entry, Primitives)
            and entry is not Primitives
            and entry is not None
            and entry_name is not None
            and not entry_name.startswith("_"))


def _setup_primitives():
    "NOT_RPYTHON"
    base_package = "som.primitives."

    if is_ast_interpreter():