The macros might not really be worth it, I never thoroughly tested, to be honest.
On the other hand, the JITs have heuristics for when to inline, and calling more functions makes them less likely to inline the main function itself. But again: I don't know enough about the JITs to really know this. On Tue, Dec 11, 2012 at 4:32 PM, David Bruant <bruan...@gmail.com> wrote: > Le 11/12/2012 16:10, Till Schneidereit a écrit : > >>> b) Should the names of macros indicate how they're implemented or should >>> they just look like other functions? >> >> Just a quick explanation for this: the script that embeds self-hosted >> JS invokes a Python script, builtins/macros.py, that replaces some >> constructs such as IS_UNDEFINED by proper JS code. I.e., they've got >> nothing to do with sweet.js or some other fancy thing. > > I'm side-tracking a bit, what's the value of these macros instead of just > functions? > IIRC, small functions are inlined by the JIT. Or maybe functions cost too > much until LazyBytecode [1] is fixed? > > David > > [1] https://bugzilla.mozilla.org/show_bug.cgi?id=678037 _______________________________________________ dev-tech-js-engine-internals mailing list dev-tech-js-engine-internals@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-tech-js-engine-internals