@@ -40,7 +40,7 @@ final class FinalScriptFunctionData extends ScriptFunctionData {
*
* @param name name
* @param arity arity
* @param list precompiled code
* @param functions precompiled code
* @param isStrict strict
* @param isBuiltin builtin
* @param isConstructor constructor
...
...
@@ -73,12 +73,13 @@ final class FinalScriptFunctionData extends ScriptFunctionData {
}
privatevoidaddInvoker(finalMethodHandlemh){
booleanneedsCallee=needsCallee(mh);
if(isConstructor(mh)){
//only nasgen constructors: (boolean, self, args) are subject to binding a boolean newObj. isConstructor
//is too conservative a check. However, isConstructor(mh) always implies isConstructor param
//only nasgen constructors: (boolean, self, args) are subject to binding a boolean newObj. isConstructor
//is too conservative a check. However, isConstructor(mh) always implies isConstructor param
assertisConstructor();
code.add(newCompiledFunction(mh.type(),MH.insertArguments(mh,0,false),composeConstructor(MH.insertArguments(mh,0,true),needsCallee)));//make sure callee state can be determined when we reach constructor