You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by jo...@apache.org on 2019/08/19 16:30:22 UTC

[royale-compiler] 01/02: compiler: remove old diagnostics

This is an automated email from the ASF dual-hosted git repository.

joshtynjala pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-compiler.git

commit 6048e84b17692b40b5a9a3e1ecfaf89330687e09
Author: Josh Tynjala <jo...@apache.org>
AuthorDate: Mon Aug 19 09:24:23 2019 -0700

    compiler: remove old diagnostics
---
 .../royale/abc/semantics/ControlFlowGraph.java     | 40 ----------------------
 .../royale/abc/semantics/MethodBodyInfo.java       |  7 ----
 2 files changed, 47 deletions(-)

diff --git a/compiler/src/main/java/org/apache/royale/abc/semantics/ControlFlowGraph.java b/compiler/src/main/java/org/apache/royale/abc/semantics/ControlFlowGraph.java
index 14c9c00..4f2800d 100644
--- a/compiler/src/main/java/org/apache/royale/abc/semantics/ControlFlowGraph.java
+++ b/compiler/src/main/java/org/apache/royale/abc/semantics/ControlFlowGraph.java
@@ -327,55 +327,15 @@ public class ControlFlowGraph implements IFlowgraph
      */
     public void traverseGraph(IFlowGraphVisitor visitor)
     {
-    	boolean diagnostics = false;
-    	if (mbi.getMethodInfo() != null &&
-    			mbi.getMethodInfo().getMethodName() != null &&
-    			mbi.getMethodInfo().getMethodName().contentEquals("dispatchEvent") &&
-    			mbi.getMethodInfo().getParamNames().contains("event1"))
-    	{
-    		Iterator<IBasicBlock> blocks = this.blocksInControlFlowOrder().iterator();
-    		int blockCount = 0;
-    		while (blocks.hasNext())
-    		{
-    			blockCount++;
-    			blocks.next();
-    		}
-    		IBasicBlock[] blocklist = new IBasicBlock[blockCount];
-    		blocks = this.blocksInControlFlowOrder().iterator();
-    		blockCount = 0;
-    		while (blocks.hasNext())
-    		{
-    			blocklist[blockCount++] = blocks.next();
-    		}    		
-    		System.out.println("blockCount is: " + blockCount);
-    		diagnostics = true;
-    	}
-    	int blockIndex = 0;
         for (IBasicBlock b : this.blocksInControlFlowOrder())
         {
-        	if (diagnostics)
-        	{
-        		System.out.println("block " + blockIndex);
-        		System.out.println(b.getInstructions());
-        	}
             if (visitor.visitBlock(b))
             {
-            	if (diagnostics)
-            		System.out.println("visiting block: " + blockIndex);
                 for (Instruction i : b.getInstructions())
                     visitor.visitInstruction(i);
 
                 visitor.visitEnd(b);
-                if (diagnostics)
-                {
-                	if (visitor instanceof FrameCountVisitor)
-                	{
-                		System.out.println("max_scope is now:" + ((FrameCountVisitor)visitor).max_scope);
-                		System.out.println("scpDepth is now:" + ((FrameCountVisitor)visitor).scpdepth);
-                	}
-                }
             }
-    		blockIndex++;
         }
     }
 
diff --git a/compiler/src/main/java/org/apache/royale/abc/semantics/MethodBodyInfo.java b/compiler/src/main/java/org/apache/royale/abc/semantics/MethodBodyInfo.java
index 540c132..fcf53d4 100644
--- a/compiler/src/main/java/org/apache/royale/abc/semantics/MethodBodyInfo.java
+++ b/compiler/src/main/java/org/apache/royale/abc/semantics/MethodBodyInfo.java
@@ -219,13 +219,6 @@ public class MethodBodyInfo
         FrameCountVisitor counts = new FrameCountVisitor(this, diagnosticsVisitor, this.initial_scope);
         getCfg().traverseGraph(counts);
 
-        if (this.getMethodInfo().getMethodName() != null &&
-        		this.getMethodInfo().getMethodName().contentEquals("dispatchEvent") &&
-        		this.getMethodInfo().getParamNames() != null &&
-        		this.getMethodInfo().getParamNames().contains("event1"))
-        {
-        	System.out.println("ComputedFrameCounts: " + counts.max_scope + " " + this.max_scope );
-        }
         // Grrr..  TODO when we tighten up the max_stack,
         // max_scope, etc for code we read out of the flex
         // framework we seem to break that code.