[webkit-dev] Webkit JavaScript question

Zoltan Herczeg zherczeg at inf.u-szeged.hu
Thu May 21 14:12:21 PDT 2009


Hi,

The JavaScript engine does 3 steps:
1) Parse JS files
2) Generate SquirellFish byte code (ByteCodeGenerator.h is part of it)
3) Compile SF byte code to machine code by its JIT compiler (optional)

The last step depends on the architecture (supported or not) and C++
compiler directives. If JIT is enabled (see wtf/Platform.h), it always
generates machine code. Otherwise an interpreter executes the byte code. A
mixed environment (both jit and interpreter) is not yet supported.

Zoltan

> Hi,
>
> Can you please tell me what is the difference between
> ByteCodeGenerator.h and JIT.h?
>
> I assume ByteCodeGenerator is convert a raw .js file into JavaScript
> VM opecode and will be executed by Webkit JavaScript VM.
> and JIT convert a raw .js file into native machine code and will be
> executed by operating system of the browser?
>
> Is that correct?
> If yes, when/how does Webkit decide to use which approach?
> _______________________________________________
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
> http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
>




More information about the webkit-dev mailing list