diff options
Diffstat (limited to 'Source/JavaScriptCore/offlineasm/ast.rb')
-rw-r--r-- | Source/JavaScriptCore/offlineasm/ast.rb | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Source/JavaScriptCore/offlineasm/ast.rb b/Source/JavaScriptCore/offlineasm/ast.rb index e555b5d98..86ad6bcb2 100644 --- a/Source/JavaScriptCore/offlineasm/ast.rb +++ b/Source/JavaScriptCore/offlineasm/ast.rb @@ -21,6 +21,8 @@ # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF # THE POSSIBILITY OF SUCH DAMAGE. +require "config" + # # Base utility types for the AST. # @@ -784,12 +786,13 @@ class AbsoluteAddress < NoChildren end class Instruction < Node - attr_reader :opcode, :operands + attr_reader :opcode, :operands, :annotation - def initialize(codeOrigin, opcode, operands) + def initialize(codeOrigin, opcode, operands, annotation=nil) super(codeOrigin) @opcode = opcode @operands = operands + @annotation = annotation end def children @@ -797,7 +800,7 @@ class Instruction < Node end def mapChildren(&proc) - Instruction.new(codeOrigin, @opcode, @operands.map(&proc)) + Instruction.new(codeOrigin, @opcode, @operands.map(&proc), @annotation) end def dump |