Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Source file typed_array.ml
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265(* Js_of_ocaml library
* http://www.ocsigen.org/js_of_ocaml/
* Copyright (C) 2012 Jérôme Vouillon
* Laboratoire PPS - CNRS Université Paris Diderot
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, with linking exception;
* either version 2.1 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*)open!ImportopenJsclasstypearrayBuffer=objectmethodbyteLength:intreadonly_propmethodslice:int->int->arrayBuffertmethmethodslice_toEnd:int->arrayBuffertmethendletarrayBuffer:(int->arrayBuffert)constr=Js.Unsafe.global##._ArrayBufferclasstypearrayBufferView=objectmethodbuffer:arrayBuffertreadonly_propmethodbyteOffset:intreadonly_propmethodbyteLength:intreadonly_propendclasstype['a,'b]typedArray=objectinheritarrayBufferViewmethod_BYTES_PER_ELEMENT:intreadonly_propmethodlength:intreadonly_propmethodset_fromArray:'ajs_arrayt->int->unitmethmethodset_fromTypedArray:('a,'b)typedArrayt->int->unitmethmethodsubarray:int->int->('a,'b)typedArraytmethmethodsubarray_toEnd:int->('a,'b)typedArraytmethmethodslice:int->int->('a,'b)typedArraytmethmethodslice_toEnd:int->('a,'b)typedArraytmeth(* This fake method is needed for typing purposes.
Without it, ['b] would not be constrained. *)method_content_type_:'boptdefreadonly_propendtypeint8Array=(int,Bigarray.int8_signed_elt)typedArraytypeuint8Array=(int,Bigarray.int8_unsigned_elt)typedArraytypeint16Array=(int,Bigarray.int16_signed_elt)typedArraytypeuint16Array=(int,Bigarray.int16_unsigned_elt)typedArraytypeint32Array=(int32,Bigarray.int32_elt)typedArraytypeuint32Array=(int32,Bigarray.int32_elt)typedArraytypefloat32Array=(float,Bigarray.float32_elt)typedArraytypefloat64Array=(float,Bigarray.float64_elt)typedArrayexternalkind:('a,'b)typedArrayt->('a,'b)Bigarray.kind="caml_ba_kind_of_typed_array"externalfrom_genarray:('a,'b,Bigarray.c_layout)Bigarray.Genarray.t->('a,'b)typedArrayt="caml_ba_to_typed_array"externalto_genarray:('a,'b)typedArrayt->('a,'b,Bigarray.c_layout)Bigarray.Genarray.t="caml_ba_from_typed_array"letint8Array=Js.Unsafe.global##._Int8Arrayletint8Array_fromArray=int8Arrayletint8Array_fromTypedArray=int8Arrayletint8Array_fromBuffer=int8Arrayletint8Array_inBuffer=int8Arrayletuint8Array=Js.Unsafe.global##._Uint8Arrayletuint8Array_fromArray=uint8Arrayletuint8Array_fromTypedArray=uint8Arrayletuint8Array_fromBuffer=uint8Arrayletuint8Array_inBuffer=uint8Arrayletint16Array=Js.Unsafe.global##._Int16Arrayletint16Array_fromArray=int16Arrayletint16Array_fromTypedArray=int16Arrayletint16Array_fromBuffer=int16Arrayletint16Array_inBuffer=int16Arrayletuint16Array=Js.Unsafe.global##._Uint16Arrayletuint16Array_fromArray=uint16Arrayletuint16Array_fromTypedArray=uint16Arrayletuint16Array_fromBuffer=uint16Arrayletuint16Array_inBuffer=uint16Arrayletint32Array=Js.Unsafe.global##._Int32Arrayletint32Array_fromArray=int32Arrayletint32Array_fromTypedArray=int32Arrayletint32Array_fromBuffer=int32Arrayletint32Array_inBuffer=int32Arrayletuint32Array=Js.Unsafe.global##._Uint32Arrayletuint32Array_fromArray=uint32Arrayletuint32Array_fromTypedArray=uint32Arrayletuint32Array_fromBuffer=uint32Arrayletuint32Array_inBuffer=uint32Arrayletfloat32Array=Js.Unsafe.global##._Float32Arrayletfloat32Array_fromArray=float32Arrayletfloat32Array_fromTypedArray=float32Arrayletfloat32Array_fromBuffer=float32Arrayletfloat32Array_inBuffer=float32Arrayletfloat64Array=Js.Unsafe.global##._Float64Arrayletfloat64Array_fromArray=float64Arrayletfloat64Array_fromTypedArray=float64Arrayletfloat64Array_fromBuffer=float64Arrayletfloat64Array_inBuffer=float64Arrayletset:('a,'b)typedArrayt->int->'a->unit=funaiv->array_set(Unsafe.coercea)ivletget:('a,'b)typedArrayt->int->'aoptdef=funai->Js.Unsafe.getailetunsafe_get:('a,'b)typedArrayt->int->'a=funai->Js.Unsafe.getaiclasstypedataView=objectinheritarrayBufferViewmethodgetInt8:int->intmethmethodgetUint8:int->intmethmethodgetInt16:int->intmethmethodgetInt16_:int->boolt->intmethmethodgetUint16:int->intmethmethodgetUint16_:int->boolt->intmethmethodgetInt32:int->intmethmethodgetInt32_:int->boolt->intmethmethodgetUint32:int->floatmethmethodgetUint32_:int->boolt->floatmethmethodgetFloat32:int->floatmethmethodgetFloat32_:int->boolt->floatmethmethodgetFloat64:int->floatmethmethodgetFloat64_:int->boolt->floatmethmethodsetInt8:int->int->unitmethmethodsetUint8:int->int->unitmethmethodsetInt16:int->int->unitmethmethodsetInt16_:int->int->boolt->unitmethmethodsetUint16:int->int->unitmethmethodsetUint16_:int->int->boolt->unitmethmethodsetInt32:int->int->unitmethmethodsetInt32_:int->int->boolt->unitmethmethodsetUint32:int->float->unitmethmethodsetUint32_:int->float->boolt->unitmethmethodsetFloat32:int->float->unitmethmethodsetFloat32_:int->float->boolt->unitmethmethodsetFloat64:int->float->unitmethmethodsetFloat64_:int->float->boolt->unitmethendletdataView=Js.Unsafe.global##._DataViewletdataView_inBuffer=dataViewmoduleBigstring=structtypet=(char,Bigarray.int8_unsigned_elt,Bigarray.c_layout)Bigarray.Array1.texternalto_arrayBuffer:t->arrayBufferJs.t="bigstring_to_array_buffer"externalto_uint8Array:t->uint8ArrayJs.t="bigstring_to_typed_array"externalof_arrayBuffer:arrayBufferJs.t->t="bigstring_of_array_buffer"externalof_uint8Array:uint8ArrayJs.t->t="bigstring_of_typed_array"endmoduleString=structexternalof_uint8Array:uint8ArrayJs.t->string="caml_string_of_array"letof_arrayBufferab=letuint8=new%jsuint8Array_fromBufferabinof_uint8Arrayuint8end