|
1 | 1 | (function (global, factory) {
|
2 |
| - typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : |
3 |
| - typeof define === 'function' && define.amd ? define(factory) : |
4 |
| - (global.exprEval = factory()); |
| 2 | + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : |
| 3 | + typeof define === 'function' && define.amd ? define(factory) : |
| 4 | + (global.exprEval = factory()); |
5 | 5 | }(this, (function () { 'use strict';
|
6 | 6 |
|
7 | 7 | /*!
|
@@ -972,31 +972,16 @@ TokenStream.prototype.parseError = function (msg) {
|
972 | 972 | throw new Error('parse error [' + (this.line + 1) + ':' + (this.column + 1) + ']: ' + msg);
|
973 | 973 | };
|
974 | 974 |
|
975 |
| -var unaryInstructionCache = {}; |
976 | 975 | function unaryInstruction(value) {
|
977 |
| - var inst = unaryInstructionCache[value]; |
978 |
| - if (!inst) { |
979 |
| - inst = unaryInstructionCache[value] = new Instruction(IOP1, value); |
980 |
| - } |
981 |
| - return inst; |
| 976 | + return new Instruction(IOP1, value); |
982 | 977 | }
|
983 | 978 |
|
984 |
| -var binaryInstructionCache = {}; |
985 | 979 | function binaryInstruction(value) {
|
986 |
| - var inst = binaryInstructionCache[value]; |
987 |
| - if (!inst) { |
988 |
| - inst = binaryInstructionCache[value] = new Instruction(IOP2, value); |
989 |
| - } |
990 |
| - return inst; |
| 980 | + return new Instruction(IOP2, value); |
991 | 981 | }
|
992 | 982 |
|
993 |
| -var ternaryInstructionCache = {}; |
994 | 983 | function ternaryInstruction(value) {
|
995 |
| - var inst = ternaryInstructionCache[value]; |
996 |
| - if (!inst) { |
997 |
| - inst = ternaryInstructionCache[value] = new Instruction(IOP3, value); |
998 |
| - } |
999 |
| - return inst; |
| 984 | + return new Instruction(IOP3, value); |
1000 | 985 | }
|
1001 | 986 |
|
1002 | 987 | function ParserState(parser, tokenStream) {
|
|
0 commit comments