use an "explicit" stack instead of recursion
Authored by: thibautd 2015-02-11
Parent: [r32044]
Child: [r32046]