Skip to content

What is an intrinsic? #1540

Open
Open
@jmdyck

Description

@jmdyck

The spec doesn't really define the term "intrinsic".

It does define "well-known intrinsic":

built-in objects that are explicitly referenced by the algorithms of this specification

which suggests that "intrinsic" simply means "built-in object".

Alternatively, one could reasonably infer that an intrinsic is any object created by the CreateIntrinsics operation. I believe that all such objects are built-in objects, but the converse is not quite true. That is, the set of objects created by CreateIntrinsics is a subset of the built-in objects (for a given realm). For example, each invocation of MakeArgGetter creates a built-in function object, and that happens outside of CreateIntrinsics.

So: is a function created by MakeArgGetter an intrinsic? My guess is that it isn't, i.e. that the latter inference is the correct one. Not a big deal, but it would be nice to know.


While I'm in the neighborhood, 6.1.7.4 Well-Known Intrinsic Objects says:

Well-known intrinsics are built-in objects that are explicitly referenced by the algorithms of this specification and which usually have realm-specific identities. Unless otherwise specified each intrinsic object actually corresponds to a set of similar objects, one per realm.

I'm dubious about the "usually" and "Unless otherwise specified". Are there any (well-known) intrinsic objects that aren't tied to a specific realm? CreateIntrinsics doesn't seem to think so.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions