* @param isOverride true if the generated method overrides a base class
* method, false otherwise.
*/
protected final void codegenCallInContextMethod(ClassGeneratorHelper classGen, boolean isOverride)
{
IResolvedQualifiersReference applyReference = ReferenceFactory.resolvedQualifierQualifiedReference(flexProject.getWorkspace(),
NamespaceDefinition.getAS3NamespaceDefinition(), "apply");
InstructionList callInContext = new InstructionList();
callInContext.addInstruction(ABCConstants.OP_getlocal1);
callInContext.addInstruction(ABCConstants.OP_getlocal2);
callInContext.addInstruction(ABCConstants.OP_getlocal3);
callInContext.addInstruction(ABCConstants.OP_callproperty, new Object[] {applyReference.getMName(), 2});
callInContext.addInstruction(ABCConstants.OP_getlocal, 4);
Label callInContextReturnVoid = new Label();
callInContext.addInstruction(ABCConstants.OP_iffalse, callInContextReturnVoid);
callInContext.addInstruction(ABCConstants.OP_returnvalue);
callInContext.labelNext(callInContextReturnVoid);