+ /**
+ * Resolve indexed dependencies.
+ *
+ * ResourceLoader uses an optimization to save space which replaces module names in
+ * dependency lists with the index of that module within the array of module
+ * registration data if it exists. The benefit is a significant reduction in the data
+ * size of the startup module. This function changes those dependency lists back to
+ * arrays of strings.
+ *
+ * @param {Array} modules Modules array
+ */
+ function resolveIndexedDependencies( modules ) {
+ var i, iLen, j, jLen, module, dependency;
+
+ // Expand indexed dependency names
+ for ( i = 0, iLen = modules.length; i < iLen; i++ ) {
+ module = modules[i];
+ if ( module[2] ) {
+ for ( j = 0, jLen = module[2].length; j < jLen; j++ ) {
+ dependency = module[2][j];
+ if ( typeof dependency === 'number' ) {
+ module[2][j] = modules[dependency][0];
+ }
+ }
+ }
+ }
+ }
+