Special method for Function.[[Call]] is as follows. The "this" keyword refers to this function F.
function CreateFunctionCall(thisValue, args){
return function(){
// todo: check whether "this" is correct... doesnt seem to match spec which says to use this.[[FormalParameters]]
var funcCtx = EnterFunctionCode(this, thisValue, args);
if ([[Code]] in this) {
var result = evaluate(this.[[Code]]);
} else {
var result = Completion('normal', undefined, undefined);
}
global.arrExecutionContexts.pop(); // exit current execution context
if (result.type == 'throw' throw result.value;
if (result.type == 'return' return result.value;
return undefined; // result.type must be 'normal'
};
}