I'm not sure I understand your foreign code argument, but the
principle of differentiating between the two types of call sounds useful to me even for the purpose of our optimizations down the road. The approach you're proposing sounds good to me.
I'm mostly thinking of what ends up happening with the C++ code at the very end of the road:
DOMObjCode.call(...);
vs
DOMObjCode.construct(...)
I'm expecting a naive, webkit-like implementation of JavaScript to have different ways of signaling each kind of call.
- Maxime