The interpreter engine for the core JavaScript language, independent of the browser's object model. File ONLY core JavaScript language bugs in this category. For bugs involving browser objects such as "window" and "document", use the "DOM" component. For bugs involving calls between JavaScript and C++, use the "XPConnect" component.

This patch:
* Moves JSObject::callHook, JSObject::isCallable etc to jsobjinlines.h These functions are just a few branches in the common case so we don't want OOL calls.
* Adds a fast path to determine builtinTag in obj_toString. I moved the existing code into GetBuiltinTagSlow, that code is now only used for proxies. In debug builds we check these return the same result. This adds some duplication but considering how hot this code is I think it's worth it.
* I made the (most common) PlainObject case a bit faster by avoiding the strcmp.
For the micro-benchmark below I get:
before: 786 ms
after: 536 ms
So about a 30% improvement.
function f() {
var res = "";
var objs = [{}, [1, 2], new Date, function(){}];
var toString = Object.prototype.toString;
var t = new Date;
for (var i = 0; i < 5000000; i++) {
for (var j = 0; j < 4; j++)
res = toString.call(objs[j]);
}
print(new Date - t);
return res;
}
f();

(In reply to Tom Schuster [:evilpie] from comment #2)
> I am a bit surprised that reimplementing GetBuiltinClass makes such a huge
> difference, is that just call overhead?
Call overhead too but worst case GetBuiltinClass does 20 Class comparisons or so and then we return to obj_toString where we do a second switch on the ESClass value.