private void addCall(final Instruction inst, final int kind) {
		final MemberRef method = (MemberRef) inst.operand();
		final Type type = method.nameAndType().type();

		final Type[] paramTypes = type.paramTypes();
		final Expr[] params = new Expr[paramTypes.length];

		for (int i = paramTypes.length - 1; i >= 0; i--) {
			params[i] = stack.pop(paramTypes[i]);
		}

		Expr top;

		if (inst.opcodeClass() != Opcode.opcx_invokestatic) {
			final Expr obj = stack.pop(Type.OBJECT);

			top = new CallMethodExpr(kind, obj, params, method, type
					.returnType());

		} else {
			top = new CallStaticExpr(params, method, type.returnType());
		}

		if (type.returnType().equals(Type.VOID)) {
			addStmt(new ExprStmt(top));

		} else {
			stack.push(top);
		}
	}