core.global.registerScope(global);
    public void updatePrototypes() {        context = Context.enter();        context.setCompileFunctionsWithDynamicScope(true);        context.setApplicationClassLoader(app.getClassLoader());        context.setWrapFactory(core.wrapper);        boolean trace = "true".equals(app.getProperty("rhino.trace"));        if (trace) {            context.setDebugger(new Tracer(getResponse()), null);        }        int optLevel = 0;        try {            optLevel = Integer.parseInt(app.getProperty("rhino.optlevel"));        } catch (Exception ignore) {        }        context.setOptimizationLevel(optLevel);        core.updatePrototypes();        context.putThreadLocal("reval", reval);        context.putThreadLocal("engine", this);    }