[js] compiler: rename prologue and return functions
[js] compiler: change compiled function prototype to int (*)(obj_t **)