Ignore:
Timestamp:
Jul 19, 2012, 1:53:22 PM (13 years ago)
Author:
[email protected]
Message:

Bug fixes and enhancements for OfflineASM annotation system.
https://bugs.webkit.org/show_bug.cgi?id=91690

Patch by Mark Lam <[email protected]> on 2012-07-19
Reviewed by Filip Pizlo.

  • offlineasm/armv7.rb: added default handling of Instruction lower().
  • offlineasm/asm.rb: added more support for annotations and more pretty printing.
  • offlineasm/ast.rb: added more support for annotations.
  • offlineasm/config.rb: added $preferredCommentStartColumn, simplified $enableInstrAnnotations.
  • offlineasm/parser.rb: added more support for annotations.
  • offlineasm/transform.rb: added more support for annotations.
  • offlineasm/x86.rb: added default handling of Instruction lower().
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/offlineasm/ast.rb

    r122650 r123147  
    807807        "\t" + opcode.to_s + " " + operands.collect{|v| v.dump}.join(", ")
    808808    end
     809
     810    def lowerDefault
     811        case opcode
     812        when "localAnnotation"
     813            $asm.putLocalAnnotation
     814        when "globalAnnotation"
     815            $asm.putGlobalAnnotation
     816        else
     817            raise "Unhandled opcode #{opcode} at #{codeOriginString}"
     818        end
     819    end
    809820end
    810821
     
    11811192class Macro < Node
    11821193    attr_reader :name, :variables, :body
    1183    
     1194
    11841195    def initialize(codeOrigin, name, variables, body)
    11851196        super(codeOrigin)
     
    12031214
    12041215class MacroCall < Node
    1205     attr_reader :name, :operands
    1206    
    1207     def initialize(codeOrigin, name, operands)
     1216    attr_reader :name, :operands, :annotation
     1217   
     1218    def initialize(codeOrigin, name, operands, annotation)
    12081219        super(codeOrigin)
    12091220        @name = name
     
    12111222        raise unless @operands
    12121223        @operands.each{|v| raise unless v}
     1224        @annotation = annotation
    12131225    end
    12141226   
     
    12181230   
    12191231    def mapChildren(&proc)
    1220         MacroCall.new(codeOrigin, @name, @operands.map(&proc))
     1232        MacroCall.new(codeOrigin, @name, @operands.map(&proc), @annotation)
    12211233    end
    12221234   
Note: See TracChangeset for help on using the changeset viewer.