资 源 简 介
This project aims to develop an in-memory compiler for StringTemplate that will produce a compiled delegate (or a set of delegates) using DynamicMethod/ILGenerator objects of .NET class library, to allow templates run many times faster than their original speed.
To keep the compiler simpler and easier to develop, currently no parser is planned. Compiler will directly walk a StringTemplate object"s in memory chunks, which are simply a set of expression trees.
The compiled delegate will be used in a special subclass of StringTemplate with overriden methods that use the compiled template delegate internally, rather than the actual AST expressions. This will enable a StringTemplate instance to be compiled into another fake StringTemplate instance, and used as if it is the original template, so the code using templates won"t have to be modified. Such functionality will also allow templates to be optionally compiled (with a configuration flag).
StringTemplate is a
文 件 列 表
STCompiler
ActionCompiler.cs
bin
ChunkCompiler.cs
ChunkOptions.cs
CompiledTemplate.cs
Dictionary.cs
Properties
ReflectionCache.cs
STCompiler.csproj
TemplateCompiler.cs
STCompiler.sln
STCompilerTest
bin
ILGenerationTest.cs
Program.cs
Properties
STCompilerTest.csproj
STCompilerTest.csproj.user
StringTemplate
antlr.runtime.dll
Antlr.StringTemplate
Antlr.StringTemplate.Collections
Antlr.StringTemplate.Language
Antlr.StringTemplate.Utils
AssemblyInfo.cs
stringtemplate.build
StringTemplate.csproj
StringTemplate.csproj.user