diff --git a/declare.js b/declare.js index 0ecdc66a..9acd848e 100644 --- a/declare.js +++ b/declare.js @@ -50,10 +50,12 @@ exports.serialize = function (field) { } break case 'lengthEncoded': { - variables.i = true if (field.encoding) { field.encoding.map(declare) } + if (field.fields[0].type != 'buffer') { + variables.i = true + } if (field.fields[0].type == 'buffer' && ! field.fields[0].concat) { variables.I = true } diff --git a/test/generated/array/chunked.serializer.all.js b/test/generated/array/chunked.serializer.all.js index 9f21b98c..c60132c1 100644 --- a/test/generated/array/chunked.serializer.all.js +++ b/test/generated/array/chunked.serializer.all.js @@ -2,7 +2,7 @@ module.exports = function ({ $lookup }) { return { object: function () { return function (object, $buffer, $start) { - let $i = [], $I = [] + let $I = [] $buffer[$start++] = object.nudge & 0xff diff --git a/test/generated/array/chunked.serializer.bff.js b/test/generated/array/chunked.serializer.bff.js index 5e39c01e..0b135050 100644 --- a/test/generated/array/chunked.serializer.bff.js +++ b/test/generated/array/chunked.serializer.bff.js @@ -3,10 +3,10 @@ module.exports = function ({ $incremental, $lookup }) { object: function () { return function (object) { return function ($buffer, $start, $end) { - let $i = [], $I = [] + let $I = [] if ($end - $start < 3 + object.array.reduce((sum, buffer) => sum + buffer.length, 0)) { - return $incremental.object(object, 0, $i, $I)($buffer, $start, $end) + return $incremental.object(object, 0, $I)($buffer, $start, $end) } $buffer[$start++] = object.nudge & 0xff diff --git a/test/generated/array/chunked.serializer.chk.js b/test/generated/array/chunked.serializer.chk.js index 485e343c..ae1a632c 100644 --- a/test/generated/array/chunked.serializer.chk.js +++ b/test/generated/array/chunked.serializer.chk.js @@ -3,23 +3,23 @@ module.exports = function ({ $incremental, $lookup }) { object: function () { return function (object) { return function ($buffer, $start, $end) { - let $i = [], $I = [] + let $I = [] if ($end - $start < 1) { - return $incremental.object(object, 0, $i, $I)($buffer, $start, $end) + return $incremental.object(object, 0, $I)($buffer, $start, $end) } $buffer[$start++] = object.nudge & 0xff if ($end - $start < 1) { - return $incremental.object(object, 2, $i, $I)($buffer, $start, $end) + return $incremental.object(object, 2, $I)($buffer, $start, $end) } $I[0] = object.array.reduce((sum, buffer) => sum + buffer.length, 0) $buffer[$start++] = $I[0] & 0xff if ($end - $start < 0 + object.array.reduce((sum, buffer) => sum + buffer.length, 0)) { - return $incremental.object(object, 5, $i, $I)($buffer, $start, $end) + return $incremental.object(object, 5, $I)($buffer, $start, $end) } { @@ -30,7 +30,7 @@ module.exports = function ({ $incremental, $lookup }) { } if ($end - $start < 1) { - return $incremental.object(object, 6, $i, $I)($buffer, $start, $end) + return $incremental.object(object, 6, $I)($buffer, $start, $end) } $buffer[$start++] = object.sentry & 0xff diff --git a/test/generated/array/chunked.serializer.inc.js b/test/generated/array/chunked.serializer.inc.js index 82792d72..1a9fbd79 100644 --- a/test/generated/array/chunked.serializer.inc.js +++ b/test/generated/array/chunked.serializer.inc.js @@ -1,7 +1,7 @@ module.exports = function ({ $lookup }) { return { object: function () { - return function (object, $step = 0, $i = [], $I = []) { + return function (object, $step = 0, $I = []) { let $_, $bite, $copied = 0, $offset = 0, $index = 0 return function $serialize ($buffer, $start, $end) { diff --git a/test/generated/array/concat.serializer.all.js b/test/generated/array/concat.serializer.all.js index aebea803..f7744a2b 100644 --- a/test/generated/array/concat.serializer.all.js +++ b/test/generated/array/concat.serializer.all.js @@ -2,8 +2,6 @@ module.exports = function ({ $lookup }) { return { object: function () { return function (object, $buffer, $start) { - let $i = [] - $buffer[$start++] = object.nudge & 0xff $buffer[$start++] = object.array.length & 0xff diff --git a/test/generated/array/concat.serializer.bff.js b/test/generated/array/concat.serializer.bff.js index 47933fd7..6dba17a8 100644 --- a/test/generated/array/concat.serializer.bff.js +++ b/test/generated/array/concat.serializer.bff.js @@ -3,10 +3,8 @@ module.exports = function ({ $incremental, $lookup }) { object: function () { return function (object) { return function ($buffer, $start, $end) { - let $i = [] - if ($end - $start < 3 + object.array.length * 1) { - return $incremental.object(object, 0, $i)($buffer, $start, $end) + return $incremental.object(object, 0)($buffer, $start, $end) } $buffer[$start++] = object.nudge & 0xff diff --git a/test/generated/array/concat.serializer.chk.js b/test/generated/array/concat.serializer.chk.js index a9d091da..ea24e80d 100644 --- a/test/generated/array/concat.serializer.chk.js +++ b/test/generated/array/concat.serializer.chk.js @@ -3,29 +3,27 @@ module.exports = function ({ $incremental, $lookup }) { object: function () { return function (object) { return function ($buffer, $start, $end) { - let $i = [] - if ($end - $start < 1) { - return $incremental.object(object, 0, $i)($buffer, $start, $end) + return $incremental.object(object, 0)($buffer, $start, $end) } $buffer[$start++] = object.nudge & 0xff if ($end - $start < 1) { - return $incremental.object(object, 2, $i)($buffer, $start, $end) + return $incremental.object(object, 2)($buffer, $start, $end) } $buffer[$start++] = object.array.length & 0xff if ($end - $start < 0 + object.array.length) { - return $incremental.object(object, 4, $i)($buffer, $start, $end) + return $incremental.object(object, 4)($buffer, $start, $end) } object.array.copy($buffer, $start, 0, object.array.length) $start += object.array.length if ($end - $start < 1) { - return $incremental.object(object, 5, $i)($buffer, $start, $end) + return $incremental.object(object, 5)($buffer, $start, $end) } $buffer[$start++] = object.sentry & 0xff diff --git a/test/generated/array/concat.serializer.inc.js b/test/generated/array/concat.serializer.inc.js index 8414fdd3..8a475d28 100644 --- a/test/generated/array/concat.serializer.inc.js +++ b/test/generated/array/concat.serializer.inc.js @@ -1,7 +1,7 @@ module.exports = function ({ $lookup }) { return { object: function () { - return function (object, $step = 0, $i = []) { + return function (object, $step = 0) { let $_, $bite, $copied = 0 return function $serialize ($buffer, $start, $end) { diff --git a/test/generated/array/conditional/chunked.serializer.all.js b/test/generated/array/conditional/chunked.serializer.all.js index bcc70963..f5db7b0f 100644 --- a/test/generated/array/conditional/chunked.serializer.all.js +++ b/test/generated/array/conditional/chunked.serializer.all.js @@ -2,7 +2,7 @@ module.exports = function ({ $lookup }) { return { object: function () { return function (object, $buffer, $start) { - let $i = [], $I = [] + let $I = [] $buffer[$start++] = object.nudge & 0xff diff --git a/test/generated/array/conditional/chunked.serializer.bff.js b/test/generated/array/conditional/chunked.serializer.bff.js index d8353f21..d1d4862a 100644 --- a/test/generated/array/conditional/chunked.serializer.bff.js +++ b/test/generated/array/conditional/chunked.serializer.bff.js @@ -3,10 +3,10 @@ module.exports = function ({ $incremental, $lookup }) { object: function () { return function (object) { return function ($buffer, $start, $end) { - let $i = [], $I = [] + let $I = [] if ($end - $start < 1) { - return $incremental.object(object, 0, $i, $I)($buffer, $start, $end) + return $incremental.object(object, 0, $I)($buffer, $start, $end) } $buffer[$start++] = object.nudge & 0xff @@ -14,13 +14,13 @@ module.exports = function ({ $incremental, $lookup }) { $I[0] = object.array.reduce((sum, buffer) => sum + buffer.length, 0) if ((value => value < 128)($I[0])) { if ($end - $start < 1) { - return $incremental.object(object, 4, $i, $I)($buffer, $start, $end) + return $incremental.object(object, 4, $I)($buffer, $start, $end) } $buffer[$start++] = $I[0] & 0xff } else { if ($end - $start < 2) { - return $incremental.object(object, 6, $i, $I)($buffer, $start, $end) + return $incremental.object(object, 6, $I)($buffer, $start, $end) } $buffer[$start++] = $I[0] >>> 7 & 0x7f | 0x80 @@ -28,7 +28,7 @@ module.exports = function ({ $incremental, $lookup }) { } if ($end - $start < 1 + object.array.reduce((sum, buffer) => sum + buffer.length, 0)) { - return $incremental.object(object, 9, $i, $I)($buffer, $start, $end) + return $incremental.object(object, 9, $I)($buffer, $start, $end) } { diff --git a/test/generated/array/conditional/chunked.serializer.chk.js b/test/generated/array/conditional/chunked.serializer.chk.js index 212142e2..89e63d56 100644 --- a/test/generated/array/conditional/chunked.serializer.chk.js +++ b/test/generated/array/conditional/chunked.serializer.chk.js @@ -3,10 +3,10 @@ module.exports = function ({ $incremental, $lookup }) { object: function () { return function (object) { return function ($buffer, $start, $end) { - let $i = [], $I = [] + let $I = [] if ($end - $start < 1) { - return $incremental.object(object, 0, $i, $I)($buffer, $start, $end) + return $incremental.object(object, 0, $I)($buffer, $start, $end) } $buffer[$start++] = object.nudge & 0xff @@ -14,13 +14,13 @@ module.exports = function ({ $incremental, $lookup }) { $I[0] = object.array.reduce((sum, buffer) => sum + buffer.length, 0) if ((value => value < 128)($I[0])) { if ($end - $start < 1) { - return $incremental.object(object, 4, $i, $I)($buffer, $start, $end) + return $incremental.object(object, 4, $I)($buffer, $start, $end) } $buffer[$start++] = $I[0] & 0xff } else { if ($end - $start < 2) { - return $incremental.object(object, 6, $i, $I)($buffer, $start, $end) + return $incremental.object(object, 6, $I)($buffer, $start, $end) } $buffer[$start++] = $I[0] >>> 7 & 0x7f | 0x80 @@ -28,7 +28,7 @@ module.exports = function ({ $incremental, $lookup }) { } if ($end - $start < 0 + object.array.reduce((sum, buffer) => sum + buffer.length, 0)) { - return $incremental.object(object, 9, $i, $I)($buffer, $start, $end) + return $incremental.object(object, 9, $I)($buffer, $start, $end) } { @@ -39,7 +39,7 @@ module.exports = function ({ $incremental, $lookup }) { } if ($end - $start < 1) { - return $incremental.object(object, 10, $i, $I)($buffer, $start, $end) + return $incremental.object(object, 10, $I)($buffer, $start, $end) } $buffer[$start++] = object.sentry & 0xff diff --git a/test/generated/array/conditional/chunked.serializer.inc.js b/test/generated/array/conditional/chunked.serializer.inc.js index 959bf215..62f44d6b 100644 --- a/test/generated/array/conditional/chunked.serializer.inc.js +++ b/test/generated/array/conditional/chunked.serializer.inc.js @@ -1,7 +1,7 @@ module.exports = function ({ $lookup }) { return { object: function () { - return function (object, $step = 0, $i = [], $I = []) { + return function (object, $step = 0, $I = []) { let $_, $bite, $copied = 0, $offset = 0, $index = 0 return function $serialize ($buffer, $start, $end) { diff --git a/test/generated/array/conditional/concat.serializer.all.js b/test/generated/array/conditional/concat.serializer.all.js index 46a9b157..4a244bfa 100644 --- a/test/generated/array/conditional/concat.serializer.all.js +++ b/test/generated/array/conditional/concat.serializer.all.js @@ -2,8 +2,6 @@ module.exports = function ({ $lookup }) { return { object: function () { return function (object, $buffer, $start) { - let $i = [] - $buffer[$start++] = object.nudge & 0xff if ((value => value < 128)(object.array.length)) { diff --git a/test/generated/array/conditional/concat.serializer.bff.js b/test/generated/array/conditional/concat.serializer.bff.js index d085f4bb..3c673752 100644 --- a/test/generated/array/conditional/concat.serializer.bff.js +++ b/test/generated/array/conditional/concat.serializer.bff.js @@ -3,23 +3,21 @@ module.exports = function ({ $incremental, $lookup }) { object: function () { return function (object) { return function ($buffer, $start, $end) { - let $i = [] - if ($end - $start < 1) { - return $incremental.object(object, 0, $i)($buffer, $start, $end) + return $incremental.object(object, 0)($buffer, $start, $end) } $buffer[$start++] = object.nudge & 0xff if ((value => value < 128)(object.array.length)) { if ($end - $start < 1) { - return $incremental.object(object, 3, $i)($buffer, $start, $end) + return $incremental.object(object, 3)($buffer, $start, $end) } $buffer[$start++] = object.array.length & 0xff } else { if ($end - $start < 2) { - return $incremental.object(object, 5, $i)($buffer, $start, $end) + return $incremental.object(object, 5)($buffer, $start, $end) } $buffer[$start++] = object.array.length >>> 7 & 0x7f | 0x80 @@ -27,7 +25,7 @@ module.exports = function ({ $incremental, $lookup }) { } if ($end - $start < 1 + object.array.length * 1) { - return $incremental.object(object, 8, $i)($buffer, $start, $end) + return $incremental.object(object, 8)($buffer, $start, $end) } object.array.copy($buffer, $start, 0, object.array.length) diff --git a/test/generated/array/conditional/concat.serializer.chk.js b/test/generated/array/conditional/concat.serializer.chk.js index 1bd5616b..0c92048f 100644 --- a/test/generated/array/conditional/concat.serializer.chk.js +++ b/test/generated/array/conditional/concat.serializer.chk.js @@ -3,23 +3,21 @@ module.exports = function ({ $incremental, $lookup }) { object: function () { return function (object) { return function ($buffer, $start, $end) { - let $i = [] - if ($end - $start < 1) { - return $incremental.object(object, 0, $i)($buffer, $start, $end) + return $incremental.object(object, 0)($buffer, $start, $end) } $buffer[$start++] = object.nudge & 0xff if ((value => value < 128)(object.array.length)) { if ($end - $start < 1) { - return $incremental.object(object, 3, $i)($buffer, $start, $end) + return $incremental.object(object, 3)($buffer, $start, $end) } $buffer[$start++] = object.array.length & 0xff } else { if ($end - $start < 2) { - return $incremental.object(object, 5, $i)($buffer, $start, $end) + return $incremental.object(object, 5)($buffer, $start, $end) } $buffer[$start++] = object.array.length >>> 7 & 0x7f | 0x80 @@ -27,14 +25,14 @@ module.exports = function ({ $incremental, $lookup }) { } if ($end - $start < 0 + object.array.length) { - return $incremental.object(object, 8, $i)($buffer, $start, $end) + return $incremental.object(object, 8)($buffer, $start, $end) } object.array.copy($buffer, $start, 0, object.array.length) $start += object.array.length if ($end - $start < 1) { - return $incremental.object(object, 9, $i)($buffer, $start, $end) + return $incremental.object(object, 9)($buffer, $start, $end) } $buffer[$start++] = object.sentry & 0xff diff --git a/test/generated/array/conditional/concat.serializer.inc.js b/test/generated/array/conditional/concat.serializer.inc.js index e208b411..b93f3440 100644 --- a/test/generated/array/conditional/concat.serializer.inc.js +++ b/test/generated/array/conditional/concat.serializer.inc.js @@ -1,7 +1,7 @@ module.exports = function ({ $lookup }) { return { object: function () { - return function (object, $step = 0, $i = []) { + return function (object, $step = 0) { let $_, $bite, $copied = 0 return function $serialize ($buffer, $start, $end) { diff --git a/test/generated/array/switch/chunked.serializer.all.js b/test/generated/array/switch/chunked.serializer.all.js index 8aa9a93a..d2dddb4a 100644 --- a/test/generated/array/switch/chunked.serializer.all.js +++ b/test/generated/array/switch/chunked.serializer.all.js @@ -2,7 +2,7 @@ module.exports = function ({ $lookup }) { return { object: function () { return function (object, $buffer, $start) { - let $i = [], $I = [] + let $I = [] $buffer[$start++] = object.type & 0xff diff --git a/test/generated/array/switch/chunked.serializer.bff.js b/test/generated/array/switch/chunked.serializer.bff.js index fef99469..55e8a0dc 100644 --- a/test/generated/array/switch/chunked.serializer.bff.js +++ b/test/generated/array/switch/chunked.serializer.bff.js @@ -3,10 +3,10 @@ module.exports = function ({ $incremental, $lookup }) { object: function () { return function (object) { return function ($buffer, $start, $end) { - let $i = [], $I = [] + let $I = [] if ($end - $start < 1) { - return $incremental.object(object, 0, $i, $I)($buffer, $start, $end) + return $incremental.object(object, 0, $I)($buffer, $start, $end) } $buffer[$start++] = object.type & 0xff @@ -16,7 +16,7 @@ module.exports = function ({ $incremental, $lookup }) { case 0: if ($end - $start < 1) { - return $incremental.object(object, 4, $i, $I)($buffer, $start, $end) + return $incremental.object(object, 4, $I)($buffer, $start, $end) } $buffer[$start++] = $I[0] & 0xff @@ -26,7 +26,7 @@ module.exports = function ({ $incremental, $lookup }) { default: if ($end - $start < 2) { - return $incremental.object(object, 6, $i, $I)($buffer, $start, $end) + return $incremental.object(object, 6, $I)($buffer, $start, $end) } $buffer[$start++] = $I[0] >>> 8 & 0xff @@ -36,7 +36,7 @@ module.exports = function ({ $incremental, $lookup }) { } if ($end - $start < 1 + object.array.reduce((sum, buffer) => sum + buffer.length, 0)) { - return $incremental.object(object, 8, $i, $I)($buffer, $start, $end) + return $incremental.object(object, 8, $I)($buffer, $start, $end) } { diff --git a/test/generated/array/switch/chunked.serializer.chk.js b/test/generated/array/switch/chunked.serializer.chk.js index 62c9a65b..d2838677 100644 --- a/test/generated/array/switch/chunked.serializer.chk.js +++ b/test/generated/array/switch/chunked.serializer.chk.js @@ -3,10 +3,10 @@ module.exports = function ({ $incremental, $lookup }) { object: function () { return function (object) { return function ($buffer, $start, $end) { - let $i = [], $I = [] + let $I = [] if ($end - $start < 1) { - return $incremental.object(object, 0, $i, $I)($buffer, $start, $end) + return $incremental.object(object, 0, $I)($buffer, $start, $end) } $buffer[$start++] = object.type & 0xff @@ -16,7 +16,7 @@ module.exports = function ({ $incremental, $lookup }) { case 0: if ($end - $start < 1) { - return $incremental.object(object, 4, $i, $I)($buffer, $start, $end) + return $incremental.object(object, 4, $I)($buffer, $start, $end) } $buffer[$start++] = $I[0] & 0xff @@ -26,7 +26,7 @@ module.exports = function ({ $incremental, $lookup }) { default: if ($end - $start < 2) { - return $incremental.object(object, 6, $i, $I)($buffer, $start, $end) + return $incremental.object(object, 6, $I)($buffer, $start, $end) } $buffer[$start++] = $I[0] >>> 8 & 0xff @@ -36,7 +36,7 @@ module.exports = function ({ $incremental, $lookup }) { } if ($end - $start < 0 + object.array.reduce((sum, buffer) => sum + buffer.length, 0)) { - return $incremental.object(object, 8, $i, $I)($buffer, $start, $end) + return $incremental.object(object, 8, $I)($buffer, $start, $end) } { @@ -47,7 +47,7 @@ module.exports = function ({ $incremental, $lookup }) { } if ($end - $start < 1) { - return $incremental.object(object, 9, $i, $I)($buffer, $start, $end) + return $incremental.object(object, 9, $I)($buffer, $start, $end) } $buffer[$start++] = object.sentry & 0xff diff --git a/test/generated/array/switch/chunked.serializer.inc.js b/test/generated/array/switch/chunked.serializer.inc.js index 6f0dd235..e47bdc39 100644 --- a/test/generated/array/switch/chunked.serializer.inc.js +++ b/test/generated/array/switch/chunked.serializer.inc.js @@ -1,7 +1,7 @@ module.exports = function ({ $lookup }) { return { object: function () { - return function (object, $step = 0, $i = [], $I = []) { + return function (object, $step = 0, $I = []) { let $_, $bite, $copied = 0, $offset = 0, $index = 0 return function $serialize ($buffer, $start, $end) { diff --git a/test/generated/array/switch/concat.serializer.all.js b/test/generated/array/switch/concat.serializer.all.js index c1a585d2..addd578e 100644 --- a/test/generated/array/switch/concat.serializer.all.js +++ b/test/generated/array/switch/concat.serializer.all.js @@ -2,8 +2,6 @@ module.exports = function ({ $lookup }) { return { object: function () { return function (object, $buffer, $start) { - let $i = [] - $buffer[$start++] = object.type & 0xff switch (($ => $.type)(object)) { diff --git a/test/generated/array/switch/concat.serializer.bff.js b/test/generated/array/switch/concat.serializer.bff.js index 5ca35c3e..8b7e8eab 100644 --- a/test/generated/array/switch/concat.serializer.bff.js +++ b/test/generated/array/switch/concat.serializer.bff.js @@ -3,10 +3,8 @@ module.exports = function ({ $incremental, $lookup }) { object: function () { return function (object) { return function ($buffer, $start, $end) { - let $i = [] - if ($end - $start < 1) { - return $incremental.object(object, 0, $i)($buffer, $start, $end) + return $incremental.object(object, 0)($buffer, $start, $end) } $buffer[$start++] = object.type & 0xff @@ -15,7 +13,7 @@ module.exports = function ({ $incremental, $lookup }) { case 0: if ($end - $start < 1) { - return $incremental.object(object, 3, $i)($buffer, $start, $end) + return $incremental.object(object, 3)($buffer, $start, $end) } $buffer[$start++] = object.array.length & 0xff @@ -25,7 +23,7 @@ module.exports = function ({ $incremental, $lookup }) { default: if ($end - $start < 2) { - return $incremental.object(object, 5, $i)($buffer, $start, $end) + return $incremental.object(object, 5)($buffer, $start, $end) } $buffer[$start++] = object.array.length >>> 8 & 0xff @@ -35,7 +33,7 @@ module.exports = function ({ $incremental, $lookup }) { } if ($end - $start < 1 + object.array.length * 1) { - return $incremental.object(object, 7, $i)($buffer, $start, $end) + return $incremental.object(object, 7)($buffer, $start, $end) } object.array.copy($buffer, $start, 0, object.array.length) diff --git a/test/generated/array/switch/concat.serializer.chk.js b/test/generated/array/switch/concat.serializer.chk.js index e2b6d81d..1124f799 100644 --- a/test/generated/array/switch/concat.serializer.chk.js +++ b/test/generated/array/switch/concat.serializer.chk.js @@ -3,10 +3,8 @@ module.exports = function ({ $incremental, $lookup }) { object: function () { return function (object) { return function ($buffer, $start, $end) { - let $i = [] - if ($end - $start < 1) { - return $incremental.object(object, 0, $i)($buffer, $start, $end) + return $incremental.object(object, 0)($buffer, $start, $end) } $buffer[$start++] = object.type & 0xff @@ -15,7 +13,7 @@ module.exports = function ({ $incremental, $lookup }) { case 0: if ($end - $start < 1) { - return $incremental.object(object, 3, $i)($buffer, $start, $end) + return $incremental.object(object, 3)($buffer, $start, $end) } $buffer[$start++] = object.array.length & 0xff @@ -25,7 +23,7 @@ module.exports = function ({ $incremental, $lookup }) { default: if ($end - $start < 2) { - return $incremental.object(object, 5, $i)($buffer, $start, $end) + return $incremental.object(object, 5)($buffer, $start, $end) } $buffer[$start++] = object.array.length >>> 8 & 0xff @@ -35,14 +33,14 @@ module.exports = function ({ $incremental, $lookup }) { } if ($end - $start < 0 + object.array.length) { - return $incremental.object(object, 7, $i)($buffer, $start, $end) + return $incremental.object(object, 7)($buffer, $start, $end) } object.array.copy($buffer, $start, 0, object.array.length) $start += object.array.length if ($end - $start < 1) { - return $incremental.object(object, 8, $i)($buffer, $start, $end) + return $incremental.object(object, 8)($buffer, $start, $end) } $buffer[$start++] = object.sentry & 0xff diff --git a/test/generated/array/switch/concat.serializer.inc.js b/test/generated/array/switch/concat.serializer.inc.js index 3c90d674..20b5f260 100644 --- a/test/generated/array/switch/concat.serializer.inc.js +++ b/test/generated/array/switch/concat.serializer.inc.js @@ -1,7 +1,7 @@ module.exports = function ({ $lookup }) { return { object: function () { - return function (object, $step = 0, $i = []) { + return function (object, $step = 0) { let $_, $bite, $copied = 0 return function $serialize ($buffer, $start, $end) { diff --git a/test/generated/locket/key.serializer.all.js b/test/generated/locket/key.serializer.all.js index dbf53e32..e3077697 100644 --- a/test/generated/locket/key.serializer.all.js +++ b/test/generated/locket/key.serializer.all.js @@ -2,7 +2,7 @@ module.exports = function ({ $lookup }) { return { object: function () { return function (object, $buffer, $start) { - let $_, $i = [] + let $_ $_ = ($lookup[0].indexOf(object.header.method) << 31 & 0x80000000) >>> 0 |