Project import generated by Copybara

PiperOrigin-RevId: 294283216
pull/7213/head
rafikamal 5 years ago committed by Rafi Kamal
parent becf5afd34
commit 83b47e4c65
  1. 86
      js/experimental/runtime/kernel/lazy_accessor.js

@ -808,8 +808,10 @@ class LazyAccessor {
* @return {!Iterable<boolean>} * @return {!Iterable<boolean>}
*/ */
getRepeatedBoolIterable(fieldNumber) { getRepeatedBoolIterable(fieldNumber) {
const array = this.getRepeatedBoolArray_(fieldNumber); // Don't split this statement unless needed. JS compiler thinks
return new ArrayIterable(array); // getRepeatedBoolArray_ might have side effects and doesn't inline the
// call in the compiled code. See cl/293894484 for details.
return new ArrayIterable(this.getRepeatedBoolArray_(fieldNumber));
} }
/** /**
@ -857,8 +859,10 @@ class LazyAccessor {
* @return {!Iterable<number>} * @return {!Iterable<number>}
*/ */
getRepeatedDoubleIterable(fieldNumber) { getRepeatedDoubleIterable(fieldNumber) {
const array = this.getRepeatedDoubleArray_(fieldNumber); // Don't split this statement unless needed. JS compiler thinks
return new ArrayIterable(array); // getRepeatedDoubleArray_ might have side effects and doesn't inline the
// call in the compiled code. See cl/293894484 for details.
return new ArrayIterable(this.getRepeatedDoubleArray_(fieldNumber));
} }
/** /**
@ -906,8 +910,10 @@ class LazyAccessor {
* @return {!Iterable<number>} * @return {!Iterable<number>}
*/ */
getRepeatedFixed32Iterable(fieldNumber) { getRepeatedFixed32Iterable(fieldNumber) {
const array = this.getRepeatedFixed32Array_(fieldNumber); // Don't split this statement unless needed. JS compiler thinks
return new ArrayIterable(array); // getRepeatedFixed32Array_ might have side effects and doesn't inline the
// call in the compiled code. See cl/293894484 for details.
return new ArrayIterable(this.getRepeatedFixed32Array_(fieldNumber));
} }
/** /**
@ -986,8 +992,10 @@ class LazyAccessor {
* @return {!Iterable<number>} * @return {!Iterable<number>}
*/ */
getRepeatedFloatIterable(fieldNumber) { getRepeatedFloatIterable(fieldNumber) {
const array = this.getRepeatedFloatArray_(fieldNumber); // Don't split this statement unless needed. JS compiler thinks
return new ArrayIterable(array); // getRepeatedFloatArray_ might have side effects and doesn't inline the
// call in the compiled code. See cl/293894484 for details.
return new ArrayIterable(this.getRepeatedFloatArray_(fieldNumber));
} }
/** /**
@ -1035,8 +1043,10 @@ class LazyAccessor {
* @return {!Iterable<number>} * @return {!Iterable<number>}
*/ */
getRepeatedInt32Iterable(fieldNumber) { getRepeatedInt32Iterable(fieldNumber) {
const array = this.getRepeatedInt32Array_(fieldNumber); // Don't split this statement unless needed. JS compiler thinks
return new ArrayIterable(array); // getRepeatedInt32Array_ might have side effects and doesn't inline the
// call in the compiled code. See cl/293894484 for details.
return new ArrayIterable(this.getRepeatedInt32Array_(fieldNumber));
} }
/** /**
@ -1084,8 +1094,10 @@ class LazyAccessor {
* @return {!Iterable<!Int64>} * @return {!Iterable<!Int64>}
*/ */
getRepeatedInt64Iterable(fieldNumber) { getRepeatedInt64Iterable(fieldNumber) {
const array = this.getRepeatedInt64Array_(fieldNumber); // Don't split this statement unless needed. JS compiler thinks
return new ArrayIterable(array); // getRepeatedInt64Array_ might have side effects and doesn't inline the
// call in the compiled code. See cl/293894484 for details.
return new ArrayIterable(this.getRepeatedInt64Array_(fieldNumber));
} }
/** /**
@ -1133,8 +1145,10 @@ class LazyAccessor {
* @return {!Iterable<number>} * @return {!Iterable<number>}
*/ */
getRepeatedSfixed32Iterable(fieldNumber) { getRepeatedSfixed32Iterable(fieldNumber) {
const array = this.getRepeatedSfixed32Array_(fieldNumber); // Don't split this statement unless needed. JS compiler thinks
return new ArrayIterable(array); // getRepeatedSfixed32Array_ might have side effects and doesn't inline the
// call in the compiled code. See cl/293894484 for details.
return new ArrayIterable(this.getRepeatedSfixed32Array_(fieldNumber));
} }
/** /**
@ -1182,8 +1196,10 @@ class LazyAccessor {
* @return {!Iterable<!Int64>} * @return {!Iterable<!Int64>}
*/ */
getRepeatedSfixed64Iterable(fieldNumber) { getRepeatedSfixed64Iterable(fieldNumber) {
const array = this.getRepeatedSfixed64Array_(fieldNumber); // Don't split this statement unless needed. JS compiler thinks
return new ArrayIterable(array); // getRepeatedSfixed64Array_ might have side effects and doesn't inline the
// call in the compiled code. See cl/293894484 for details.
return new ArrayIterable(this.getRepeatedSfixed64Array_(fieldNumber));
} }
/** /**
@ -1231,8 +1247,10 @@ class LazyAccessor {
* @return {!Iterable<number>} * @return {!Iterable<number>}
*/ */
getRepeatedSint32Iterable(fieldNumber) { getRepeatedSint32Iterable(fieldNumber) {
const array = this.getRepeatedSint32Array_(fieldNumber); // Don't split this statement unless needed. JS compiler thinks
return new ArrayIterable(array); // getRepeatedSint32Array_ might have side effects and doesn't inline the
// call in the compiled code. See cl/293894484 for details.
return new ArrayIterable(this.getRepeatedSint32Array_(fieldNumber));
} }
/** /**
@ -1280,8 +1298,10 @@ class LazyAccessor {
* @return {!Iterable<!Int64>} * @return {!Iterable<!Int64>}
*/ */
getRepeatedSint64Iterable(fieldNumber) { getRepeatedSint64Iterable(fieldNumber) {
const array = this.getRepeatedSint64Array_(fieldNumber); // Don't split this statement unless needed. JS compiler thinks
return new ArrayIterable(array); // getRepeatedSint64Array_ might have side effects and doesn't inline the
// call in the compiled code. See cl/293894484 for details.
return new ArrayIterable(this.getRepeatedSint64Array_(fieldNumber));
} }
/** /**
@ -1329,8 +1349,10 @@ class LazyAccessor {
* @return {!Iterable<number>} * @return {!Iterable<number>}
*/ */
getRepeatedUint32Iterable(fieldNumber) { getRepeatedUint32Iterable(fieldNumber) {
const array = this.getRepeatedUint32Array_(fieldNumber); // Don't split this statement unless needed. JS compiler thinks
return new ArrayIterable(array); // getRepeatedUint32Array_ might have side effects and doesn't inline the
// call in the compiled code. See cl/293894484 for details.
return new ArrayIterable(this.getRepeatedUint32Array_(fieldNumber));
} }
/** /**
@ -1408,8 +1430,10 @@ class LazyAccessor {
* @return {!Iterable<!ByteString>} * @return {!Iterable<!ByteString>}
*/ */
getRepeatedBytesIterable(fieldNumber) { getRepeatedBytesIterable(fieldNumber) {
const array = this.getRepeatedBytesArray_(fieldNumber); // Don't split this statement unless needed. JS compiler thinks
return new ArrayIterable(array); // getRepeatedBytesArray_ might have side effects and doesn't inline the
// call in the compiled code. See cl/293894484 for details.
return new ArrayIterable(this.getRepeatedBytesArray_(fieldNumber));
} }
/** /**
@ -1456,8 +1480,10 @@ class LazyAccessor {
* @return {!Iterable<string>} * @return {!Iterable<string>}
*/ */
getRepeatedStringIterable(fieldNumber) { getRepeatedStringIterable(fieldNumber) {
const array = this.getRepeatedStringArray_(fieldNumber); // Don't split this statement unless needed. JS compiler thinks
return new ArrayIterable(array); // getRepeatedStringArray_ might have side effects and doesn't inline the
// call in the compiled code. See cl/293894484 for details.
return new ArrayIterable(this.getRepeatedStringArray_(fieldNumber));
} }
/** /**
@ -1540,9 +1566,11 @@ class LazyAccessor {
* @template T * @template T
*/ */
getRepeatedMessageIterable(fieldNumber, instanceCreator, pivot = undefined) { getRepeatedMessageIterable(fieldNumber, instanceCreator, pivot = undefined) {
const array = // Don't split this statement unless needed. JS compiler thinks
this.getRepeatedMessageArray_(fieldNumber, instanceCreator, pivot); // getRepeatedMessageArray_ might have side effects and doesn't inline the
return new ArrayIterable(array); // call in the compiled code. See cl/293894484 for details.
return new ArrayIterable(
this.getRepeatedMessageArray_(fieldNumber, instanceCreator, pivot));
} }
/** /**

Loading…
Cancel
Save