@@ -3549,8 +3549,9 @@ NewState execute(Context cx, CallFrame frame, InterpreterState state, int op) {
35493549 if (fun instanceof JSFunction
35503550 && ((JSFunction ) fun ).getDescriptor ().getCode () instanceof InterpreterData ) {
35513551 JSFunction ifun = (JSFunction ) fun ;
3552- JSDescriptor desc = ifun .getDescriptor ();
3553- InterpreterData idata = (InterpreterData ) desc .getCode ();
3552+
3553+ JSDescriptor <JSFunction > desc = ifun .getDescriptor ();
3554+ var idata = (InterpreterData <JSFunction >) desc .getCode ();
35543555 if (frame .fnOrScript .getDescriptor ().getSecurityDomain ()
35553556 == desc .getSecurityDomain ()) {
35563557 CallFrame callParentFrame = frame ;
@@ -3620,8 +3621,9 @@ NewState execute(Context cx, CallFrame frame, InterpreterState state, int op) {
36203621 return BREAK_WITHOUT_EXTENSION ;
36213622 }
36223623
3623- if (fun instanceof IdFunctionObject ) {
3624- IdFunctionObject ifun = (IdFunctionObject ) fun ;
3624+ if (fun instanceof JSFunction ) {
3625+ var ifun = (JSFunction ) fun ;
3626+
36253627 if (NativeContinuation .isContinuationConstructor (ifun )) {
36263628 frame .stack [state .stackTop ] = captureContinuation (cx , frame .parentFrame , false );
36273629 return null ;
@@ -3666,8 +3668,9 @@ NewState execute(Context cx, CallFrame frame, InterpreterState state, int op) {
36663668 if (lhs instanceof JSFunction
36673669 && ((JSFunction ) lhs ).getConstructor () instanceof InterpreterData ) {
36683670 JSFunction f = (JSFunction ) lhs ;
3669- JSDescriptor desc = f .getDescriptor ();
3670- InterpreterData idata = (InterpreterData ) desc .getConstructor ();
3671+
3672+ JSDescriptor <JSFunction > desc = f .getDescriptor ();
3673+ var idata = (InterpreterData <JSFunction >) desc .getConstructor ();
36713674 if (frame .fnOrScript .getDescriptor ().getSecurityDomain ()
36723675 == desc .getSecurityDomain ()) {
36733676 if (cx .getLanguageVersion () >= Context .VERSION_ES6
@@ -3700,20 +3703,21 @@ NewState execute(Context cx, CallFrame frame, InterpreterState state, int op) {
37003703 return new StateContinueResult (calleeFrame , state .indexReg );
37013704 }
37023705 }
3703- if (!(lhs instanceof Constructable )) {
3704- if (lhs == DOUBLE_MARK ) lhs = ScriptRuntime .wrapNumber (frame .sDbl [state .stackTop ]);
3705- throw ScriptRuntime .notFunctionError (lhs );
3706- }
3707- Constructable ctor = (Constructable ) lhs ;
3706+ if (lhs instanceof JSFunction ) {
3707+ var f = (JSFunction ) lhs ;
37083708
3709- if (ctor instanceof IdFunctionObject ) {
3710- IdFunctionObject ifun = (IdFunctionObject ) ctor ;
3711- if (NativeContinuation .isContinuationConstructor (ifun )) {
3709+ if (NativeContinuation .isContinuationConstructor (f )) {
37123710 frame .stack [state .stackTop ] = captureContinuation (cx , frame .parentFrame , false );
37133711 return null ;
37143712 }
37153713 }
37163714
3715+ if (!(lhs instanceof Constructable )) {
3716+ if (lhs == DOUBLE_MARK ) lhs = ScriptRuntime .wrapNumber (frame .sDbl [state .stackTop ]);
3717+ throw ScriptRuntime .notFunctionError (lhs );
3718+ }
3719+ Constructable ctor = (Constructable ) lhs ;
3720+
37173721 Object [] outArgs =
37183722 getArgsArray (frame .stack , frame .sDbl , state .stackTop + 1 , state .indexReg );
37193723 frame .stack [state .stackTop ] = ctor .construct (cx , frame .scope , outArgs );
0 commit comments