lib/class_manager.js
function(class_data) {

		var skeleton = class_data.skeleton,
			name,
			serialized_value,
			serialized_actions = [],
			is_polymorphic = !class_data.is_monomorphic;

		for (name in skeleton) {

			switch (skeleton[name].type) {
				case this.MEMBER_TYPES.REGEXP:
				case this.MEMBER_TYPES.FUNCTION:
					serialized_value = 'r[' + skeleton[name].index + ']';
					break;
				//case 'undefined':
				case this.MEMBER_TYPES.STRING:
					if (is_polymorphic) {
						serialized_value = '"' + skeleton[name].value.replace(/\"/g, "\\\"") + '"';
					}
					break;
				case this.MEMBER_TYPES.PRIMITIVE: // null, boolean, number
					if (is_polymorphic) {
						serialized_value = skeleton[name].value + '';
					}
					break;
			}

			if (serialized_value) {

				if (Lava.VALID_PROPERTY_NAME_REGEX.test(name)) {

					serialized_actions.push('p.' + name + ' = ' + serialized_value + ';');

				} else {

					serialized_actions.push('p[' + Firestorm.String.quote(name) + '] = ' + serialized_value + ';');

				}

				serialized_value = null;

			}

		}

		for (name in class_data.shared) {

			serialized_actions.push('p.' + name + ' = s.' + name + ';');

		}

		return serialized_actions.length
			? new Function('cd,p', "\tvar r=cd.references,\n\t\ts=cd.shared;\n\n\t" + serialized_actions.join('\n\t') + "\n")
			: null;

	}
function(class_data) {

		var skeleton = class_data.skeleton,
			name,
			serialized_value,
			serialized_actions = [],
			is_polymorphic = !class_data.is_monomorphic;

		for (name in skeleton) {

			switch (skeleton[name].type) {
				case this.MEMBER_TYPES.REGEXP:
				case this.MEMBER_TYPES.FUNCTION:
					serialized_value = 'r[' + skeleton[name].index + ']';
					break;
				//case 'undefined':
				case this.MEMBER_TYPES.STRING:
					if (is_polymorphic) {
						serialized_value = '"' + skeleton[name].value.replace(/\"/g, "\\\"") + '"';
					}
					break;
				case this.MEMBER_TYPES.PRIMITIVE: // null, boolean, number
					if (is_polymorphic) {
						serialized_value = skeleton[name].value + '';
					}
					break;
			}

			if (serialized_value) {

				if (Lava.VALID_PROPERTY_NAME_REGEX.test(name)) {

					serialized_actions.push('p.' + name + ' = ' + serialized_value + ';');

				} else {

					serialized_actions.push('p[' + Firestorm.String.quote(name) + '] = ' + serialized_value + ';');

				}

				serialized_value = null;

			}

		}

		for (name in class_data.shared) {

			serialized_actions.push('p.' + name + ' = s.' + name + ';');

		}

		return serialized_actions.length
			? new Function('cd,p', "\tvar r=cd.references,\n\t\ts=cd.shared;\n\n\t" + serialized_actions.join('\n\t') + "\n")
			: null;

	}
function ( class_data ) { var skeleton = class_data . skeleton , name , serialized_value , serialized_actions = [ ] , is_polymorphic = ! class_data . is_monomorphic ; for ( name in skeleton ) { switch ( skeleton [ name ] . type ) { case this . MEMBER_TYPES . REGEXP : case this . MEMBER_TYPES . FUNCTION : serialized_value = 'r[' + skeleton [ name ] . index + ']' ; break ; //case 'undefined': case this . MEMBER_TYPES . STRING : if ( is_polymorphic ) { serialized_value = '"' + skeleton [ name ] . value . replace ( / \" / g , "\\\"" ) + '"' ; } break ; case this . MEMBER_TYPES . PRIMITIVE : // null, boolean, number if ( is_polymorphic ) { serialized_value = skeleton [ name ] . value + '' ; } break ; } if ( serialized_value ) { if ( Lava . VALID_PROPERTY_NAME_REGEX . test ( name ) ) { serialized_actions . push ( 'p.' + name + ' = ' + serialized_value + ';' ) ; } else { serialized_actions . push ( 'p[' + Firestorm . String . quote ( name ) + '] = ' + serialized_value + ';' ) ; } serialized_value = null ; } } for ( name in class_data . shared ) { serialized_actions . push ( 'p.' + name + ' = s.' + name + ';' ) ; } return serialized_actions . length ? new Function ( 'cd,p' , "\tvar r=cd.references,\n\t\ts=cd.shared;\n\n\t" + serialized_actions . join ( '\n\t' ) + "\n" ) : null ; }
Build a function that creates class constructor's prototype. Used in export
@param {_cClassData} class_data
@returns {function}
Build a function that creates class constructor s prototype . Used in export