Changeset 122650 in webkit


Ignore:
Timestamp:
Jul 13, 2012 5:44:47 PM (12 years ago)
Author:
commit-queue@webkit.org
Message:

OfflineASM Pretty printing and commenting enhancements.
https://bugs.webkit.org/show_bug.cgi?id=91281

Patch by Mark Lam <mark.lam@apple.com> on 2012-07-13
Reviewed by Filip Pizlo.

Added some minor pretty printing in the OfflineASM.
Also added infrastruture for adding multiple types of comments and
annotations with the ability to enable/disable them in the generated
output as desired.

  • GNUmakefile.list.am: add new file config.rb.
  • llint/LLIntOfflineAsmConfig.h: Added OFFLINE_ASM_BEGIN, OFFLINE_ASM_END, and OFFLINE_ASM_LOCAL_LABEL macros. This will allow us to redefine these for other backends later.
  • llint/LowLevelInterpreter32_64.asm: Add a small example of instruction annotations for now.
  • llint/LowLevelInterpreter64.asm: Add a small example of instruction annotations for now.
  • offlineasm/armv7.rb: Added handling of annotations.
  • offlineasm/asm.rb: Added machinery to dump the new comments and annotations. Also added some indentations to make the output a little prettier.
  • offlineasm/ast.rb: Added annotation field in class Instruction.
  • offlineasm/backends.rb:
  • offlineasm/config.rb: Added. Currently only contains commenting options. This file is meant to be a centralized place for build config values much like config.h for JavaScriptCore.
  • offlineasm/generate_offset_extractor.rb:
  • offlineasm/instructions.rb:
  • offlineasm/offsets.rb:
  • offlineasm/opt.rb:
  • offlineasm/parser.rb: Parse and record annotations.
  • offlineasm/registers.rb:
  • offlineasm/self_hash.rb:
  • offlineasm/settings.rb:
  • offlineasm/transform.rb:
  • offlineasm/x86.rb: Added handling of annotations.
Location:
trunk/Source/JavaScriptCore
Files:
1 added
19 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r122646 r122650  
     12012-07-13  Mark Lam  <mark.lam@apple.com>
     2
     3        OfflineASM Pretty printing and commenting enhancements.
     4        https://bugs.webkit.org/show_bug.cgi?id=91281
     5
     6        Reviewed by Filip Pizlo.
     7
     8        Added some minor pretty printing in the OfflineASM.
     9        Also added infrastruture for adding multiple types of comments and
     10        annotations with the ability to enable/disable them in the generated
     11        output as desired.
     12
     13        * GNUmakefile.list.am: add new file config.rb.
     14        * llint/LLIntOfflineAsmConfig.h:
     15          Added OFFLINE_ASM_BEGIN, OFFLINE_ASM_END, and OFFLINE_ASM_LOCAL_LABEL macros.
     16          This will allow us to redefine these for other backends later.
     17        * llint/LowLevelInterpreter32_64.asm:
     18          Add a small example of instruction annotations for now.
     19        * llint/LowLevelInterpreter64.asm:
     20          Add a small example of instruction annotations for now.
     21        * offlineasm/armv7.rb: Added handling of annotations.
     22        * offlineasm/asm.rb:
     23          Added machinery to dump the new comments and annotations.
     24          Also added some indentations to make the output a little prettier.
     25        * offlineasm/ast.rb: Added annotation field in class Instruction.
     26        * offlineasm/backends.rb:
     27        * offlineasm/config.rb: Added.
     28          Currently only contains commenting options.  This file is meant to be
     29          a centralized place for build config values much like config.h for
     30          JavaScriptCore.
     31        * offlineasm/generate_offset_extractor.rb:
     32        * offlineasm/instructions.rb:
     33        * offlineasm/offsets.rb:
     34        * offlineasm/opt.rb:
     35        * offlineasm/parser.rb: Parse and record annotations.
     36        * offlineasm/registers.rb:
     37        * offlineasm/self_hash.rb:
     38        * offlineasm/settings.rb:
     39        * offlineasm/transform.rb:
     40        * offlineasm/x86.rb: Added handling of annotations.
     41
    1422012-07-13  Filip Pizlo  <fpizlo@apple.com>
    243
  • trunk/Source/JavaScriptCore/GNUmakefile.list.am

    r122544 r122650  
    685685        Source/JavaScriptCore/offlineasm/ast.rb \
    686686        Source/JavaScriptCore/offlineasm/backends.rb \
     687        Source/JavaScriptCore/offlineasm/config.rb \
    687688        Source/JavaScriptCore/offlineasm/generate_offset_extractor.rb \
    688689        Source/JavaScriptCore/offlineasm/instructions.rb \
  • trunk/Source/JavaScriptCore/llint/LLIntOfflineAsmConfig.h

    r119729 r122650  
    9292#endif
    9393
     94// These are for building an interpreter from generated assembly code:
     95#define OFFLINE_ASM_BEGIN   asm (
     96#define OFFLINE_ASM_END     );
     97
    9498#if CPU(ARM_THUMB2)
    9599#define OFFLINE_ASM_GLOBAL_LABEL(label)          \
     
    106110#endif
    107111
     112#define OFFLINE_ASM_LOCAL_LABEL(label)   LOCAL_LABEL_STRING(label) ":\n"
     113
    108114#endif // LLIntOfflineAsmConfig_h
  • trunk/Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm

    r121925 r122650  
    302302_llint_op_enter:
    303303    traceExecution()
    304     loadp CodeBlock[cfr], t2
    305     loadi CodeBlock::m_numVars[t2], t2
     304    loadp CodeBlock[cfr], t2                // t2<CodeBlock> = cfr.CodeBlock
     305    loadi CodeBlock::m_numVars[t2], t2      // t2<size_t> = t2<CodeBlock>.m_numVars
    306306    btiz t2, .opEnterDone
    307307    move UndefinedTag, t0
  • trunk/Source/JavaScriptCore/llint/LowLevelInterpreter64.asm

    r121925 r122650  
    183183_llint_op_enter:
    184184    traceExecution()
    185     loadp CodeBlock[cfr], t2
    186     loadi CodeBlock::m_numVars[t2], t2
     185    loadp CodeBlock[cfr], t2                // t2<CodeBlock> = cfr.CodeBlock
     186    loadi CodeBlock::m_numVars[t2], t2      // t2<size_t> = t2<CodeBlock>.m_numVars
    187187    btiz t2, .opEnterDone
    188188    move ValueUndefined, t0
  • trunk/Source/JavaScriptCore/offlineasm/armv7.rb

    r114434 r122650  
    2222# THE POSSIBILITY OF SUCH DAMAGE.
    2323
     24require "config"
    2425require "ast"
    2526require "opt"
     
    148149        | node |
    149150        if node.is_a? Instruction
     151            annotation = node.annotation
    150152            case node.opcode
    151153            when /^b(addi|subi|ori|addp)/
     
    162164                end
    163165               
    164                 newList << Instruction.new(node.codeOrigin, op, node.operands[0..-2])
     166                newList << Instruction.new(node.codeOrigin, op, node.operands[0..-2], annotation)
    165167                newList << Instruction.new(node.codeOrigin, branch, [node.operands[-1]])
    166168            when "bmulio"
    167169                tmp1 = Tmp.new(node.codeOrigin, :gpr)
    168170                tmp2 = Tmp.new(node.codeOrigin, :gpr)
    169                 newList << Instruction.new(node.codeOrigin, "smulli", [node.operands[0], node.operands[1], node.operands[1], tmp1])
     171                newList << Instruction.new(node.codeOrigin, "smulli", [node.operands[0], node.operands[1], node.operands[1], tmp1], annotation)
    170172                newList << Instruction.new(node.codeOrigin, "rshifti", [node.operands[-2], Immediate.new(node.codeOrigin, 31), tmp2])
    171173                newList << Instruction.new(node.codeOrigin, "bineq", [tmp1, tmp2, node.operands[-1]])
    172174            when /^bmuli/
    173175                condition = $~.post_match
    174                 newList << Instruction.new(node.codeOrigin, "muli", node.operands[0..-2])
     176                newList << Instruction.new(node.codeOrigin, "muli", node.operands[0..-2], annotation)
    175177                newList << Instruction.new(node.codeOrigin, "bti" + condition, [node.operands[-2], node.operands[-1]])
    176178            else
     
    211213            when "lshifti", "rshifti", "urshifti", "lshiftp", "rshiftp", "urshiftp"
    212214                if node.operands.size == 2
    213                     newList << Instruction.new(node.codeOrigin, node.opcode, [armV7SanitizeShift(node.operands[0], newList), node.operands[1]])
     215                    newList << Instruction.new(node.codeOrigin, node.opcode, [armV7SanitizeShift(node.operands[0], newList), node.operands[1]], node.annotation)
    214216                else
    215                     newList << Instruction.new(node.codeOrigin, node.opcode, [node.operands[0], armV7SanitizeShift(node.operands[1], newList), node.operands[2]])
     217                    newList << Instruction.new(node.codeOrigin, node.opcode, [node.operands[0], armV7SanitizeShift(node.operands[1], newList), node.operands[2]], node.annotation)
    216218                    raise "Wrong number of operands for shift at #{node.codeOriginString}" unless node.operands.size == 3
    217219                end
     
    322324            case node.opcode
    323325            when "loadd"
    324                 newList << Instruction.new(node.codeOrigin, "loadd", [node.operands[0].armV7DoubleAddress(newList), node.operands[1]])
     326                newList << Instruction.new(node.codeOrigin, "loadd", [node.operands[0].armV7DoubleAddress(newList), node.operands[1]], node.annotation)
    325327            when "stored"
    326                 newList << Instruction.new(node.codeOrigin, "stored", [node.operands[0], node.operands[1].armV7DoubleAddress(newList)])
     328                newList << Instruction.new(node.codeOrigin, "stored", [node.operands[0], node.operands[1].armV7DoubleAddress(newList)], node.annotation)
    327329            else
    328330                newList << node
     
    365367                    end
    366368                }
    367                 newList << Instruction.new(node.codeOrigin, node.opcode, newOperands)
     369                newList << Instruction.new(node.codeOrigin, node.opcode, newOperands, node.annotation)
    368370            else
    369371                newList << node
     
    432434        | node |
    433435        if node.is_a? Instruction
     436            annotation = node.annotation
    434437            case node.opcode
    435438            when "move"
     
    446449                    end
    447450                    newList << Instruction.new(node.codeOrigin, newOpcode,
    448                                                [Immediate.new(-node.operands[0].value)] + node.operands[1..-1])
     451                                               [Immediate.new(-node.operands[0].value)] + node.operands[1..-1],
     452                                               annotation)
    449453                else
    450454                    newList << node.armV7LowerMalformedImmediatesRecurse(newList)
     
    453457                if node.operands[0].is_a? Immediate
    454458                    tmp = Tmp.new(codeOrigin, :gpr)
    455                     newList << Instruction.new(node.codeOrigin, "move", [node.operands[0], tmp])
     459                    newList << Instruction.new(node.codeOrigin, "move", [node.operands[0], tmp], annotation)
    456460                    newList << Instruction.new(node.codeOrigin, "muli", [tmp] + node.operands[1..-1])
    457461                else
     
    515519        if node.is_a? Instruction
    516520            postInstructions = []
     521            annotation = node.annotation
    517522            case node.opcode
    518523            when "addi", "addp", "addis", "andi", "andp", "lshifti", "lshiftp", "muli", "mulp", "negi",
     
    521526                newList << Instruction.new(node.codeOrigin,
    522527                                           node.opcode,
    523                                            armV7AsRegisters(newList, postInstructions, node.operands, "i"))
     528                                           armV7AsRegisters(newList, postInstructions, node.operands, "i"),
     529                                           annotation)
    524530            when "bbeq", "bbneq", "bba", "bbaeq", "bbb", "bbbeq", "btbo", "btbz", "btbnz", "tbz", "tbnz",
    525531                "tbo", "cbeq", "cbneq", "cba", "cbaeq", "cbb", "cbbeq"
    526532                newList << Instruction.new(node.codeOrigin,
    527533                                           node.opcode,
    528                                            armV7AsRegisters(newList, postInstructions, node.operands, "b"))
     534                                           armV7AsRegisters(newList, postInstructions, node.operands, "b"),
     535                                           annotation)
    529536            when "bbgt", "bbgteq", "bblt", "bblteq", "btbs", "tbs", "cbgt", "cbgteq", "cblt", "cblteq"
    530537                newList << Instruction.new(node.codeOrigin,
    531538                                           node.opcode,
    532                                            armV7AsRegisters(newList, postInstructions, node.operands, "bs"))
     539                                           armV7AsRegisters(newList, postInstructions, node.operands, "bs"),
     540                                           annotation)
    533541            when "addd", "divd", "subd", "muld", "sqrtd", /^bd/
    534542                newList << Instruction.new(node.codeOrigin,
    535543                                           node.opcode,
    536                                            armV7AsRegisters(newList, postInstructions, node.operands, "d"))
     544                                           armV7AsRegisters(newList, postInstructions, node.operands, "d"),
     545                                           annotation)
    537546            when "jmp", "call"
    538547                newList << Instruction.new(node.codeOrigin,
    539548                                           node.opcode,
    540                                            [armV7AsRegister(newList, postInstructions, node.operands[0], "p", false)])
     549                                           [armV7AsRegister(newList, postInstructions, node.operands[0], "p", false)],
     550                                           annotation)
    541551            else
    542552                newList << node
     
    566576        | node |
    567577        if node.is_a? Instruction
     578            annotation = node.annotation
    568579            case node.opcode
    569580            when "cieq", "cineq", "cia", "ciaeq", "cib", "cibeq", "cigt", "cigteq", "cilt", "cilteq",
     
    574585                    if node.operands[0] == node.operands[1]
    575586                        tmp = Tmp.new(node.codeOrigin, :gpr)
    576                         newList << Instruction.new(node.codeOrigin, "move", [node.operands[0], tmp])
     587                        newList << Instruction.new(node.codeOrigin, "move", [node.operands[0], tmp], annotation)
    577588                        newList << Instruction.new(node.codeOrigin, node.opcode, [tmp, node.operands[1]])
    578589                    else
     
    583594                    if node.operands[0] == node.operands[2]
    584595                        tmp = Tmp.new(node.codeOrigin, :gpr)
    585                         newList << Instruction.new(node.codeOrigin, "move", [node.operands[0], tmp])
     596                        newList << Instruction.new(node.codeOrigin, "move", [node.operands[0], tmp], annotation)
    586597                        newList << Instruction.new(node.codeOrigin, node.opcode, [tmp, node.operands[1], node.operands[2]])
    587598                    elsif node.operands[1] == node.operands[2]
    588599                        tmp = Tmp.new(node.codeOrigin, :gpr)
    589                         newList << Instruction.new(node.codeOrigin, "move", [node.operands[1], tmp])
     600                        newList << Instruction.new(node.codeOrigin, "move", [node.operands[1], tmp], annotation)
    590601                        newList << Instruction.new(node.codeOrigin, node.opcode, [node.operands[0], tmp, node.operands[2]])
    591602                    else
     
    733744class Instruction
    734745    def lowerARMv7
    735         $asm.comment codeOriginString
     746        $asm.codeOrigin codeOriginString
     747        $asm.annotation annotation
     748
    736749        case opcode
    737750        when "addi", "addp", "addis"
  • trunk/Source/JavaScriptCore/offlineasm/asm.rb

    r119857 r122650  
    2626$: << File.dirname(__FILE__)
    2727
     28require "config"
    2829require "backends"
    2930require "digest/sha1"
     
    4041        @commentState = :none
    4142        @comment = nil
     43        @internalComment = nil
     44        @annotation = nil
     45        @codeOrigin = nil
     46        @numLocalLabels = 0
     47        @numGlobalLabels = 0
    4248    end
    4349   
    4450    def enterAsm
    45         @outp.puts "asm ("
     51        @outp.puts "OFFLINE_ASM_BEGIN"
    4652        @state = :asm
    4753    end
     
    4955    def leaveAsm
    5056        putsLastComment
    51         @outp.puts ");"
     57        @outp.puts "OFFLINE_ASM_END"
    5258        @state = :cpp
    5359    end
     
    5965    end
    6066   
     67    # Concatenates all the various components of the comment to dump.
    6168    def lastComment
    62         if @comment
    63             result = "// #{@comment}"
    64         else
    65             result = ""
    66         end
     69        result = ""
     70        result = " #{@comment} ." if @comment
     71        result += " #{@annotation} ." if @annotation and $enableTrailingInstrAnnotations
     72        result += " #{@internalComment} ." if @internalComment
     73        result += " #{@codeOrigin} ." if @codeOrigin and $enableCodeOriginComments
     74        if result != ""
     75            result = "  //" + result
     76        end
     77
     78        # Reset all the components that we've just sent to be dumped.
    6779        @commentState = :none
    6880        @comment = nil
     81        @internalComment = nil
     82        @annotation = nil
     83        @codeOrigin = nil
    6984        result
    7085    end
    7186   
     87    # Dumps the current instruction annotation in interlaced mode if appropriate.
     88    def putInterlacedAnnotation()
     89        raise unless @state == :asm
     90        if $enableInterlacedInstrAnnotations
     91            @outp.puts("    // #{@annotation}") if @annotation
     92            @annotation = nil
     93        end
     94    end
     95
    7296    def putsLastComment
    7397        comment = lastComment
     
    79103    def puts(*line)
    80104        raise unless @state == :asm
    81         @outp.puts("\"\\t" + line.join('') + "\\n\" #{lastComment}")
     105        putInterlacedAnnotation
     106        @outp.puts("    \"\\t" + line.join('') + "\\n\"#{lastComment}")
    82107    end
    83108   
     
    89114    def putsLabel(labelName)
    90115        raise unless @state == :asm
    91         @outp.puts("OFFLINE_ASM_GLOBAL_LABEL(#{labelName}) #{lastComment}")
     116        @numGlobalLabels += 1
     117        @outp.puts("\n")
     118        @internalComment = $enableLabelCountComments ? "Global Label #{@numGlobalLabels}" : nil
     119        @outp.puts("OFFLINE_ASM_GLOBAL_LABEL(#{labelName})#{lastComment}")
    92120    end
    93121   
    94122    def putsLocalLabel(labelName)
    95123        raise unless @state == :asm
    96         @outp.puts("LOCAL_LABEL_STRING(#{labelName}) \":\\n\" #{lastComment}")
     124        @numLocalLabels += 1
     125        @outp.puts("\n")
     126        @internalComment = $enableLabelCountComments ? "Local Label #{@numLocalLabels}" : nil
     127        @outp.puts("OFFLINE_ASM_LOCAL_LABEL(#{labelName})#{lastComment}")
    97128    end
    98129   
     
    105136    end
    106137   
    107     def comment(text)
     138    def codeOrigin(text)
    108139        case @commentState
    109140        when :none
    110             @comment = text
     141            @codeOrigin = text
    111142            @commentState = :one
    112143        when :one
    113             @outp.puts "// #{@comment}"
    114             @outp.puts "// #{text}"
    115             @comment = nil
     144            if $enableCodeOriginComments
     145                @outp.puts "    // #{@codeOrigin}"
     146                @outp.puts "    // #{text}"
     147            end
     148            @codeOrigin = nil
    116149            @commentState = :many
    117150        when :many
    118             @outp.puts "// #{text}"
     151            @outp.puts "// #{text}" if $enableCodeOriginComments
    119152        else
    120153            raise
    121154        end
     155    end
     156
     157    def comment(text)
     158        @comment = text
     159    end
     160    def annotation(text)
     161        @annotation = text
    122162    end
    123163end
  • trunk/Source/JavaScriptCore/offlineasm/ast.rb

    r110383 r122650  
    2121# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
    2222# THE POSSIBILITY OF SUCH DAMAGE.
     23
     24require "config"
    2325
    2426#
     
    785787
    786788class Instruction < Node
    787     attr_reader :opcode, :operands
    788    
    789     def initialize(codeOrigin, opcode, operands)
     789    attr_reader :opcode, :operands, :annotation
     790   
     791    def initialize(codeOrigin, opcode, operands, annotation=nil)
    790792        super(codeOrigin)
    791793        @opcode = opcode
    792794        @operands = operands
     795        @annotation = annotation
    793796    end
    794797   
     
    798801   
    799802    def mapChildren(&proc)
    800         Instruction.new(codeOrigin, @opcode, @operands.map(&proc))
     803        Instruction.new(codeOrigin, @opcode, @operands.map(&proc), @annotation)
    801804    end
    802805   
  • trunk/Source/JavaScriptCore/offlineasm/backends.rb

    r110383 r122650  
    2222# THE POSSIBILITY OF SUCH DAMAGE.
    2323
     24require "config"
    2425require "armv7"
    2526require "ast"
  • trunk/Source/JavaScriptCore/offlineasm/generate_offset_extractor.rb

    r108913 r122650  
    2626$: << File.dirname(__FILE__)
    2727
     28require "config"
    2829require "backends"
    2930require "digest/sha1"
  • trunk/Source/JavaScriptCore/offlineasm/instructions.rb

    r113930 r122650  
    2121# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
    2222# THE POSSIBILITY OF SUCH DAMAGE.
     23
     24require "config"
    2325
    2426# Interesting invariant, which we take advantage of: branching instructions
  • trunk/Source/JavaScriptCore/offlineasm/offsets.rb

    r120860 r122650  
    2222# THE POSSIBILITY OF SUCH DAMAGE.
    2323
     24require "config"
    2425require "ast"
    2526
  • trunk/Source/JavaScriptCore/offlineasm/opt.rb

    r108444 r122650  
    2222# THE POSSIBILITY OF SUCH DAMAGE.
    2323
     24require "config"
    2425require "ast"
    2526
  • trunk/Source/JavaScriptCore/offlineasm/parser.rb

    r110383 r122650  
    2222# THE POSSIBILITY OF SUCH DAMAGE.
    2323
     24require "config"
    2425require "ast"
    2526require "instructions"
     
    8283    result = []
    8384    lineNumber = 1
     85    annotation = nil
    8486    while not str.empty?
    8587        case str
    8688        when /\A\#([^\n]*)/
    8789            # comment, ignore
     90        when /\A\/\/([^\n]*)/
     91            # annotation
     92            annotation = $1
    8893        when /\A\n/
     94            # We've found a '\n'.  Emit the last comment recorded if appropriate:
     95            if $enableInstrAnnotations and annotation
     96                result << Token.new(CodeOrigin.new(fileName, lineNumber), "@" + annotation)
     97                annotation = nil
     98            end
    8999            result << Token.new(CodeOrigin.new(fileName, lineNumber), $&)
    90100            lineNumber += 1
     
    137147end
    138148
     149def isAnnotation(token)
     150    token =~ /\A\@([^\n]*)/
     151end
     152
    139153def isLabel(token)
    140154    token =~ /\A_([a-zA-Z0-9_]*)\Z/
     
    536550                    list << Instruction.new(codeOrigin, name, [])
    537551                    break
     552                elsif isAnnotation @tokens[@idx]
     553                    annotation = @tokens[@idx].string
     554                    list << Instruction.new(codeOrigin, name, [], annotation)
     555                    @idx += 2 # Consume the newline as well.
    538556                elsif @tokens[@idx] == "\n"
    539557                    # Zero operand instruction.
     
    544562                    operands = []
    545563                    endOfSequence = false
     564                    annotation = nil
    546565                    loop {
    547566                        operands << parseOperand("while inside of instruction #{name}")
     
    553572                            # Has another operand.
    554573                            @idx += 1
     574                        elsif isAnnotation @tokens[@idx]
     575                            annotation = @tokens[@idx].string
     576                            @idx += 2 # Consume the newline as well.
     577                            break
    555578                        elsif @tokens[@idx] == "\n"
    556579                            # The end of the instruction.
     
    561584                        end
    562585                    }
    563                     list << Instruction.new(codeOrigin, name, operands)
     586                    list << Instruction.new(codeOrigin, name, operands, annotation)
    564587                    if endOfSequence
    565588                        break
  • trunk/Source/JavaScriptCore/offlineasm/registers.rb

    r110383 r122650  
    2121# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
    2222# THE POSSIBILITY OF SUCH DAMAGE.
     23
     24require "config"
    2325
    2426GPRS =
  • trunk/Source/JavaScriptCore/offlineasm/self_hash.rb

    r108913 r122650  
    2222# THE POSSIBILITY OF SUCH DAMAGE.
    2323
     24require "config"
    2425require "digest/sha1"
    2526require "pathname"
  • trunk/Source/JavaScriptCore/offlineasm/settings.rb

    r108909 r122650  
    2222# THE POSSIBILITY OF SUCH DAMAGE.
    2323
     24require "config"
    2425require "ast"
    2526require "backends"
  • trunk/Source/JavaScriptCore/offlineasm/transform.rb

    r110383 r122650  
    2222# THE POSSIBILITY OF SUCH DAMAGE.
    2323
     24require "config"
    2425require "ast"
    2526
  • trunk/Source/JavaScriptCore/offlineasm/x86.rb

    r121925 r122650  
    2121# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
    2222# THE POSSIBILITY OF SUCH DAMAGE.
     23
     24require "config"
    2325
    2426def isX64
     
    354356                        end
    355357                    }
    356                     newNode = Instruction.new(node.codeOrigin, node.opcode, newOperands)
     358                    newNode = Instruction.new(node.codeOrigin, node.opcode, newOperands, node.annotation)
    357359                end
    358360            else
     
    623625   
    624626    def lowerX86Common
    625         $asm.comment codeOriginString
     627        $asm.codeOrigin codeOriginString
     628        $asm.annotation annotation
     629
    626630        case opcode
    627631        when "addi"
Note: See TracChangeset for help on using the changeset viewer.