Search for pair-produced third-generation squarks decaying via charm quarks or in compressed supersymmetric scenarios inppcollisions ats=8  TeVwith the ATLAS detector