Skip to content
Vladislav Ivanishin edited this page Mar 30, 2016 · 5 revisions

Invoke the d8 shell passing --llvm-filter:

$LLV8_ROOT/v8/out/x64.debug/d8 --llvm-filter=foo --noturbo-asm source.js

the --noturbo-asm switch is supplied to prevent compilation of asm.js code on Turbofan. Don't bother if foo is not an asm.js function.

The filter supports wildcards. If you are not familiar with v8 filters, here is a short reference. The filter is a pattern that matches function names in this way:

  • "*" all; the default
  • "-" all but the top-level function
  • "-name" all but the function "name"
  • "" only the top-level function
  • "name" only the function "name"
  • "name*" only functions starting with "name"
  • "~" none; the tilde is not an identifier

So if you are lucky, and none of the functions in your script contain currently unsupported code, you may just supply --llvm-filter=*. Otherwise limit llvm compilation to a function or a set of functions using wildcards.

Clone this wiki locally