What is the "Ultimate entry point"?

Hello, thank you for taking the time to read my question.

Runtime semantics describe the runtime behavior of ECMAScript code. But runtime semantics are actually abstract operations, which implies they have to be invoked, "called" from somewhere. I am expecting that the spec would have an entry point, like the main function of a program, from which all runtime semantics get called.

Is there such an entry point or am I looking at it the wrong way? For example, ParseModule is an abstract operation that takes some parameters. Where does it get called from, who provides the parameters?

ECMA-262 does not define the environment that executes a program, so that it doesn’t say when, or with which source text, to call ParseModule(), for example.

For the specific case of web browsers, the HTML spec specifies when and how the ParseScript(), the ParseModule(), the ScriptEvaluation() abstract operations (not pretending to be exhaustive) are called, and defines the various Host*() abstract ops.

1 Like

Thank you for the answer.

Up until ES2019, you could treat the abstract operation RunJobs as the "ultimate entry point". (I gather that no implementation actually did, though, which is why it has since been removed.)

1 Like