# Path: pycket/values.py
# class W_Symbol(W_Object):
#     errorname = "symbol"
#     _attrs_ = ["unreadable", "_isascii", "_unicodevalue", "utf8value", "bar_quoted"]
#     _immutable_fields_ = ["unreadable", "utf8value", "bar_quoted"]
# 
#     def __init__(self, val, unreadable=False):
#         assert isinstance(val, str)
#         self._unicodevalue = None
#         self.utf8value = val
#         self.unreadable = unreadable
#         self._isascii = MAYBE
#         self.bar_quoted = False
#         if val == "" or val == ".":
#             self.bar_quoted = True
#         else:
#             for q in " ()[]{}|\\,`'":
#                 if q in val:
#                     self.bar_quoted = True
#                     break
# 
#     def is_bar_quoted(self):
#         return self.bar_quoted
# 
#     def is_unreadable(self):
#         return self.unreadable
# 
#     @staticmethod
#     def _cache_is_ascii(self):
#         from pycket.values_string import _is_ascii
#         if not we_are_translated():
#             assert self._isascii == MAYBE
#         if _is_ascii(self.utf8value):
#             self._isascii = DEFINITELY_YES
#         else:
#             self._isascii = DEFINITELY_NO
#         return self._isascii
# 
#     def asciivalue(self):
#         isascii = jit.conditional_call_elidable(
#             self._isascii, W_Symbol._cache_is_ascii, self)
#         if isascii == DEFINITELY_NO:
#             return None
#         return self.utf8value
# 
#     @jit.elidable
#     def unicodevalue(self):
#         if self._unicodevalue is None:
#             self._unicodevalue = self.utf8value.decode("utf-8")
#         return self._unicodevalue
# 
#     @staticmethod
#     @jit.elidable
#     def make(string):
#         # This assert statement makes the lowering phase of rpython break...
#         # Maybe comment back in and check for bug.
#         assert isinstance(string, str)
#         w_result = W_Symbol.all_symbols.get(string, None)
#         if w_result is None:
#             w_result = W_Symbol(string)
#             W_Symbol.all_symbols[string] = w_result
#         return w_result
# 
#     @staticmethod
#     @jit.elidable
#     def make_unreadable(string):
#         w_result = W_Symbol.unreadable_symbols.get(string, None)
#         if w_result is None:
#             w_result = W_Symbol(string, unreadable=True)
#             W_Symbol.unreadable_symbols[string] = w_result
#         return w_result
# 
#     def __repr__(self):
#         return self.utf8value
# 
#     @jit.elidable
#     def is_interned(self):
#         if self.unreadable:
#             return False
#         string = self.utf8value
#         symbol = W_Symbol.all_symbols.get(string, None)
#         if symbol is self:
#             return True
#         return False
# 
#     def tostring(self):
#         return "%s" % self.utf8value
# 
#     def variable_name(self):
#         return self.utf8value


from pycket.values import W_Symbol
from pycket.prims.expose import define_nyi, prim_env, expose
    from pycket.prims.expose import prim_env
    from pycket.values import W_Symbol, W_Prim
linklet_str = ["linklet?", "compile-linklet", "recompile-linklet", "eval-linklet", "read-compiled-linklet", "instantiate-linklet",
               "linklet-import-variables", "linklet-export-variables", "instance?", "make-instance", "instance-name", "instance-data",
               "instance-variable-names", "instance-variable-value", "instance-set-variable-value!", "instance-unset-variable!",
               "linklet-directory?", "hash->linklet-directory", "linklet-directory->hash", "linklet-bundle?", "hash->linklet-bundle",
               "linklet-bundle->hash", "variable-reference?", "variable-reference->instance", "variable-reference-constant?",
               "primitive-table", "variable-reference-from-unsafe?",
               "compiled-position->primitive", "linklet-virtual-machine-bytes",
               "read-linklet-bundle-hash", "write-linklet-bundle-hash", "instance-describe-variable!",
               "primitive-lookup"]

unsafe_str = ["unsafe-car", "unsafe-cdr", "unsafe-list-tail",
              "unsafe-list-ref", "unsafe-cons-list", "unsafe-fx+",
              "unsafe-fx-", "unsafe-fx*", "unsafe-fxquotient",
              "unsafe-fxremainder", "unsafe-fxmodulo", "unsafe-fxabs",
              "unsafe-fxand", "unsafe-fxior", "unsafe-fxxor",
              "unsafe-fxnot", "unsafe-fxrshift", "unsafe-fxlshift",
              "unsafe-fx=", "unsafe-fx<", "unsafe-fx>",
              "unsafe-fx>=", "unsafe-fx<=", "unsafe-fxmin",
              "unsafe-fxmax", "unsafe-fl+", "unsafe-fl-",
              "unsafe-fl*", "unsafe-fl/", "unsafe-flabs",
              "unsafe-fl=", "unsafe-fl<", "unsafe-fl>",
              "unsafe-fl>=", "unsafe-fl<=", "unsafe-flmin",
              "unsafe-flmax", "unsafe-fx->fl", "unsafe-fl->fx",
              "unsafe-flrandom", "unsafe-flsqrt", "unsafe-make-flrectangular",
              "unsafe-flreal-part", "unsafe-flimag-part", "unsafe-extfl*",
              "unsafe-extfl+", "unsafe-extfl-", "unsafe-extfl/",
              "unsafe-extfl<", "unsafe-extfl<=", "unsafe-extfl=",
              "unsafe-extfl>", "unsafe-extfl>=", "unsafe-extflabs",
              "unsafe-extflmax", "unsafe-extflmin", "unsafe-extflsqrt",
              "unsafe-extfl->fx", "unsafe-fx->extfl", "unsafe-extflvector-length",

# Path: pycket/values.py
# class W_Symbol(W_Object):
#     errorname = "symbol"
#     _attrs_ = ["unreadable", "_isascii", "_unicodevalue", "utf8value", "bar_quoted"]
#     _immutable_fields_ = ["unreadable", "utf8value", "bar_quoted"]
# 
#     def __init__(self, val, unreadable=False):
#         assert isinstance(val, str)
#         self._unicodevalue = None
#         self.utf8value = val
#         self.unreadable = unreadable
#         self._isascii = MAYBE
#         self.bar_quoted = False
#         if val == "" or val == ".":
#             self.bar_quoted = True
#         else:
#             for q in " ()[]{}|\\,`'":
#                 if q in val:
#                     self.bar_quoted = True
#                     break
# 
#     def is_bar_quoted(self):
#         return self.bar_quoted
# 
#     def is_unreadable(self):
#         return self.unreadable
# 
#     @staticmethod
#     def _cache_is_ascii(self):
#         from pycket.values_string import _is_ascii
#         if not we_are_translated():
#             assert self._isascii == MAYBE
#         if _is_ascii(self.utf8value):
#             self._isascii = DEFINITELY_YES
#         else:
#             self._isascii = DEFINITELY_NO
#         return self._isascii
# 
#     def asciivalue(self):
#         isascii = jit.conditional_call_elidable(
#             self._isascii, W_Symbol._cache_is_ascii, self)
#         if isascii == DEFINITELY_NO:
#             return None
#         return self.utf8value
# 
#     @jit.elidable
#     def unicodevalue(self):
#         if self._unicodevalue is None:
#             self._unicodevalue = self.utf8value.decode("utf-8")
#         return self._unicodevalue
# 
#     @staticmethod
#     @jit.elidable
#     def make(string):
#         # This assert statement makes the lowering phase of rpython break...
#         # Maybe comment back in and check for bug.
#         assert isinstance(string, str)
#         w_result = W_Symbol.all_symbols.get(string, None)
#         if w_result is None:
#             w_result = W_Symbol(string)
#             W_Symbol.all_symbols[string] = w_result
#         return w_result
# 
#     @staticmethod
#     @jit.elidable
#     def make_unreadable(string):
#         w_result = W_Symbol.unreadable_symbols.get(string, None)
#         if w_result is None:
#             w_result = W_Symbol(string, unreadable=True)
#             W_Symbol.unreadable_symbols[string] = w_result
#         return w_result
# 
#     def __repr__(self):
#         return self.utf8value
# 
#     @jit.elidable
#     def is_interned(self):
#         if self.unreadable:
#             return False
#         string = self.utf8value
#         symbol = W_Symbol.all_symbols.get(string, None)
#         if symbol is self:
#             return True
#         return False
# 
#     def tostring(self):
#         return "%s" % self.utf8value
# 
#     def variable_name(self):
#         return self.utf8value


# Path: pycket/prims/primitive_tables.py
from pycket.values import W_Symbol
from pycket.prims.expose import define_nyi, prim_env, expose
    from pycket.prims.expose import prim_env
    from pycket.values import W_Symbol, W_Prim

linklet_str = ["linklet?", "compile-linklet", "recompile-linklet", "eval-linklet", "read-compiled-linklet", "instantiate-linklet",
               "linklet-import-variables", "linklet-export-variables", "instance?", "make-instance", "instance-name", "instance-data",
               "instance-variable-names", "instance-variable-value", "instance-set-variable-value!", "instance-unset-variable!",
               "linklet-directory?", "hash->linklet-directory", "linklet-directory->hash", "linklet-bundle?", "hash->linklet-bundle",
               "linklet-bundle->hash", "variable-reference?", "variable-reference->instance", "variable-reference-constant?",
               "primitive-table", "variable-reference-from-unsafe?",
               "compiled-position->primitive", "linklet-virtual-machine-bytes",
               "read-linklet-bundle-hash", "write-linklet-bundle-hash", "instance-describe-variable!",
               "primitive-lookup"]

unsafe_str = ["unsafe-car", "unsafe-cdr", "unsafe-list-tail",
              "unsafe-list-ref", "unsafe-cons-list", "unsafe-fx+",
              "unsafe-fx-", "unsafe-fx*", "unsafe-fxquotient",
              "unsafe-fxremainder", "unsafe-fxmodulo", "unsafe-fxabs",
              "unsafe-fxand", "unsafe-fxior", "unsafe-fxxor",
              "unsafe-fxnot", "unsafe-fxrshift", "unsafe-fxlshift",
              "unsafe-fx=", "unsafe-fx<", "unsafe-fx>",
              "unsafe-fx>=", "unsafe-fx<=", "unsafe-fxmin",
              "unsafe-fxmax", "unsafe-fl+", "unsafe-fl-",
              "unsafe-fl*", "unsafe-fl/", "unsafe-flabs",
              "unsafe-fl=", "unsafe-fl<", "unsafe-fl>",
              "unsafe-fl>=", "unsafe-fl<=", "unsafe-flmin",
              "unsafe-flmax", "unsafe-fx->fl", "unsafe-fl->fx",
              "unsafe-flrandom", "unsafe-flsqrt", "unsafe-make-flrectangular",
              "unsafe-flreal-part", "unsafe-flimag-part", "unsafe-extfl*",
              "unsafe-extfl+", "unsafe-extfl-", "unsafe-extfl/",
              "unsafe-extfl<", "unsafe-extfl<=", "unsafe-extfl=",
              "unsafe-extfl>", "unsafe-extfl>=", "unsafe-extflabs",
              "unsafe-extflmax", "unsafe-extflmin", "unsafe-extflsqrt",
              "unsafe-extfl->fx", "unsafe-fx->extfl", "unsafe-extflvector-length",

              "unsafe-extflvector-ref", "unsafe-extflvector-set!", "unsafe-unbox*",