Today, I have uploaded change Set 30945, version 0.5.3.32871, built with DLR Changeset 32871. It could be downloaded from the source tab of http://www.dotneteer.com/aspclassiccompiler. The following are a summary of changes:
- Now ASP Classic Compiler would run under medium trust or Windows Azure partial-trust. Partial-trust is the default trust level of Windows Azure. Windows Azure does not support asp classic. Windows Azure supprots php but requires full-trust. Asp Classic Compiler is the only way to run asp page on Azure without changing the trust level.
- Azure sample uploaded. We modified only one view /home/index.asp but that is enough to prove the concept.
- Variable initialization in declaration statement as a VBScript extension. For example: dim s = new system.text.stringbuilder()
- Add the operator overloading through extension methods. C# supports extension methods, but not "extension operators". We added this support so that we can add new behavior without the need to modify our binders. Some typical asp code would now run much faster by a simple change. For example, asp pages often have codes like:
<%
dim s
dim i
s = "<table>"
for i = 1 to 12
s = s + "<tr>"
s = s + "<td>" + i + "</td>"
s = s + "<td>" + MonthName(i) + "</td>"
s = s + "</tr>"
next
s = s + "</table>"
response.Write(s)
%>
This code is slow because the runtime kept creating new string and discard the one one. Now we just need a simple change:
<%
imports system
dim s = new system.text.stringbuilder()
dim i
s = s + "<table>"
for i = 1 to 12
s = s + "<tr>"
s = s + "<td>" + i + "</td>"
s = s + "<td>" + MonthName(i) + "</td>"
s = s + "</tr>"
next
s = s + "</table>"
response.Write(s)
%>
Note that we added "+" operator as an extension operator for the class System.Text.StringBuilder.