Commits

Antonio Cuni committed e4a65bc

show bytecodes which are completely optimized away in gray

Comments (0)

Files changed (3)

         last_lineno = -1
         for chunk in loop.chunks:
             if chunk.is_bytecode:
+                chunk.cssclass = 'dmp '
+                if len(chunk.operations) <= 1:
+                    chunk.cssclass += 'empty'
+                else:
+                    chunk.cssclass += 'nonempty'
                 no = chunk.lineno
                 if no < last_lineno:
                     no = last_lineno
 }
 
 .dmp {
-    font-weight: bold;
     margin-left: 3em;
     white-space: pre;
 }
 
+.nonempty {
+    font-weight: bold;
+}
+
+.empty {
+    color: #AAA;
+}
+
+
 .guard {
     border: 1px solid #F00;
     margin-left: 2em;

templates/loop.html

           <div class="operations">
               {% for chunk in sourceline.chunks %}
                  {% if chunk.is_bytecode %}
-                   <span class="dmp">{{chunk.html_repr()}}</span><br/>
+                   <span class="{{chunk.cssclass}}">{{chunk.html_repr()}}</span><br/>
                    {% for op in chunk.operations[1:] %}
                       {% if op.bridge %}
                         <span id="loop-{{op.bridge.no}}" class="guard single-operation">{{op.html_repr()}}</span> <a href="#" onClick="replace_from(this, {{op.bridge.no}})">&gt;&gt;show bridge</a> (taken {{op.percentage}}%)<br/>
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.