Lines Matching refs:msg
278 jspb.Message.getIndex_ = function(msg, fieldNumber) { argument
279 return fieldNumber + msg.arrayIndexOffset_;
299 msg, data, messageId, suggestedPivot, repeatedFields, opt_oneofFields) { argument
300 msg.wrappers_ = jspb.Message.MINIMIZE_MEMORY_ALLOCATIONS ? null : {};
304 msg.messageId_ = messageId ? String(messageId) : undefined;
308 msg.arrayIndexOffset_ = messageId === 0 ? -1 : 0;
309 msg.array = data;
310 jspb.Message.materializeExtensionObject_(msg, suggestedPivot);
311 msg.convertedFloatingPointFields_ = {};
316 if (fieldNumber < msg.pivot_) {
317 var index = jspb.Message.getIndex_(msg, fieldNumber);
318 msg.array[index] = msg.array[index] ||
323 msg.extensionObject_[fieldNumber] =
324 msg.extensionObject_[fieldNumber] ||
336 opt_oneofFields, goog.partial(jspb.Message.computeOneofCase, msg));
365 jspb.Message.materializeExtensionObject_ = function(msg, suggestedPivot) { argument
366 if (msg.array.length) {
367 var foundIndex = msg.array.length - 1;
368 var obj = msg.array[foundIndex];
375 msg.pivot_ = foundIndex - msg.arrayIndexOffset_;
376 msg.extensionObject_ = obj;
390 msg.pivot_ = suggestedPivot;
391 var pivotIndex = jspb.Message.getIndex_(msg, suggestedPivot);
393 msg.extensionObject_ = msg.array[pivotIndex] = {};
397 msg.extensionObject_ = null;
400 msg.pivot_ = Number.MAX_VALUE;
410 jspb.Message.maybeInitEmptyExtensionObject_ = function(msg) { argument
411 var pivotIndex = jspb.Message.getIndex_(msg, msg.pivot_);
412 if (!msg.array[pivotIndex]) {
413 msg.extensionObject_ = msg.array[pivotIndex] = {};
534 jspb.Message.readBinaryExtension = function(msg, reader, extensions, argument
557 var currentList = getExtensionFn.call(msg, fieldInfo);
559 setExtensionFn.call(msg, fieldInfo, [value]);
564 setExtensionFn.call(msg, fieldInfo, value);
577 jspb.Message.getField = function(msg, fieldNumber) { argument
578 if (fieldNumber < msg.pivot_) {
579 var index = jspb.Message.getIndex_(msg, fieldNumber);
580 var val = msg.array[index];
582 return msg.array[index] = [];
586 var val = msg.extensionObject_[fieldNumber];
588 return msg.extensionObject_[fieldNumber] = [];
602 jspb.Message.getOptionalFloatingPointField = function(msg, fieldNumber) { argument
603 var value = jspb.Message.getField(msg, fieldNumber);
616 jspb.Message.getRepeatedFloatingPointField = function(msg, fieldNumber) { argument
617 var values = jspb.Message.getField(msg, fieldNumber);
618 if (!msg.convertedFloatingPointFields_) {
619 msg.convertedFloatingPointFields_ = {};
621 if (!msg.convertedFloatingPointFields_[fieldNumber]) {
627 msg.convertedFloatingPointFields_[fieldNumber] = true;
730 jspb.Message.getFieldProto3 = function(msg, fieldNumber, defaultValue) { argument
731 var value = jspb.Message.getField(msg, fieldNumber);
747 jspb.Message.setField = function(msg, fieldNumber, value) { argument
748 if (fieldNumber < msg.pivot_) {
749 msg.array[jspb.Message.getIndex_(msg, fieldNumber)] = value;
751 msg.extensionObject_[fieldNumber] = value;
765 jspb.Message.setOneofField = function(msg, fieldNumber, oneof, value) { argument
766 var currentCase = jspb.Message.computeOneofCase(msg, oneof);
768 if (msg.wrappers_ && currentCase in msg.wrappers_) {
769 msg.wrappers_[currentCase] = undefined;
771 jspb.Message.setField(msg, currentCase, undefined);
773 jspb.Message.setField(msg, fieldNumber, value);
794 jspb.Message.computeOneofCase = function(msg, oneof) { argument
799 var value = jspb.Message.getField(msg, fieldNumber);
803 jspb.Message.setField(msg, fieldNumber, undefined);
811 jspb.Message.setField(msg, oneofField, oneofValue);
828 jspb.Message.getWrapperField = function(msg, ctor, fieldNumber, opt_required) { argument
830 if (!msg.wrappers_) {
831 msg.wrappers_ = {};
833 if (!msg.wrappers_[fieldNumber]) {
834 var data = /** @type {Array} */ (jspb.Message.getField(msg, fieldNumber));
837 msg.wrappers_[fieldNumber] = new ctor(data);
840 return /** @type {jspb.Message} */ (msg.wrappers_[fieldNumber]);
852 jspb.Message.getRepeatedWrapperField = function(msg, ctor, fieldNumber) { argument
853 if (!msg.wrappers_) {
854 msg.wrappers_ = {};
856 if (!msg.wrappers_[fieldNumber]) {
857 var data = jspb.Message.getField(msg, fieldNumber);
861 msg.wrappers_[fieldNumber] = wrappers;
863 var val = msg.wrappers_[fieldNumber];
865 val = msg.wrappers_[fieldNumber] = [];
878 jspb.Message.setWrapperField = function(msg, fieldNumber, value) { argument
879 if (!msg.wrappers_) {
880 msg.wrappers_ = {};
883 msg.wrappers_[fieldNumber] = value;
884 jspb.Message.setField(msg, fieldNumber, data);
896 jspb.Message.setOneofWrapperField = function(msg, fieldNumber, oneof, value) { argument
897 if (!msg.wrappers_) {
898 msg.wrappers_ = {};
901 msg.wrappers_[fieldNumber] = value;
902 jspb.Message.setOneofField(msg, fieldNumber, oneof, data);
913 jspb.Message.setRepeatedWrapperField = function(msg, fieldNumber, value) { argument
914 if (!msg.wrappers_) {
915 msg.wrappers_ = {};
921 msg.wrappers_[fieldNumber] = value;
922 jspb.Message.setField(msg, fieldNumber, data);
1038 /** @type {Array<jspb.Message>} */ (value), function(msg) { argument
1039 return msg.toArray();
1225 jspb.Message.clone = function(msg) { argument
1227 return jspb.Message.cloneMessage(msg);
1236 jspb.Message.cloneMessage = function(msg) { argument
1238 return new msg.constructor(jspb.Message.clone_(msg.toArray()));