'Creates a template object from compiled code and the globals.  This
is used by the loaders and environment to create a template object.'

@classmethod
def from_code(cls, environment, code, globals, uptodate=None):

    t = object.__new__(cls)
    namespace = {'environment': environment, '__jinja_template__': t}
    exec code in namespace
    t.environment = environment
    t.globals = globals
    t.name = namespace['name']
    t.filename = code.co_filename
    t.blocks = namespace['blocks']
    t.root_render_func = namespace['root']
    t._module = None
    t._debug_info = namespace['debug_info']
    t._uptodate = uptodate
    return t
