require a (temporary) register. code must give this back with release_reg
 Second extra parameter may give extra info about the value, see RegisterValue
499108
def use_reg( type , extra = {} )
      raise "Not type #{type.inspect}" unless type.is_a?(Symbol) or type.is_a?(Parfait::Type)
      if @regs.empty?
        reg = Risc.tmp_reg(type , extra)
      else
        reg = @regs.last.next_reg_use(type , extra)
      end
      @regs << reg
      return reg
    end
1072128
def register(self, *args, **kwargs):
        

        assert len(args) <= 2, 'register takes at most 2 args'
        assert len(args) > 0, 'register takes at least 1 arg'

        model, crudbuilder = self.__class__.extract_args(*args)

        if not issubclass(model, models.Model):
            msg = "First argument should be Django Model"
            raise NotModelException(msg)

        key = self._model_key(model, crudbuilder)

        if key in self:
            msg = "Key '{key}' has already been registered.".format(
                key=key
            )
            raise AlreadyRegistered(msg)

        self.__setitem__(key, crudbuilder)
        return crudbuilder
541017
function(key, value) {
        this._removeRemove(this.registers.remove, key);
        var op = this._getOp(this.registers.set, key);
        if (op) {
            op.value = value;
        } else {
            this.registers.set.push({key: key, value: value});
        }
        return this;
    }
1015451
def register(cls):
    
    definition_name = make_definition_name(cls.__name__)
    REGISTRY[definition_name] = cls
    return cls
478849
def register(util_type, registry=_utils):
    

    def marker(f):
        mark = util_type + '_'
        if not f.__name__.startswith(mark):
            raise TypeError(
                'not registering %s to %s' % (f.__name__, util_type))
        registry[util_type][f.__name__[len(mark):]] = f
        return f
    return marker
418455
def _add_argument_register(self, reg_offset):
        
        if reg_offset in self._function_manager._arg_registers and \
                    reg_offset not in self._argument_registers:
            self._argument_registers.append(reg_offset)
1079776
def _register_make(cls):
    ''''''
    assert cls.nxm_headers is not None
    assert cls.nxm_headers is not []
    for nxm_header in cls.nxm_headers:
        assert nxm_header not in _MF_FIELDS
        _MF_FIELDS[nxm_header] = cls.make
    return cls
901923
def autoregister(self, cls):
        

        params = self.get_meta_attributes(cls)
        return self.register(cls, params)
948148
def register(cls, key, filename):
        """"""

        if key in cls._stock:
            logger.info('Warning, replacing resource ' + str(key))
        cls._stock[key] = {'type': 'custom', 'filename': filename}
        logger.info('%s registered as %s' % (filename, key))
609193
def store_reg(self, value, reg_type, reg_name, name=''):
        
        ftype = types.FunctionType(types.VoidType(), [reg_type])
        return self.asm(ftype, "", "{%s}" % reg_name, [value], True, name)
542515
def register_name(self, clsdict):
        
        if self.name is None:
            return
        clsdict[self.name] = self.value
775245
def set_register(self, reg, data):
        
        if reg < 0:
            return
        elif reg < len(self._register_list):
            regName = self._register_list[reg].name
            regBits = self._register_list[reg].bitsize
            if regBits == 64:
                value = conversion.hex16_to_u64be(data)
            else:
                value = conversion.hex8_to_u32be(data)
            logging.debug("GDB: write reg %s: 0x%X", regName, value)
            self._context.write_core_register_raw(regName, value)
955629
def compileThreeAddrForm(program):
    

    def nToChr(reg):
        if reg is None:
            return b'\xff'
        elif reg.n < 0:
            raise ValueError("negative value for register number %s" % reg.n)
        else:
            if sys.version_info[0] < 3:
                return chr(reg.n)
            else:
                # int.to_bytes is not available in Python < 3.2
                #return reg.n.to_bytes(1, sys.byteorder)
                return bytes([reg.n])

    def quadrupleToString(opcode, store, a1=None, a2=None):
        cop = chr(interpreter.opcodes[opcode]).encode('ascii')
        cs = nToChr(store)
        ca1 = nToChr(a1)
        ca2 = nToChr(a2)
        return cop + cs + ca1 + ca2

    def toString(args):
        while len(args) < 4:
            args += (None,)
        opcode, store, a1, a2 = args[:4]
        s = quadrupleToString(opcode, store, a1, a2)
        l = [s]
        args = args[4:]
        while args:
            s = quadrupleToString(b'noop', *args[:3])
            l.append(s)
            args = args[3:]
        return b''.join(l)

    prog_str = b''.join([toString(t) for t in program])
    return prog_str
401417
def write(self, reg, value):
        
        # TODO: check reg: 0-69, 250-255
        self.__check_range('register_value', value)
        logger.debug("Write '%s' to register '%s'" %  (value, reg))
        self.__bus.write_byte_data(self.__address, reg, value)
123406
def register(self, server=None):
        
        if (self.key or self.secret):
            return self.update()

        server_data = self.request(server)

        self.key = server_data["client_id"]
        self.secret = server_data["client_secret"]
        self.expirey = server_data["expires_at"]
125769
def register(self, resource_name, dependent=None):
        '''
        
        '''
        if dependent is None:
            # Give a partial usable as a decorator
            return partial(self.register, resource_name)

        dependent = self._unwrap_dependent(dependent)
        self._register_dependent(dependent, resource_name)
        self._register_resource_dependency(resource_name, dependent)

        # Return dependent to ease use as decorator
        return dependent
1078456
def register_temp_plugin(cls, class_, identifier=None, dist='xblock'):
        
        from mock import Mock

        if identifier is None:
            identifier = class_.__name__.lower()

        entry_point = Mock(
            dist=Mock(key=dist),
            load=Mock(return_value=class_),
        )
        entry_point.name = identifier

        def _decorator(func):                           # pylint: disable=C0111
            @functools.wraps(func)
            def _inner(*args, **kwargs):                # pylint: disable=C0111
                global PLUGIN_CACHE  # pylint: disable=global-statement

                old = list(cls.extra_entry_points)
                old_cache = PLUGIN_CACHE

                cls.extra_entry_points.append((identifier, entry_point))
                PLUGIN_CACHE = {}

                try:
                    return func(*args, **kwargs)
                finally:
                    cls.extra_entry_points = old
                    PLUGIN_CACHE = old_cache
            return _inner
        return _decorator