From 976328b7d63dd170b66a8efa3680997eec6c0608 Mon Sep 17 00:00:00 2001 From: David Majda Date: Mon, 9 Dec 2013 21:57:03 +0100 Subject: [PATCH] Avoid |Array.prototype.splice| call with one parameter The one-parameter |Array.prototype.splice| call is a SpiderMonkey extension. Apparently, IE doesn't implement it (unlike other supported browsers), so we need to replace it with two-parameter version. --- lib/compiler/passes/generate-javascript.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/compiler/passes/generate-javascript.js b/lib/compiler/passes/generate-javascript.js index 405c852..828cb3c 100644 --- a/lib/compiler/passes/generate-javascript.js +++ b/lib/compiler/passes/generate-javascript.js @@ -203,7 +203,7 @@ module.exports = function(ast, options) { ' break;', '', ' case ' + op.WRAP + ':', // WRAP n - ' stack.push(stack.splice(stack.length - bc[ip + 1]));', + ' stack.push(stack.splice(stack.length - bc[ip + 1], bc[ip + 1]));', ' ip += 2;', ' break;', '',