protected void atAssignParamList(CtClass[] params, Bytecode code) throws CompileError { if (params == null) return; int varNo = indexOfParam1(); int n = params.length; for (int i = 0; i < n; ++i) { code.addOpcode(DUP); code.addIconst(i); code.addOpcode(AALOAD); compileUnwrapValue(params[i], code); code.addStore(varNo, params[i]); varNo += is2word(exprType, arrayDim) ? 2 : 1; } }
/** * Inserts a cast operator to the return type. * If the return type is void, this does nothing. */ protected void atCastToRtype(CastExpr expr) throws CompileError { expr.getOprand().accept(this); if (exprType == VOID || isRefType(exprType) || arrayDim > 0) compileUnwrapValue(returnType, bytecode); else if (returnType instanceof CtPrimitiveType) { CtPrimitiveType pt = (CtPrimitiveType)returnType; int destType = MemberResolver.descToType(pt.getDescriptor()); atNumCastExpr(exprType, destType); exprType = destType; arrayDim = 0; className = null; } else throw new CompileError("invalid cast"); }
protected void atAssignParamList(CtClass[] params, Bytecode code) throws CompileError { if (params == null) return; int varNo = indexOfParam1(); int n = params.length; for (int i = 0; i < n; ++i) { code.addOpcode(DUP); code.addIconst(i); code.addOpcode(AALOAD); compileUnwrapValue(params[i], code); code.addStore(varNo, params[i]); varNo += is2word(exprType, arrayDim) ? 2 : 1; } }
/** * Inserts a cast operator to the return type. * If the return type is void, this does nothing. */ protected void atCastToRtype(CastExpr expr) throws CompileError { expr.getOprand().accept(this); if (exprType == VOID || isRefType(exprType) || arrayDim > 0) compileUnwrapValue(returnType, bytecode); else if (returnType instanceof CtPrimitiveType) { CtPrimitiveType pt = (CtPrimitiveType)returnType; int destType = MemberResolver.descToType(pt.getDescriptor()); atNumCastExpr(exprType, destType); exprType = destType; arrayDim = 0; className = null; } else throw new CompileError("invalid cast"); }
protected void atAssignParamList(CtClass[] params, Bytecode code) throws CompileError { if (params == null) return; int varNo = indexOfParam1(); int n = params.length; for (int i = 0; i < n; ++i) { code.addOpcode(DUP); code.addIconst(i); code.addOpcode(AALOAD); compileUnwrapValue(params[i], code); code.addStore(varNo, params[i]); varNo += is2word(exprType, arrayDim) ? 2 : 1; } }
protected void atAssignParamList(CtClass[] params, Bytecode code) throws CompileError { if (params == null) return; int varNo = indexOfParam1(); int n = params.length; for (int i = 0; i < n; ++i) { code.addOpcode(DUP); code.addIconst(i); code.addOpcode(AALOAD); compileUnwrapValue(params[i], code); code.addStore(varNo, params[i]); varNo += is2word(exprType, arrayDim) ? 2 : 1; } }
protected void atAssignParamList(CtClass[] params, Bytecode code) throws CompileError { if (params == null) return; int varNo = indexOfParam1(); int n = params.length; for (int i = 0; i < n; ++i) { code.addOpcode(DUP); code.addIconst(i); code.addOpcode(AALOAD); compileUnwrapValue(params[i], code); code.addStore(varNo, params[i]); varNo += is2word(exprType, arrayDim) ? 2 : 1; } }
protected void atAssignParamList(CtClass[] params, Bytecode code) throws CompileError { if (params == null) return; int varNo = indexOfParam1(); int n = params.length; for (int i = 0; i < n; ++i) { code.addOpcode(DUP); code.addIconst(i); code.addOpcode(AALOAD); compileUnwrapValue(params[i], code); code.addStore(varNo, params[i]); varNo += is2word(exprType, arrayDim) ? 2 : 1; } }
protected void atAssignParamList(CtClass[] params, Bytecode code) throws CompileError { if (params == null) return; int varNo = indexOfParam1(); int n = params.length; for (int i = 0; i < n; ++i) { code.addOpcode(DUP); code.addIconst(i); code.addOpcode(AALOAD); compileUnwrapValue(params[i], code); code.addStore(varNo, params[i]); varNo += is2word(exprType, arrayDim) ? 2 : 1; } }
/** * Inserts a cast operator to the return type. * If the return type is void, this does nothing. */ protected void atCastToRtype(CastExpr expr) throws CompileError { expr.getOprand().accept(this); if (exprType == VOID || isRefType(exprType) || arrayDim > 0) compileUnwrapValue(returnType, bytecode); else if (returnType instanceof CtPrimitiveType) { CtPrimitiveType pt = (CtPrimitiveType)returnType; int destType = MemberResolver.descToType(pt.getDescriptor()); atNumCastExpr(exprType, destType); exprType = destType; arrayDim = 0; className = null; } else throw new CompileError("invalid cast"); }
/** * Inserts a cast operator to the return type. * If the return type is void, this does nothing. */ protected void atCastToRtype(CastExpr expr) throws CompileError { expr.getOprand().accept(this); if (exprType == VOID || isRefType(exprType) || arrayDim > 0) compileUnwrapValue(returnType, bytecode); else if (returnType instanceof CtPrimitiveType) { CtPrimitiveType pt = (CtPrimitiveType)returnType; int destType = MemberResolver.descToType(pt.getDescriptor()); atNumCastExpr(exprType, destType); exprType = destType; arrayDim = 0; className = null; } else throw new CompileError("invalid cast"); }
/** * Inserts a cast operator to the return type. * If the return type is void, this does nothing. */ protected void atCastToRtype(CastExpr expr) throws CompileError { expr.getOprand().accept(this); if (exprType == VOID || isRefType(exprType) || arrayDim > 0) compileUnwrapValue(returnType, bytecode); else if (returnType instanceof CtPrimitiveType) { CtPrimitiveType pt = (CtPrimitiveType)returnType; int destType = MemberResolver.descToType(pt.getDescriptor()); atNumCastExpr(exprType, destType); exprType = destType; arrayDim = 0; className = null; } else throw new CompileError("invalid cast"); }
/** * Inserts a cast operator to the return type. * If the return type is void, this does nothing. */ protected void atCastToRtype(CastExpr expr) throws CompileError { expr.getOprand().accept(this); if (exprType == VOID || isRefType(exprType) || arrayDim > 0) compileUnwrapValue(returnType, bytecode); else if (returnType instanceof CtPrimitiveType) { CtPrimitiveType pt = (CtPrimitiveType)returnType; int destType = MemberResolver.descToType(pt.getDescriptor()); atNumCastExpr(exprType, destType); exprType = destType; arrayDim = 0; className = null; } else throw new CompileError("invalid cast"); }
/** * Inserts a cast operator to the return type. * If the return type is void, this does nothing. */ protected void atCastToRtype(CastExpr expr) throws CompileError { expr.getOprand().accept(this); if (exprType == VOID || isRefType(exprType) || arrayDim > 0) compileUnwrapValue(returnType, bytecode); else if (returnType instanceof CtPrimitiveType) { CtPrimitiveType pt = (CtPrimitiveType)returnType; int destType = MemberResolver.descToType(pt.getDescriptor()); atNumCastExpr(exprType, destType); exprType = destType; arrayDim = 0; className = null; } else throw new CompileError("invalid cast"); }