iridium - v0.9a
    Preparing search index...

    When instantiating an object of a JSClass, if the class happens to use private methods, we must register a brand (a unique symbol) with it. This brand check ensures that the private symbol/method being referenced is valid in the scope. If the brand of the object instance and the private method being referenced fail the brand check, a runtime error is thrown.

    add a private brand field to 'home_obj' if not already present and if obj is != null add a private brand to it

    One may imagine this to be a way to push the class encapsulation check to the runtime; contrary to languages like Java/C++ where it might be a static compile time check.

    [0] JSADDBRAND (obj, homeObj)
    
    class Test { #foo() { } }
    

    This instruction is added at the end of the class property init closure (a closure used to initialize the fields of a new object instance). This may be skipped, if there are no private symbols or the check can be proved to be redundant statically.

    • ARG(obj): The object instance.

    • ARG(homeObj): The home object.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    args: IridiumSEXP[] = []

    Args are the children nodes to the current node.

    flags: [string, IridiumPrimitives][] = []

    Flags store metadata/primitive data in an Iridium node. These nodes cannot store other Iridium S-Expressions.

    tag: string = "IridiumSEXP"

    Tag specifics the S-Expression Type.

    Methods

    • Parameters

      • flag: string

      Returns boolean

    • Parameters

      • flag: string

      Returns number

    • Parameters

      • flag: string

      Returns string

    • Parameters

      • flag: string

      Returns boolean

    • Parameters

      • flag: string

      Returns void

    • This method is used to squish the Iridium Code into an array which can be easily stored on disk.

      Returns any[]

      Nested Array of Iridium S-Expressions.

    • Parameters

      Returns void

    • Parameters

      • space: number = 0

      Returns string