Ignore:
Timestamp:
Feb 12, 2018, 3:43:30 PM (7 years ago)
Author:
[email protected]
Message:

Miscellaneous refactoring of offlineasm.
https://bugs.webkit.org/show_bug.cgi?id=182702
<rdar://problem/37467887>

Reviewed by Filip Pizlo.

  1. Refactor out the emission of $asm.comment, $asm.codeOrigin, $asm.annotation, and $asm.debugAnnotation into a recordMetaData method. This standardizes how we emit this metadata and makes all backends do it the same way.
  1. Add the ability to include custom offlineasm scripts from WebKitAdditions in the future.
  • offlineasm/arm.rb:
  • offlineasm/arm64.rb:
  • offlineasm/ast.rb:
  • offlineasm/backends.rb:
  • offlineasm/cloop.rb:
  • offlineasm/config.rb:
  • offlineasm/mips.rb:
  • offlineasm/risc.rb:
  • offlineasm/x86.rb:
File:
1 edited

Legend:

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

    r227929 r228402  
    1 # Copyright (C) 2012-2017 Apple Inc. All rights reserved.
     1# Copyright (C) 2012-2018 Apple Inc. All rights reserved.
    22#
    33# Redistribution and use in source and binary forms, with or without
     
    568568
    569569    def lowerC_LOOP
    570         $asm.codeOrigin codeOriginString if $enableCodeOriginComments
    571         $asm.annotation annotation if $enableInstrAnnotations && (opcode != "cloopDo")
    572 
    573570        case opcode
    574571        when "addi"
     
    11661163        end
    11671164    end
    1168 end
     1165
     1166    def recordMetaDataC_LOOP
     1167        $asm.codeOrigin codeOriginString if $enableCodeOriginComments
     1168        $asm.annotation annotation if $enableInstrAnnotations && (opcode != "cloopDo")
     1169        $asm.debugAnnotation codeOrigin.debugDirective if $enableDebugAnnotations
     1170    end
     1171end
Note: See TracChangeset for help on using the changeset viewer.