Revert "Delete locals.c"

This reverts commit c3afaf95538d27aaefa2715372e30b6ed82f78ec.