imported from jls.c