lib/json_constants_parser.js
function(constantsData) {
	var i;
	var registerName;
	try {
		for(i = 0; i < constantsData.registers.length; i++) {
			registerName = constantsData.registers[i].name;
			if(buffer_registers.indexOf(registerName) >= 0) {
				constantsData.registers[i].isBuffer = true;

				addMissingBufferRegisterInfoObject({
					'constantsData': constantsData,
					'location': 'registers',
					'index': i,
					'name': registerName,
				});
			}
		}
		for(i = 0; i < constantsData.registers_beta.length; i++) {
			registerName = constantsData.registers_beta[i].name;
			if(buffer_registers.indexOf(registerName) >= 0) {
				constantsData.registers_beta[i].isBuffer = true;

				addMissingBufferRegisterInfoObject({
					'constantsData': constantsData,
					'location': 'registers_beta',
					'index': i,
					'name': registerName,
				});
			}
		}
	} catch(err) {
		console.log('Error adding missing buffer register flags', err, i);
	}
	return constantsData;
}
function(constantsData) {
	var i;
	var registerName;
	try {
		for(i = 0; i < constantsData.registers.length; i++) {
			registerName = constantsData.registers[i].name;
			if(buffer_registers.indexOf(registerName) >= 0) {
				constantsData.registers[i].isBuffer = true;

				addMissingBufferRegisterInfoObject({
					'constantsData': constantsData,
					'location': 'registers',
					'index': i,
					'name': registerName,
				});
			}
		}
		for(i = 0; i < constantsData.registers_beta.length; i++) {
			registerName = constantsData.registers_beta[i].name;
			if(buffer_registers.indexOf(registerName) >= 0) {
				constantsData.registers_beta[i].isBuffer = true;

				addMissingBufferRegisterInfoObject({
					'constantsData': constantsData,
					'location': 'registers_beta',
					'index': i,
					'name': registerName,
				});
			}
		}
	} catch(err) {
		console.log('Error adding missing buffer register flags', err, i);
	}
	return constantsData;
}
function ( constantsData ) { var i ; var registerName ; try { for ( i = 0 ; i < constantsData . registers . length ; i ++ ) { registerName = constantsData . registers [ i ] . name ; if ( buffer_registers . indexOf ( registerName ) >= 0 ) { constantsData . registers [ i ] . isBuffer = true ; addMissingBufferRegisterInfoObject ( { 'constantsData' : constantsData , 'location' : 'registers' , 'index' : i , 'name' : registerName , } ) ; } } for ( i = 0 ; i < constantsData . registers_beta . length ; i ++ ) { registerName = constantsData . registers_beta [ i ] . name ; if ( buffer_registers . indexOf ( registerName ) >= 0 ) { constantsData . registers_beta [ i ] . isBuffer = true ; addMissingBufferRegisterInfoObject ( { 'constantsData' : constantsData , 'location' : 'registers_beta' , 'index' : i , 'name' : registerName , } ) ; } } } catch ( err ) { console . log ( 'Error adding missing buffer register flags' , err , i ) ; } return constantsData ; }
This function forces the isBuffer register flag to be set for known buffer
registers.
This function forces the isBuffer register flag to be set for known buffer registers .