From 33f23ee4be3ea86535a93bed64480beabe758908 Mon Sep 17 00:00:00 2001 From: David Majda Date: Wed, 14 Sep 2016 09:37:02 +0200 Subject: [PATCH] Don't use "arrays" in lib/compiler/passes/generate-bytecode.js The "arrays" module will be removed. See #442. --- lib/compiler/passes/generate-bytecode.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/compiler/passes/generate-bytecode.js b/lib/compiler/passes/generate-bytecode.js index 4870aa5..c8d596e 100644 --- a/lib/compiler/passes/generate-bytecode.js +++ b/lib/compiler/passes/generate-bytecode.js @@ -1,7 +1,6 @@ "use strict"; -let arrays = require("../../utils/arrays"), - objects = require("../../utils/objects"), +let objects = require("../../utils/objects"), asts = require("../asts"), visitor = require("../visitor"), op = require("../opcodes"), @@ -194,7 +193,7 @@ function generateBytecode(ast) { let consts = []; function addConst(value) { - let index = arrays.indexOf(consts, value); + let index = consts.indexOf(value); return index === -1 ? consts.push(value) - 1 : index; }