<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel rdf:about="http://permalink.gmane.org/gmane.comp.java.objectweb.asm">
    <title>gmane.comp.java.objectweb.asm</title>
    <link>http://permalink.gmane.org/gmane.comp.java.objectweb.asm</link>
    <description/>
    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>1</syn:updateFrequency>
    <syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.java.objectweb.asm/4094"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.java.objectweb.asm/4093"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.java.objectweb.asm/4092"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.java.objectweb.asm/4091"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.java.objectweb.asm/4090"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.java.objectweb.asm/4089"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.java.objectweb.asm/4088"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.java.objectweb.asm/4087"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.java.objectweb.asm/4086"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.java.objectweb.asm/4085"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.java.objectweb.asm/4084"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.java.objectweb.asm/4083"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.java.objectweb.asm/4082"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.java.objectweb.asm/4081"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.java.objectweb.asm/4080"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.java.objectweb.asm/4079"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.java.objectweb.asm/4078"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.java.objectweb.asm/4077"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.java.objectweb.asm/4076"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.java.objectweb.asm/4075"/>
      </rdf:Seq>
    </items>
    <image rdf:resource="http://gmane.org/img/gmane-25t.png"/>
    <textinput rdf:resource=""/>
  </channel>
  <image rdf:about="http://gmane.org/img/gmane-25t.png">
    <title>Gmane</title>
    <url>http://gmane.org/img/gmane-25t.png</url>
    <link>http://gmane.org</link>
  </image>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.java.objectweb.asm/4094">
    <title>RE : Re: Re: RE : Re: Re: Ongoing work on splitting large methods</title>
    <link>http://permalink.gmane.org/gmane.comp.java.objectweb.asm/4094</link>
    <description>&lt;pre&gt;Can we see the proposed interfaces, if you already have them? And maybe an example showing how they would be used for a backward analysis?

EricEliot Moss &amp;lt;moss&amp;lt; at &amp;gt;cs.umass.edu&amp;gt; a écrit :You mention backward flow analysis.  We are indeed working on it
and I hope to have something within the next month or so. Here are
some things to pass on about the design:

- Even back analyses require first a forward analysis to discover
   the flow graph.  We have found it useful to build a backward
   graph from the forward one; this allows the most space efficient
   backward graph.  We found it sensible to separate graph building
   from the actual analysis -- however, we intend to test the cost
   of this and can forward the mixed forward graph building + analysis
   that the current Analyzer class does if that seems advised.

- Most backward analyses need some kind of forward analysis first,
   in addition to flow graph construction -- if only the type information.

- This led to the notion of a *chain&lt;/pre&gt;</description>
    <dc:creator>Eric Bruneton</dc:creator>
    <dc:date>2012-05-16T16:37:43</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.java.objectweb.asm/4093">
    <title>Re: RE : Re: Re: Ongoing work on splitting large methods</title>
    <link>http://permalink.gmane.org/gmane.comp.java.objectweb.asm/4093</link>
    <description>&lt;pre&gt;
do you use SCC for "strongly connected components" here? Then what do you do if the whole method is a single SCC (ie. only one node in the SCC dag)?
 

is it possible that you have an exception handler that only partially covers the component (and its transitive closure) you want to split? Ie. that this handler also covers some other code? Then the handler code could be duplicated?


what do you call a subcomponent here? a strongly connected "sub component"? Because if you run an algorithm to find the maximal strongly connected components, and use it on a strongly connected component C, you will not get any "sub component" of C, but only C itself.

Eric

&lt;/pre&gt;</description>
    <dc:creator>ebruneton&lt; at &gt;free.fr</dc:creator>
    <dc:date>2012-05-17T06:47:29</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.java.objectweb.asm/4092">
    <title>writing directly to Attribute.value</title>
    <link>http://permalink.gmane.org/gmane.comp.java.objectweb.asm/4092</link>
    <description>&lt;pre&gt;Rémi,



In asm.Attribute, the method closer to what I need appears to be read() actually, because it populates Attribute.value . I'm instead writing directly to that field:

    // Scala code
    def createJAttribute(name: String, b: Array[Byte], offset: Int, len: Int): asm.Attribute = {
      val dest = new Array[Byte](len);
      System.arraycopy(b, offset, dest, 0, len);
      new asm.CustomAttr(name, dest)
    }

For clarity, the subclass I'm using looks like:

  // Java code
  public class CustomAttr extends Attribute {

        public CustomAttr(final String type, final byte[] value) {
            super(type);
            super.value = value;
        }

   }

For the use case above a subclass does a fine job, but anyway I wanted to ask whether Attribute.value could be made public.

best regards,

Miguel
http://lampwww.epfl.ch/~magarcia/ScalaCompilerCornerReloaded 

&lt;/pre&gt;</description>
    <dc:creator>Garcia Gutierrez Miguel Alfredo</dc:creator>
    <dc:date>2012-05-16T18:45:17</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.java.objectweb.asm/4091">
    <title>RE: Re: Re: new ASM-based backend in the Scala compiler</title>
    <link>http://permalink.gmane.org/gmane.comp.java.objectweb.asm/4091</link>
    <description>&lt;pre&gt;Eugene,


I'm using those methods as-is (calling them from a subclass). If they were public I could use them instead as follows (from an unrelated class):

  // Scala code
  import scala.tools.asm.util.CheckMethodAdapter
  if (sym.isMethod)    { CheckMethodAdapter checkMethodSignature sig } // requires asm-util.jar
  else if (sym.isTerm) { CheckMethodAdapter checkFieldSignature  sig }
  else                       { CheckMethodAdapter checkClassSignature  sig }

best regards,

Miguel
http://lampwww.epfl.ch/~magarcia/ScalaCompilerCornerReloaded/


&lt;/pre&gt;</description>
    <dc:creator>Garcia Gutierrez Miguel Alfredo</dc:creator>
    <dc:date>2012-05-16T18:50:53</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.java.objectweb.asm/4090">
    <title>Re: Re: new ASM-based backend in the Scala compiler</title>
    <link>http://permalink.gmane.org/gmane.comp.java.objectweb.asm/4090</link>
    <description>&lt;pre&gt;
value is only used for unknown attribute, otherwise
it's better to implements read and write.
For unknown attribute, write(null, null, 0, 0, 0).toByteArray()
should give you what you want.


I see no problem with that.


Rémi


&lt;/pre&gt;</description>
    <dc:creator>Rémi Forax</dc:creator>
    <dc:date>2012-05-16T14:31:08</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.java.objectweb.asm/4089">
    <title>Re: Re: new ASM-based backend in the Scala compiler</title>
    <link>http://permalink.gmane.org/gmane.comp.java.objectweb.asm/4089</link>
    <description>&lt;pre&gt;

  This is pretty much by design. The Attribute class is only used
directly for unknown attributes. For your own attributes you should
use your own subclasses. See section A3 in ASM User's Guide at
http://download.forge.objectweb.org/asm/asm4-guide.pdf
  Though most of the stuff can be now stored using regular
annotations, instead of attributes...


  Could you elaborate why you need something else in these methods
which are supposedly checking that signatures are valid for the JVM...


  regards,
  Eugene

&lt;/pre&gt;</description>
    <dc:creator>Eugene Kuleshov</dc:creator>
    <dc:date>2012-05-16T14:24:32</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.java.objectweb.asm/4088">
    <title>Re: new ASM-based backend in the Scala compiler</title>
    <link>http://permalink.gmane.org/gmane.comp.java.objectweb.asm/4088</link>
    <description>&lt;pre&gt;
Hi,

In the Scala compiler backend we're subclassing asm.Attribtue and
asm.util.CheckMethodAdapter to access functionality which is not public,
respectively:

  - Attribute's value field

  - CheckMethodAdapter's checkClassSignature(), checkMethodSignature(), and
checkFieldSignature() methods

If those members were public to start with, my team could automate our build
some more (by checking out ASM from ObjectWeb's SVN).

Is it ok with you making the above members public?


Miguel
http://lampwww.epfl.ch/~magarcia/ScalaCompilerCornerReloaded/

&lt;/pre&gt;</description>
    <dc:creator>miguelalfredo.garcia&lt; at &gt;epfl.ch</dc:creator>
    <dc:date>2012-05-16T14:04:43</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.java.objectweb.asm/4087">
    <title>Re: RE : Re: Re: Ongoing work on splitting large methods</title>
    <link>http://permalink.gmane.org/gmane.comp.java.objectweb.asm/4087</link>
    <description>&lt;pre&gt;
ebruneton&amp;lt; at &amp;gt;free.fr writes:


My approach is somewhat different, but it's extremely helpful to get
another perspective.  Thanks for the analysis and very elaborate and
helpful description!


Right.


I actually do handle exceptions, currently - see below.


Yes, and I haven't done that yet.

What I am trying to do is not as general as what you're suggesting: It's
still possible to write large methods that my approach won't split
successfully.  On the other hand, the splitting strategy I use is much
simpler.  My intention is to first fully implement this and then see how
well it works with actual compilers.  Your strategy looks like the
appropriate next step if that doesn't work as well as I'm hoping.  (I'm
betting on the fact that the simple strategy will either work, or a
compiler's code generator can easily be adjusted to make it work well.)


That is only necessary if the split-out method is not a tail method,
i.e. the call to it in the end product is not a tail call. I only split
at appropriate points in &lt;/pre&gt;</description>
    <dc:creator>Michael Sperber</dc:creator>
    <dc:date>2012-05-16T07:47:17</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.java.objectweb.asm/4086">
    <title>Re: Re: RE : Re: Re: Ongoing work on splitting large methods</title>
    <link>http://permalink.gmane.org/gmane.comp.java.objectweb.asm/4086</link>
    <description>&lt;pre&gt;You mention backward flow analysis.  We are indeed working on it
and I hope to have something within the next month or so. Here are
some things to pass on about the design:

- Even back analyses require first a forward analysis to discover
   the flow graph.  We have found it useful to build a backward
   graph from the forward one; this allows the most space efficient
   backward graph.  We found it sensible to separate graph building
   from the actual analysis -- however, we intend to test the cost
   of this and can forward the mixed forward graph building + analysis
   that the current Analyzer class does if that seems advised.

- Most backward analyses need some kind of forward analysis first,
   in addition to flow graph construction -- if only the type information.

- This led to the notion of a *chained* analysis, where one has an
   array of Frame&amp;lt;V&amp;gt; computed from some previous analysis and desires
   to compute an array of Frame&amp;lt;W&amp;gt; using the V values (and the flowing
   W values).  This leads to e&lt;/pre&gt;</description>
    <dc:creator>Eliot Moss</dc:creator>
    <dc:date>2012-05-15T21:44:01</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.java.objectweb.asm/4085">
    <title>Re: RE : Re: Re: Ongoing work on splitting large methods</title>
    <link>http://permalink.gmane.org/gmane.comp.java.objectweb.asm/4085</link>
    <description>&lt;pre&gt;I've been thinking about the problem you try to address, here are my thoughts. I don't know the algorithm you are using, maybe I just described what you are already doing.

First of all, I suppose there is no JSR/RET instruction, and no dead code (they can be easily removed with a JSRInlinerAdapter and DeadCodeRemovalAdapter - see ASM Guide). I also suppose there is no exception handler (to be done).

Then, note that it is possible to have a method made of a single very large basic block. Thus, working at the basic block level (i.e. treating them as indivisible atoms) is not general enough. You could do a first pass where you split the basic blocks that are too large, but for full generality, in the following I will work at the instruction level.

Now suppose you have identified some code you want to extract into a separate method. This code needs some stack and local variables as inputs and outputs. A simple but not optimal strategy is to pass it all the stack values and all the local variables, even the on&lt;/pre&gt;</description>
    <dc:creator>ebruneton&lt; at &gt;free.fr</dc:creator>
    <dc:date>2012-05-15T17:16:15</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.java.objectweb.asm/4084">
    <title>Re: RE : Re: Re: Ongoing work on splitting large methods</title>
    <link>http://permalink.gmane.org/gmane.comp.java.objectweb.asm/4084</link>
    <description>&lt;pre&gt;
Eric Bruneton &amp;lt;ebruneton&amp;lt; at &amp;gt;gmail.com&amp;gt; writes:


Could you elaborate?  All the offsets I see in Label are ints, and
Label.resolve calculates them correctly, I read the code right.  If
Label.resolve sees an offset &amp;gt; Short.MAX_VALUE, it sets the needUpdate
flag, so I'll know later there's a potential problem.  Sure, the offset
it writes into the code is invalid, but can't I look at the Label again
later, retrieving the correct offset?

&lt;/pre&gt;</description>
    <dc:creator>Michael Sperber</dc:creator>
    <dc:date>2012-05-15T11:30:03</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.java.objectweb.asm/4083">
    <title>Re: Re: Re: Re: Ongoing work on splitting large methods</title>
    <link>http://permalink.gmane.org/gmane.comp.java.objectweb.asm/4083</link>
    <description>&lt;pre&gt;
Rémi Forax &amp;lt;forax&amp;lt; at &amp;gt;univ-mlv.fr&amp;gt; writes:


No, it's too late, because the visitor has already run.  There's no way
from inside ClassWriter or MethodWriter to reach back up and re-run it.

&lt;/pre&gt;</description>
    <dc:creator>Michael Sperber</dc:creator>
    <dc:date>2012-05-15T06:28:44</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.java.objectweb.asm/4082">
    <title>Re: Re: Re: Ongoing work on splitting large methods</title>
    <link>http://permalink.gmane.org/gmane.comp.java.objectweb.asm/4082</link>
    <description>&lt;pre&gt;
For a generator, you can do the code size evaluation on the visitor,
and revert to use the tree API if the size is too big and
you want to split it.


Rémi


&lt;/pre&gt;</description>
    <dc:creator>Rémi Forax</dc:creator>
    <dc:date>2012-05-14T09:55:21</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.java.objectweb.asm/4081">
    <title>Re: Re: Ongoing work on splitting large methods</title>
    <link>http://permalink.gmane.org/gmane.comp.java.objectweb.asm/4081</link>
    <description>&lt;pre&gt;
Eric Bruneton &amp;lt;ebruneton&amp;lt; at &amp;gt;free.fr&amp;gt; writes:


I very much appreciate the feedback!

I know there's a lot of interaction with the core package right now,
which I hope to reduce once I really know what I'm doing.  The current
set of changes still carries the traces from some abandoned attempts.


Going to the tree API would have a couple of unpleasant side effects,
though: It would only work for code generators using the tree API, and
incur its performance disadvantages.  Also, I'd have to *always*
estimate code size in the tree API, which would slow things down even
further.  On the other hand, the check in the core API for the size
limit is trivial, and you'd only pay for the splitting work when it's
necessary.

I saw the code in Label.java, but no other code that knows about the 64k
limit: If I understand it correctly, the only affected code is for
backpatching forward branches.  (While it's closely related to the
method-size limit, this is mostly about the limit in branch-offset size,
right?)  But isn't all&lt;/pre&gt;</description>
    <dc:creator>Michael Sperber</dc:creator>
    <dc:date>2012-05-14T09:48:23</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.java.objectweb.asm/4080">
    <title>Re: Ongoing work on splitting large methods</title>
    <link>http://permalink.gmane.org/gmane.comp.java.objectweb.asm/4080</link>
    <description>&lt;pre&gt;
I downloaded the sources to do a svn diff with my local ASM repository. I think
the approach you are using is ok to design and test your algorithm, but in
order for this to be integrated in ASM, you will need to avoid any change in
the core package.

For this you will need to move from the byte array level to the tree API, which
will be less error prone. This would complicate bytecode size computations if
you would keep exact sizes, but I think you can work instead with conservative
estimates of these sizes, as in CodeSizeEvaluator.

I see two reasons to move from the byte array level to the tree API. The first
is to avoid exposing private implementation details in the core package, as in
your current design. 

The second is that this approach is probably fundamentally flawed: it seems
that your code is parsing the instructions at the byte array level to rebuild
some high level data structures, and in particular it seems to parse bytecode
offsets from jump instructions. But ASM is using the assumption that &lt;/pre&gt;</description>
    <dc:creator>Eric Bruneton</dc:creator>
    <dc:date>2012-05-13T14:04:25</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.java.objectweb.asm/4079">
    <title>Re: Re: Ongoing work on splitting large methods</title>
    <link>http://permalink.gmane.org/gmane.comp.java.objectweb.asm/4079</link>
    <description>&lt;pre&gt;
a diff with 4.0 is ok. I was looking for something like this: 
http://websvn.ow2.org/comp.php?repname=asm

Eric


&lt;/pre&gt;</description>
    <dc:creator>Eric Bruneton</dc:creator>
    <dc:date>2012-05-13T12:33:16</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.java.objectweb.asm/4078">
    <title>Re: Re: Ongoing work on splitting large methods</title>
    <link>http://permalink.gmane.org/gmane.comp.java.objectweb.asm/4078</link>
    <description>&lt;pre&gt;
Eric Bruneton &amp;lt;ebruneton&amp;lt; at &amp;gt;free.fr&amp;gt; writes:


Just to be sure I understand you correctly: I based my stuff on ASM 4.0,
which is what the project I'm involved in is using, but you'd rather
have a version on the current ASM head from Subversion, right?  Or would
a diff between 4.0 and my stuff also work for you?

&lt;/pre&gt;</description>
    <dc:creator>Michael Sperber</dc:creator>
    <dc:date>2012-05-13T08:45:34</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.java.objectweb.asm/4077">
    <title>Re: Ongoing work on splitting large methods</title>
    <link>http://permalink.gmane.org/gmane.comp.java.objectweb.asm/4077</link>
    <description>&lt;pre&gt;
is it possible to view a diff with ASM HEAD, to better see the proposed 
changes?

Eric


&lt;/pre&gt;</description>
    <dc:creator>Eric Bruneton</dc:creator>
    <dc:date>2012-05-12T12:43:40</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.java.objectweb.asm/4076">
    <title>Ongoing work on splitting large methods</title>
    <link>http://permalink.gmane.org/gmane.comp.java.objectweb.asm/4076</link>
    <description>&lt;pre&gt;
I've made some progress on hacking ASM such that it automatically splits
methods larger than 64k into several sub-methods.

This is very rough work at the moment, and a lot of stuff doesn't work
yet, but it shows where it's all going, and the first couple of examples
do work.  If someone is interested, have a look at:

https://bitbucket.org/sperber/asm-method-size

Of course, help would be much welcome.

&lt;/pre&gt;</description>
    <dc:creator>Michael Sperber</dc:creator>
    <dc:date>2012-05-11T12:02:57</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.java.objectweb.asm/4075">
    <title>new ASM-based backend in the Scala compiler</title>
    <link>http://permalink.gmane.org/gmane.comp.java.objectweb.asm/4075</link>
    <description>&lt;pre&gt;
Yesterday [1] a new backend based on ASM was merged into the Scala compiler,
hopefully to become the default backend in the near future.

The motivation to use ASM was speed and emitting class file in format version
50 and up. In both areas ASM performs great.

Looking into the future, there's early brainstorming on invokedynamic [2], so
stay tuned (better yet, join the discussion!)

regards,

Miguel
http://lampwww.epfl.ch/~magarcia/ScalaCompilerCornerReloaded/

[1]
https://github.com/scala/scala/commit/454c2a0c775c92be7f2a741bb6ab17b55f1eddb1

[2] http://mail.openjdk.java.net/pipermail/graal-dev/2012-May/000038.html
    http://mail.openjdk.java.net/pipermail/graal-dev/2012-May/000040.html
    https://groups.google.com/d/topic/jvm-languages/eEp3Z8tS8wo/discussion

&lt;/pre&gt;</description>
    <dc:creator>miguelalfredo.garcia&lt; at &gt;epfl.ch</dc:creator>
    <dc:date>2012-05-09T10:02:31</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.java.objectweb.asm/4074">
    <title>Re: Re: Re: Re: ClassFormatError with ASM 4</title>
    <link>http://permalink.gmane.org/gmane.comp.java.objectweb.asm/4074</link>
    <description>&lt;pre&gt;
:)

Rémi



&lt;/pre&gt;</description>
    <dc:creator>Rémi Forax</dc:creator>
    <dc:date>2012-05-03T18:37:41</dc:date>
  </item>
  <textinput rdf:about="http://search.gmane.org/?group=$group=gmane.comp.java.objectweb.asm">
    <title>Search Engine</title>
    <description>Search the mailing list at Gmane</description>
    <name>query</name>
    <link>http://search.gmane.org/?group=$group=gmane.comp.java.objectweb.asm</link>
  </textinput>
</rdf:RDF>

