Lines Matching refs:Array
373 if (!args.splice) args = Array.prototype.slice.call(args);
492 // @param returnType The return type of the function, one of the JS types 'number', 'string' or 'array' (use 'number' for any C pointer, and
493 // 'array' for JavaScript arrays and typed arrays).
494 // @param argTypes An array of the types of arguments for the function (if there are no arguments, this can be ommitted). Types are as in returnType,
495 // except that 'array' is not possible (there is no way for us to know the length of the array)
496 // @param args An array of the arguments to the function, as native JS values (as in returnType)
523 } else if (type == 'array') {
535 assert(type != 'array');
556 return ccallFunc(func, returnType, argTypes, Array.prototype.slice.call(arguments));
615 // @slab: An array of data, or a number. If a number, then the size of the block to allocate,
618 // @types: Either an array of types, one for each byte (or 0 if no type at that position),
735 'Cannot fallback to non-typed array case: Code is too specialized');
792 // This processes a JS string into a C-line array of numbers, 0-terminated.
805 function intArrayToString(array) {
807 for (var i = 0; i < array.length; i++) {
808 var chr = array[i];
817 // Write a Javascript array to somewhere in the heap
819 var array = intArrayFromString(string, dontAddNull);
821 while (i < array.length) {
822 var chr = array[i];
828 function writeArrayToMemory(array, buffer) {
829 for (var i = 0; i < array.length; i++) {
830 HEAP8[(((buffer)+(i))|0)]=array[i];
1179 var dataArray = new Array(data.length);
1185 contents: data.subarray ? data.subarray(0) : data // as an optimization, create a new array wrapper (not buffer) here, to help JS engines understand this object
2101 if (contents.subarray) { // typed array
2104 if (contents.slice) { // normal array
2571 // Remember the contents at the time of opening in an array, so we can
3121 var array = intArrayFromString(text);
3122 for (var j = 0; j < array.length; j++) {
3123 HEAP8[(((argPtr)+(j))|0)]=array[j]
3361 // Remember the contents at the time of opening in an array, so we can
4041 bb.append((new Uint8Array(byteArray)).buffer); // we need to pass a buffer, and must copy the array to get the right data range