|
|
@ -28,7 +28,10 @@ Opcode.prototype.toNumber = function() { |
|
|
|
}; |
|
|
|
|
|
|
|
Opcode.prototype.fromString = function(str) { |
|
|
|
this.num = Opcode.map[str]; |
|
|
|
var num = Opcode.map[str]; |
|
|
|
if (typeof num === 'undefined') |
|
|
|
throw new Error('Invalid opcodestr'); |
|
|
|
this.num = num; |
|
|
|
return this; |
|
|
|
}; |
|
|
|
|
|
|
|