From dc8bf15a86466e68209bd5e2e2a6c5fdf5bef982 Mon Sep 17 00:00:00 2001 From: Jordan Eldredge Date: Tue, 2 Jul 2019 20:18:36 -0700 Subject: [PATCH] Get rid of advanceDEPRECATED --- experiments/maki-interpreter/parser.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/experiments/maki-interpreter/parser.js b/experiments/maki-interpreter/parser.js index 88253787..7161132f 100644 --- a/experiments/maki-interpreter/parser.js +++ b/experiments/maki-interpreter/parser.js @@ -20,10 +20,6 @@ class MakiFile { this._i = 0; } - advanceDEPRECATED(n) { - this._i += n; - } - readUInt32LE() { const int = this._buffer.readUInt32LE(this._i); this._i += 4; @@ -53,7 +49,9 @@ class MakiFile { } getNextNBytesDEPRECATED(length) { - return this._buffer.slice(this._i, this._i + length); + const bytes = this._buffer.slice(this._i, this._i + length); + this._i += lengthn; + return bytes; } } @@ -203,7 +201,6 @@ function readBindings(makiFile) { function decodeCode({ makiFile, classes, variables, methods, bindings }) { const length = makiFile.readUInt32LE(); const commandsBuffer = makiFile.getNextNBytesDEPRECATED(length); - makiFile.advanceDEPRECATED(length); let pos = 0; const localFunctions = {};