On Thu, Jun 26, 2014 at 8:06 AM, Jason Orendorff <jorendo...@mozilla.com>
wrote:

> An alternative involves letting you modify JS code just before it's
> compiled (source-to-source transformation). This is more general (you could
> modify the instrumented code arbitrarily, and react synchronously as it
> executes) but maybe that's undesirable. It's not clear that transformed
> source would interact nicely with other tools, like the debugger. And a
> usable API for this is a tall order.
>

Why is a usable S2S API difficult to produce?

A while ago I spent a few years doing dynamic analysis of Java code.
Although the VMs had a lot of tracing and logging hooks, bytecode
instrumentation was always more flexible and, done carefully, almost always
more performant. I had to write some libraries to make it easy but tool
builders enjoy writing and reusing those :-).

For JS of course we wouldn't want to expose our internal bytecode, hence
S2S.

Rob
-- 
Jtehsauts  tshaei dS,o n" Wohfy  Mdaon  yhoaus  eanuttehrotraiitny  eovni
le atrhtohu gthot sf oirng iyvoeu rs ihnesa.r"t sS?o  Whhei csha iids  teoa
stiheer :p atroa lsyazye,d  'mYaonu,r  "sGients  uapr,e  tfaokreg iyvoeunr,
'm aotr  atnod  sgaoy ,h o'mGee.t"  uTph eann dt hwea lmka'n?  gBoutt  uIp
waanndt  wyeonut  thoo mken.o w
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to