public void compile(String program) {
        program = optimize(program);
        jumpMarkers = new int[program.length()];
        for (int i = 0; i < program.length(); i++) {
            if (program.charAt(i) == '[') {
                jumpMarkers[i] = i + extract(i, program).length() + 1;
            }
        }

        globalProgram = program;
    }