<?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>159281</bug_id>
          
          <creation_ts>2016-06-29 16:12:52 -0700</creation_ts>
          <short_desc>Linked bytecode should not have save/resume</short_desc>
          <delta_ts>2018-07-11 01:46:22 -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>WebKit Nightly Build</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=159279</see_also>
          <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>ysuzuki</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1206540</commentid>
    <comment_count>0</comment_count>
    <who name="Filip Pizlo">fpizlo</who>
    <bug_when>2016-06-29 16:12:52 -0700</bug_when>
    <thetext>The save/resume opcodes are so unusual that they cause confusion in the bytecode liveness analysis.  In particular, they don&apos;t have context-free use/def behavior and their live-in calculation cannot be expressed in terms of use/def.  Normally, the use/def of a bytecode is determined just by that bytecode.  Save/resume&apos;s use/def is context-sensitive: you need to look at some surrounding code to determine what they use and def.  Worse, use/def is insufficient to calculate the live-in of resume.  The live-in of resume is invariant: the only thing live-in is the argument token.  This is an unusual rule, and would require resume to be special-cased.

Linked bytecode has many clients: the bytecode liveness analysis, the LLInt, baseline JIT, and DFG parser.  I think that instead of having so many special cases in linked bytecode for generators, we should do a generator conversion before even getting to linked bytecode.  This will mean that linked bytecode won&apos;t have to worry about what it means to be a generator.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1206541</commentid>
    <comment_count>1</comment_count>
    <who name="Filip Pizlo">fpizlo</who>
    <bug_when>2016-06-29 16:13:13 -0700</bug_when>
    <thetext>Yusuke, do you have a bug that this can be duped to?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1206570</commentid>
    <comment_count>2</comment_count>
    <who name="Yusuke Suzuki">ysuzuki</who>
    <bug_when>2016-06-29 17:15:10 -0700</bug_when>
    <thetext>https://bugs.webkit.org/show_bug.cgi?id=152723 this patch will include this separated analysis change to transform save, resume to get_from_scope &amp; put_to_scope.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1441136</commentid>
    <comment_count>3</comment_count>
    <who name="Yusuke Suzuki">ysuzuki</who>
    <bug_when>2018-07-11 01:46:22 -0700</bug_when>
    <thetext>Our generator mechanism was rewritten and this problems is gone!</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>