(stack)
| 28 | } |
| 29 | |
| 30 | pop(stack) { |
| 31 | let length = this._getLength(stack), |
| 32 | value; |
| 33 | if (length > 0) { |
| 34 | let idx = (length - 1) * 3 + stack - 1; |
| 35 | value = this._array[idx]; |
| 36 | this._array[idx] = undefined; |
| 37 | --this._lengths[stack - 1]; |
| 38 | } |
| 39 | return value; |
| 40 | } |
| 41 | |
| 42 | peek(stack) { |
| 43 | let length = this._getLength(stack), |
nothing calls this directly
no test coverage detected