1

I couldn't find any clear answer. Is the script translated to ByteCode ? to a script specific pseudo-code ?

When i use a compiled nashorn script, is it simply compiled because the JIT compiler did its job on a java translation of the script OR because a specific parsed version of the script has been prepared for a nashorn kind of interpreting VM (kind of smallTalk option) ? Thanks for your help

xaevus
  • 53
  • 6

1 Answers1

1

The "nature" of a compiled script is entirely up to the script engine, e.g.

  • The raw script itself, if the script language doesn't have a compiled version
  • A parsed intermediate object, e.g. an abstract syntax tree for an expression
  • Internal object structures for evaluating the script, e.g. what a regular expression compiles to
  • Byte code
  • ...

The reason you can't find a clear answer, is that there is no clear answer. Every script engine will do its own thing.

Andreas
  • 138,167
  • 8
  • 112
  • 195