<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>71498</bug_id>
          
          <creation_ts>2011-11-03 13:04:53 -0700</creation_ts>
          <short_desc>JIT-specific code should be able to refer to register types even on JIT-disabled builds</short_desc>
          <delta_ts>2011-11-03 13:23:45 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>JavaScriptCore</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Filip Pizlo">fpizlo</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>paroga</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>495735</commentid>
    <comment_count>0</comment_count>
    <who name="Filip Pizlo">fpizlo</who>
    <bug_when>2011-11-03 13:04:53 -0700</bug_when>
    <thetext>Increasingly, code in CodeBlock and elsewhere outside of the JIT refers to JIT features.  This is part of the evolution of the system to rely more on high-performance JIT optimizations.  But we still want to support no-JIT builds.  Doing this often means that we must insert #if&apos;s in a bunch of places if no JIT support is present.  A particularly egregious case is the current build bug introduced by http://trac.webkit.org/changeset/99148.  That changeset makes use of MacroAssembler::RegisterID in structs and classes that are placed in CodeBlock.  In the case that the JIT is turned off, no instances of those classes are ever instantiated.  But we&apos;ve taken the approach of letting them be declared without #if guards to minimize noise.

But this breaks because the latest addition to these classes is ValueRecovery (referenced from InlineCallFrame, which is referenced from CodeBlock&apos;s RareData), which uses MacroAssembler::RegisterID.  We can either fix this by adding #if&apos;s around all references from CodeBlock to ValueRecovery (transitively, of course), or we can localize the noise by making MacroAssembler.h define a dummy MacroAssembler, with a dummy RegisterID, even if the assembler (and the JIT) is disabled.  This will have no run-time overhead, since this would just be an empty class with some typedef&apos;s, and ValueRecovery is never instantiated in non-JIT builds anyway.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>495738</commentid>
    <comment_count>1</comment_count>
      <attachid>113545</attachid>
    <who name="Filip Pizlo">fpizlo</who>
    <bug_when>2011-11-03 13:08:25 -0700</bug_when>
    <thetext>Created attachment 113545
the patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>495740</commentid>
    <comment_count>2</comment_count>
      <attachid>113545</attachid>
    <who name="Gavin Barraclough">barraclough</who>
    <bug_when>2011-11-03 13:17:37 -0700</bug_when>
    <thetext>Comment on attachment 113545
the patch

Ick, a bit ugly, but I guess the alternative involves a bunch of ifdefing code / data structures holding these as fields?  Probably for the best.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>495745</commentid>
    <comment_count>3</comment_count>
    <who name="Filip Pizlo">fpizlo</who>
    <bug_when>2011-11-03 13:23:45 -0700</bug_when>
    <thetext>Landed in http://trac.webkit.org/changeset/99232</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>113545</attachid>
            <date>2011-11-03 13:08:25 -0700</date>
            <delta_ts>2011-11-03 13:17:37 -0700</delta_ts>
            <desc>the patch</desc>
            <filename>fixasm_patch_1.diff</filename>
            <type>text/plain</type>
            <size>1583</size>
            <attacher name="Filip Pizlo">fpizlo</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9KYXZhU2NyaXB0Q29yZS9DaGFuZ2VMb2cKPT09PT09PT09PT09PT09PT09
PT09PT09PT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b0Fzc2VtYmxlci5oCSh3b3JraW5nIGNvcHkp
CkBAIC0zODUsMTIgKzM4NSwyNyBAQCBwdWJsaWM6CiAgICAgewogICAgICAgICByZXR1cm4gTWFj
cm9Bc3NlbWJsZXJCYXNlOjpicmFuY2hUZXN0OChjb25kLCBBZGRyZXNzKGFkZHJlc3MuYmFzZSwg
YWRkcmVzcy5vZmZzZXQpLCBtYXNrKTsKICAgICB9Ci0jZW5kaWYKKyNlbmRpZiAvLyAhQ1BVKFg4
Nl82NCkKIAogfTsKIAogfSAvLyBuYW1lc3BhY2UgSlNDCiAKKyNlbHNlIC8vIEVOQUJMRShBU1NF
TUJMRVIpCisKKy8vIElmIHRoZXJlIGlzIG5vIGFzc2VtYmxlciBmb3IgdGhpcyBwbGF0Zm9ybSwg
YXQgbGVhc3QgYWxsb3cgY29kZSB0byBtYWtlIHJlZmVyZW5jZXMgdG8KKy8vIHNvbWUgb2YgdGhl
IHRoaW5ncyBpdCB3b3VsZCBvdGhlcndpc2UgZGVmaW5lLCBhbGJlaXQgd2l0aG91dCBnaXZpbmcg
dGhhdCBjb2RlIGFueSB3YXkKKy8vIG9mIGRvaW5nIGFueXRoaW5nIHVzZWZ1bC4KK2NsYXNzIE1h
Y3JvQXNzZW1ibGVyIHsKK3ByaXZhdGU6CisgICAgTWFjcm9Bc3NlbWJsZXIoKSB7IH0KKyAgICAK
K3B1YmxpYzoKKyAgICAKKyAgICBlbnVtIFJlZ2lzdGVySUQgeyBOb1JlZ2lzdGVyIH07CisgICAg
ZW51bSBGUFJlZ2lzdGVySUQgeyBOb0ZQUmVnaXN0ZXIgfTsKK307CisKICNlbmRpZiAvLyBFTkFC
TEUoQVNTRU1CTEVSKQogCiAjZW5kaWYgLy8gTWFjcm9Bc3NlbWJsZXJfaAo=
</data>
<flag name="review"
          id="111951"
          type_id="1"
          status="+"
          setter="barraclough"
    />
          </attachment>
      

    </bug>

</bugzilla>