manpagez: man pages & more
info bigloo
Home | html | info | man
[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

27.3 Name mangling

In order to avoid name clashes, Bigloo uses name mangling when compiling to C or to Jvm. The name mangling for a Scheme identifier may be overridden by the means of an extern export clause (see Section Exporting a Scheme variable).

Four public functions may be used to mangle and to demangle Scheme identifiers:

bigloo procedure: bigloo-mangle string

Mangle the identifier string.

bigloo procedure: bigloo-module-mangle string1 string2

Mangle the identifier string1 that belongs to module string2.

bigloo procedure: bigloo-mangled? string

Returns #t if string has been computed by the bigloo-mangle or bigloo-module-mangle function.

bigloo procedure: bigloo-class-mangled? string

Returns #t if string is a mangled name of a Bigloo class.

bigloo procedure: bigloo-need-mangling string

Returns #t if string requires name mangling because it is not a C or Jvm valid identifier.

bigloo procedure: bigloo-demangle string

Demangle previously mangled identifiers:

(let ((id "foo!")
      (module "a-module"))
   (let ((mangled (bigloo-module-mangle id module)))
      (multiple-value-bind (new-id new-module)
         (bigloo-demangle mangled)
         (and (string=? id new-id) (string=? module new-module)))))
   ⇒ #t
bigloo procedure: bigloo-class-demangle string

Demangle previously mangled class identifier.


[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated on March 31, 2014 using texi2html 5.0.

© manpagez.com 2000-2024
Individual documents may contain additional copyright information.