Lines Matching refs:utils
59 jspb.utils.split64Low = 0;
67 jspb.utils.split64High = 0;
75 jspb.utils.splitUint64 = function(value) {
81 jspb.utils.split64Low = lowBits;
82 jspb.utils.split64High = highBits;
91 jspb.utils.splitInt64 = function(value) {
114 jspb.utils.split64Low = lowBits;
115 jspb.utils.split64High = highBits;
124 jspb.utils.splitZigzag64 = function(value) {
129 jspb.utils.splitUint64(value);
130 var lowBits = jspb.utils.split64Low;
131 var highBits = jspb.utils.split64High;
149 jspb.utils.split64Low = lowBits;
150 jspb.utils.split64High = highBits;
159 jspb.utils.splitFloat32 = function(value) {
169 jspb.utils.split64High = 0;
170 jspb.utils.split64Low = 0x00000000;
173 jspb.utils.split64High = 0;
174 jspb.utils.split64Low = 0x80000000;
181 jspb.utils.split64High = 0;
182 jspb.utils.split64Low = 0x7FFFFFFF;
188 jspb.utils.split64High = 0;
189 jspb.utils.split64Low = ((sign << 31) | (0x7F800000)) >>> 0;
197 jspb.utils.split64High = 0;
198 jspb.utils.split64Low = ((sign << 31) | mant) >>> 0;
206 jspb.utils.split64High = 0;
207 jspb.utils.split64Low = ((sign << 31) | ((exp + 127) << 23) | mant) >>> 0;
216 jspb.utils.splitFloat64 = function(value) {
224 jspb.utils.split64High = 0x00000000;
225 jspb.utils.split64Low = 0x00000000;
228 jspb.utils.split64High = 0x80000000;
229 jspb.utils.split64Low = 0x00000000;
236 jspb.utils.split64High = 0x7FFFFFFF;
237 jspb.utils.split64Low = 0xFFFFFFFF;
243 jspb.utils.split64High = ((sign << 31) | (0x7FF00000)) >>> 0;
244 jspb.utils.split64Low = 0;
253 jspb.utils.split64High = ((sign << 31) | mantHigh) >>> 0;
254 jspb.utils.split64Low = (mant >>> 0);
282 jspb.utils.split64High =
284 jspb.utils.split64Low = mantLow;
293 jspb.utils.splitHash64 = function(hash) {
303 jspb.utils.split64Low = (a + (b << 8) + (c << 16) + (d << 24)) >>> 0;
304 jspb.utils.split64High = (e + (f << 8) + (g << 16) + (h << 24)) >>> 0;
315 jspb.utils.joinUint64 = function(bitsLow, bitsHigh) {
327 jspb.utils.joinInt64 = function(bitsLow, bitsHigh) {
338 var result = jspb.utils.joinUint64(bitsLow, bitsHigh);
353 jspb.utils.toZigzag64 = function(bitsLow, bitsHigh, convert) {
377 jspb.utils.joinZigzag64 = function(bitsLow, bitsHigh) {
378 return jspb.utils.fromZigzag64(bitsLow, bitsHigh, jspb.utils.joinInt64);
393 jspb.utils.fromZigzag64 = function(bitsLow, bitsHigh, convert) {
415 jspb.utils.joinFloat32 = function(bitsLow, bitsHigh) {
445 jspb.utils.joinFloat64 = function(bitsLow, bitsHigh) {
474 jspb.utils.joinHash64 = function(bitsLow, bitsHigh) {
491 jspb.utils.DIGITS = [
497 jspb.utils.ZERO_CHAR_CODE_ = 48;
500 jspb.utils.A_CHAR_CODE_ = 97;
509 jspb.utils.joinUnsignedDecimalString = function(bitsLow, bitsHigh) {
574 jspb.utils.joinSignedDecimalString = function(bitsLow, bitsHigh) {
584 var result = jspb.utils.joinUnsignedDecimalString(bitsLow, bitsHigh);
597 jspb.utils.hash64ToDecimalString = function(hash, signed) {
598 jspb.utils.splitHash64(hash);
599 var bitsLow = jspb.utils.split64Low;
600 var bitsHigh = jspb.utils.split64High;
602 jspb.utils.joinSignedDecimalString(bitsLow, bitsHigh) :
603 jspb.utils.joinUnsignedDecimalString(bitsLow, bitsHigh);
615 jspb.utils.hash64ArrayToDecimalStrings = function(hashes, signed) {
618 result[i] = jspb.utils.hash64ToDecimalString(hashes[i], signed);
630 jspb.utils.decimalStringToHash64 = function(dec) {
661 muladd(10, dec.charCodeAt(i) - jspb.utils.ZERO_CHAR_CODE_);
679 jspb.utils.splitDecimalString = function(value) {
680 jspb.utils.splitHash64(jspb.utils.decimalStringToHash64(value));
688 jspb.utils.toHexDigit_ = function(nibble) {
690 nibble < 10 ? jspb.utils.ZERO_CHAR_CODE_ + nibble :
691 jspb.utils.A_CHAR_CODE_ - 10 + nibble);
699 jspb.utils.fromHexCharCode_ = function(hexCharCode) {
700 if (hexCharCode >= jspb.utils.A_CHAR_CODE_) {
701 return hexCharCode - jspb.utils.A_CHAR_CODE_ + 10;
703 return hexCharCode - jspb.utils.ZERO_CHAR_CODE_;
711 jspb.utils.hash64ToHexString = function(hash) {
718 temp[i * 2 + 2] = jspb.utils.toHexDigit_(c >> 4);
719 temp[i * 2 + 3] = jspb.utils.toHexDigit_(c & 0xF);
732 jspb.utils.hexStringToHash64 = function(hex) {
740 var hi = jspb.utils.fromHexCharCode_(hex.charCodeAt(i * 2 + 2));
741 var lo = jspb.utils.fromHexCharCode_(hex.charCodeAt(i * 2 + 3));
758 jspb.utils.hash64ToNumber = function(hash, signed) {
759 jspb.utils.splitHash64(hash);
760 var bitsLow = jspb.utils.split64Low;
761 var bitsHigh = jspb.utils.split64High;
762 return signed ? jspb.utils.joinInt64(bitsLow, bitsHigh) :
763 jspb.utils.joinUint64(bitsLow, bitsHigh);
773 jspb.utils.numberToHash64 = function(value) {
774 jspb.utils.splitInt64(value);
775 return jspb.utils.joinHash64(jspb.utils.split64Low,
776 jspb.utils.split64High);
787 jspb.utils.countVarints = function(buffer, start, end) {
810 jspb.utils.countVarintFields = function(buffer, start, end, field) {
866 jspb.utils.countFixedFields_ =
913 jspb.utils.countFixed32Fields = function(buffer, start, end, field) {
915 return jspb.utils.countFixedFields_(buffer, start, end, tag, 4);
928 jspb.utils.countFixed64Fields = function(buffer, start, end, field) {
930 return jspb.utils.countFixedFields_(buffer, start, end, tag, 8);
943 jspb.utils.countDelimitedFields = function(buffer, start, end, field) {
984 jspb.utils.debugBytesToTextFormat = function(byteSource) {
987 var bytes = jspb.utils.byteSourceToUint8Array(byteSource);
1003 jspb.utils.debugScalarToTextFormat = function(scalar) {
1019 jspb.utils.stringToByteArray = function(str) {
1039 jspb.utils.byteSourceToUint8Array = function(data) {