+2005-07-25 Eyal Alaluf (eyala@mainsoft.com)
+ * HtmlTextWriter.cs: Make several structs into clases under TARGET_JVM.
+ (Perf issue with array of structs under TARGET_JVM).
+
2005-07-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* TemplateParser.cs: if there are no commas in the assembly name, just
System.Array.Copy(_attrList, rAttrArr, (int) _attrList.Length);\r
_attrList = rAttrArr;\r
}\r
- RenderAttribute rAttr;\r
+#if TARGET_JVM // RenderAttribute is a class and not a struct under TARGET_JVM
+ RenderAttribute rAttr = new RenderAttribute();\r
+#else
+ RenderAttribute rAttr;
+#endif
rAttr.name = name;\r
rAttr.value = value;\r
rAttr.key = key;\r
System.Array.Copy(_styleList, rAttrArr, (int) _styleList.Length);\r
_styleList = rAttrArr;\r
}\r
- RenderStyle rAttr;\r
+#if TARGET_JVM // RenderStyle is a class and not a struct under TARGET_JVM
+ RenderStyle rAttr = new RenderStyle();\r
+#else
+ RenderStyle rAttr;
+#endif
rAttr.name = name;\r
rAttr.value = value;\r
rAttr.key = key;\r
}\r
_styleCount = count;\r
count = 0;\r
- for(int i=0; i <= _attrCount; i++){\r
+ for(int i=0; i < _attrCount; i++){\r
RenderAttribute rAttr = _attrList[i];\r
if (OnAttributeRender(rAttr.name, rAttr.value, rAttr.key)) {\r
count++;\r
System.Array.Copy(_endTags, temp, (int) _endTags.Length);\r
_endTags = temp;\r
}\r
+#if TARGET_JVM // TagStackEntry is a class and not a struct under TARGET_JVM
+ _endTags[_endTagCount] = new TagStackEntry();\r
+#endif
_endTags[_endTagCount].tagKey = _tagKey;\r
_endTags[_endTagCount].endTagText = endTag;\r
_endTagCount++;\r
}\r
} \r
\r
+#if TARGET_JVM
+class RenderAttribute {\r
+#else
struct RenderAttribute {\r
+#endif
public bool encode;\r
public HtmlTextWriterAttribute key;\r
public string name;\r
public string value;\r
} \r
\r
+#if TARGET_JVM
+class RenderStyle {\r
+#else
struct RenderStyle {\r
+#endif
public HtmlTextWriterStyle key;\r
public string name;\r
public string value;\r
}\r
} \r
\r
+#if TARGET_JVM
+class TagStackEntry {\r
+#else
struct TagStackEntry {\r
+#endif
public string endTagText;\r
public HtmlTextWriterTag tagKey;\r
} \r