コード例 #1
0
		public override void  label(Label label)
		{
			LabelEntry entry = labels.getLabelEntry(label);
			if (entry.source == null)
			{
				// have not seen any actions that target this label yet, and that
				// means the source can only be a backwards branch
				entry.name = "L" + System.Convert.ToString(labelCount++);
				indent();
				out_Renamed.WriteLine(entry.name + ":");
			}
			else
			{
				switch (entry.source.code)
				{
					
					case Flash.Swf.ActionConstants.sactionTry: 
						Try t = (Try) entry.source;
						indent_Renamed_Field--;
						indent();
						out_Renamed.WriteLine("}");
						indent();
						if (label == t.endTry && t.hasCatch())
						{
							out_Renamed.WriteLine("catch(" + (t.hasRegister()?"$" + t.catchReg:t.catchName) + ") {");
							indent_Renamed_Field++;
						}
						else if ((label == t.endTry || label == t.endCatch) && t.hasFinally())
						{
							out_Renamed.WriteLine("finally {");
							indent_Renamed_Field++;
						}
						break;
					
					case Flash.Swf.ActionConstants.sactionWaitForFrame: 
					case Flash.Swf.ActionConstants.sactionWaitForFrame2: 
					case Flash.Swf.ActionConstants.sactionWith: 
						// end of block
						indent_Renamed_Field--;
						indent();
						out_Renamed.WriteLine("}");
						break;
					
					case Flash.Swf.ActionConstants.sactionIf: 
					case Flash.Swf.ActionConstants.sactionJump: 
						indent();
						out_Renamed.WriteLine(entry.name + ":");
						break;
					
					default:
						System.Diagnostics.Debug.Assert(false);
						break;
					
				}
			}
		}
コード例 #2
0
		public virtual void  label(Label label)
		{
		}
コード例 #3
0
			internal virtual LabelEntry getLabelEntry(Label l)
			{
				LabelEntry entry = (LabelEntry) this[l];
				if (entry == null)
				{
					entry = new LabelEntry(null, null);
					System.Object tempObject;
					tempObject = this[l];
					this[l] = entry;
					System.Object generatedAux2 = tempObject;
				}
				return entry;
			}