diff options
author | mikebarnett <unknown> | 2010-06-16 19:03:50 +0000 |
---|---|---|
committer | mikebarnett <unknown> | 2010-06-16 19:03:50 +0000 |
commit | f15733e4485726ea79258d2b6938a33f54a3d36f (patch) | |
tree | 5d5dd5da0f174e4ae52b119cfcd13bd3ee78cdca /BCT/BytecodeTranslator/Program.cs | |
parent | 594a4f45c732e8e7d6beceba5a9c0d390e9f003b (diff) |
Added the factory pattern so that all traversers are created through factory methods. This is the beginning of allowing plugins to perform methodology-specific translations.
Added a CLR traverser that is meant to encode the CLR semantics. For now it just does one thing: add the assertion that a divisor should not be zero.
Added an MS Test project so that we can use that for regression testing.
Diffstat (limited to 'BCT/BytecodeTranslator/Program.cs')
-rw-r--r-- | BCT/BytecodeTranslator/Program.cs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/BCT/BytecodeTranslator/Program.cs b/BCT/BytecodeTranslator/Program.cs index f9e46d0d..452cc114 100644 --- a/BCT/BytecodeTranslator/Program.cs +++ b/BCT/BytecodeTranslator/Program.cs @@ -61,7 +61,8 @@ namespace BytecodeTranslator { #region Pass 3: Translate the code model to BPL
//tmp_BPLGenerator translator = new tmp_BPLGenerator(host, acp);
- ToplevelTraverser translator = new ToplevelTraverser(host.GetContractExtractor(module.ModuleIdentity));
+ var factory = new CLRSemantics();
+ ToplevelTraverser translator = new ToplevelTraverser(factory, host.GetContractExtractor(module.ModuleIdentity));
assembly = module as IAssembly;
if (assembly != null)
translator.Visit(assembly);
|