Remove the |NIP_CURR_POS| bytecode instruction

After the previous commit is is not used anywhere.
redux
David Majda 11 years ago
parent e15c57066c
commit 187f9d6bb0

@ -7,7 +7,6 @@ module.exports = {
POP_CURR_POS: 3, // POP_CURR_POS
POP_N: 4, // POP_N n
NIP: 5, // NIP
NIP_CURR_POS: 6, // NIP_CURR_POS
APPEND: 7, // APPEND
WRAP: 8, // WRAP n
TEXT: 9, // TEXT

@ -35,12 +35,6 @@ var utils = require("../../utils"),
* stack.pop();
* stack.push(value);
*
* [6] NIP_CURR_POS
*
* value = stack.pop();
* currPos = stack.pop();
* stack.push(value);
*
* [7] APPEND
*
* value = stack.pop();

@ -197,11 +197,6 @@ module.exports = function(ast, options) {
' ip++;',
' break;',
'',
' case ' + op.NIP_CURR_POS + ':', // NIP_CURR_POS
' peg$currPos = stack.splice(-2, 1)[0];',
' ip++;',
' break;',
'',
' case ' + op.APPEND + ':', // APPEND
' stack[stack.length - 2].push(stack.pop());',
' ip++;',
@ -482,13 +477,6 @@ module.exports = function(ast, options) {
ip++;
break;
case op.NIP_CURR_POS: // NIP_CURR_POS
value = stack.pop();
parts.push('peg$currPos = ' + stack.pop() + ';');
parts.push(stack.push(value));
ip++;
break;
case op.APPEND: // APPEND
value = stack.pop();
parts.push(stack.top() + '.push(' + value + ');');

Loading…
Cancel
Save