Permalink
Browse files

Fixing dependency order issue when emitting base types

  • Loading branch information...
1 parent dee5518 commit a54163dd773dc2850a058ee82d6ba165ad906651 Frank Laub committed Sep 5, 2009
@@ -25,6 +25,8 @@ namespace DotWeb.Decompiler.CodeModel
{
public class CodeNamespace : CodeTypeMember
{
+ public static readonly CodeNamespace Default = new CodeNamespace { Name = "" };
+
public CodeNamespace() {
this.Types = new List<CodeTypeDeclaration>();
}
@@ -59,14 +59,14 @@
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
- <Compile Include="TranslationTest_Source.cs">
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
- </Compile>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
+ <Compile Include="TranslationTest_Source.cs">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </Compile>
<Compile Include="TranslationTest.cs" />
<Compile Include="TranslationTestHelper.cs" />
</ItemGroup>
@@ -94,9 +94,8 @@
<Content Include="Expected\DecorationTest\DecorationTest_JsAnonymous.js" />
<Content Include="Expected\DecorationTest\DecorationTest_JsCode.js" />
<Content Include="Expected\NativeTest\NativeTest_TestTuple.js" />
+ <Content Include="Expected\SourceTest\SourceTests_CallDerived.js" />
<Content Include="Expected\SourceTest\SourceTests_CallTakeParameters.js" />
- <Content Include="Expected\SourceTest\SourceTests_EmitOuterClass.js" />
- <Content Include="Expected\SourceTest\SourceTests_EmitInnerClass.js" />
<Content Include="Expected\SourceTest\SourceTests_CreateOuterObject.js" />
<Content Include="Expected\SourceTest\SourceTests_DoWhileLoop.js" />
<Content Include="Expected\SourceTest\SourceTests_AnonymousType.js" />
@@ -1,4 +1,9 @@
-H8.DecorationTests.prototype.TestJsAnonymous = function() {
+if(typeof(H8) == 'undefined') H8 = {};
+
+H8.DecorationTests = function() {
+};
+
+H8.DecorationTests.prototype.TestJsAnonymous = function() {
var loc3 = {};
loc3.X = 1;
loc3.y = 2;
@@ -7,6 +7,9 @@ H8.IntrinsicClass.prototype.$ctor = function() {
return this;
};
+H8.DecorationTests = function() {
+};
+
H8.DecorationTests.prototype.TestJsIntrinsic = function() {
var loc1 = new H8.IntrinsicClass().$ctor();
loc1.Value = 1;
@@ -11,8 +11,6 @@ DefaultNamespaceTest.prototype.set_Value = function(value /*System.Int32*/) {
this._Value_k__BackingField = value;
};
-if(typeof(H8) == 'undefined') H8 = {};
-
Foo.FooNamespaceTest = function() {
};
@@ -32,6 +30,9 @@ Foo.FooNamespaceTest.prototype.get_Value = function() {
return this._Value_k__BackingField;
};
+H8.DecorationTests = function() {
+};
+
H8.DecorationTests.prototype.TestJsNamespace = function() {
var loc2 = new DefaultNamespaceTest().$ctor();
loc2.set_Value(1);
@@ -15,6 +15,11 @@ __f__AnonymousType0$2.prototype.get_Value = function() {
return this._Value_i__Field;
};
+if(typeof(H8) == 'undefined') H8 = {};
+
+H8.SourceTests = function() {
+};
+
H8.SourceTests.prototype.AnonymousType = function() {
var loc0 = new __f__AnonymousType0$2().$ctor("Hi", 1);
console.log("{0}: {1}", loc0.get_Key().get_Length(), loc0.get_Value());
@@ -0,0 +1,40 @@
+if(typeof(H8) == 'undefined') H8 = {};
+
+H8.Base = function() {
+};
+
+H8.Derived = function() {
+ this.$super.constructor();
+};
+H8.Derived.$extend(H8.Base);
+
+H8.Derived.NextId = function() {
+ H8.Derived.counter = H8.Derived.counter + 1;
+ return H8.Derived.counter;
+};
+
+H8.Base.prototype.$ctor = function() {
+ return this;
+};
+
+H8.Derived.prototype.$ctor = function() {
+ this.id = H8.Derived.NextId();
+ this.$super.$ctor.call(this);
+ return this;
+};
+
+H8.Base.prototype.BaseMethod = function() {
+};
+
+H8.Derived.prototype.DerviedMethod = function() {
+ this.BaseMethod();
+};
+
+H8.SourceTests = function() {
+};
+
+H8.SourceTests.prototype.CallDerived = function() {
+ var loc0 = new H8.Derived().$ctor();
+ loc0.DerviedMethod();
+ loc0.BaseMethod();
+};
@@ -1,4 +1,38 @@
-H8.SourceTests.prototype.CreateInnerObject = function() {
+if(typeof(H8) == 'undefined') H8 = {};
+
+H8.SourceTests_InnerClassTest = function() {
+};
+
+H8.SourceTests_InnerClassTest.prototype.set_Text = function(value /*System.String*/) {
+ this._Text_k__BackingField = value;
+};
+
+H8.SourceTests_InnerClassTest.prototype.set_Value = function(value /*System.Int32*/) {
+ this._Value_k__BackingField = value;
+};
+
+H8.SourceTests_InnerClassTest.prototype.$ctor = function(text /*System.String*/, value /*System.Int32*/) {
+ this.set_Text(text);
+ this.set_Value(value);
+ return this;
+};
+
+H8.SourceTests_InnerClassTest.prototype.$ctor = function() {
+ return this;
+};
+
+H8.SourceTests_InnerClassTest.prototype.get_Text = function() {
+ return this._Text_k__BackingField;
+};
+
+H8.SourceTests_InnerClassTest.prototype.get_Value = function() {
+ return this._Value_k__BackingField;
+};
+
+H8.SourceTests = function() {
+};
+
+H8.SourceTests.prototype.CreateInnerObject = function() {
var loc0 = new H8.SourceTests_InnerClassTest().$ctor("Test1", 1);
var loc2 = new H8.SourceTests_InnerClassTest().$ctor();
loc2.set_Text("Test2");
@@ -1,4 +1,38 @@
-H8.SourceTests.prototype.CreateOuterObject = function() {
+if(typeof(H8) == 'undefined') H8 = {};
+
+H8.OuterClassTest = function() {
+};
+
+H8.OuterClassTest.prototype.set_Text = function(value /*System.String*/) {
+ this._Text_k__BackingField = value;
+};
+
+H8.OuterClassTest.prototype.set_Value = function(value /*System.Int32*/) {
+ this.m_value = value;
+};
+
+H8.OuterClassTest.prototype.$ctor = function(text /*System.String*/, value /*System.Int32*/) {
+ this.set_Text(text);
+ this.set_Value(value);
+ return this;
+};
+
+H8.OuterClassTest.prototype.$ctor = function() {
+ return this;
+};
+
+H8.OuterClassTest.prototype.get_Text = function() {
+ return this._Text_k__BackingField;
+};
+
+H8.OuterClassTest.prototype.get_Value = function() {
+ return this.m_value;
+};
+
+H8.SourceTests = function() {
+};
+
+H8.SourceTests.prototype.CreateOuterObject = function() {
var loc0 = new H8.OuterClassTest().$ctor("Test1", 1);
var loc2 = new H8.OuterClassTest().$ctor();
loc2.set_Text("Test2");
@@ -1,28 +0,0 @@
-H8.SourceTests_InnerClassTest = function() {
-};
-
-H8.SourceTests_InnerClassTest.prototype.get_Text = function() {
- return this._Text_k__BackingField;
-};
-
-H8.SourceTests_InnerClassTest.prototype.set_Text = function(value /*System.String*/) {
- this._Text_k__BackingField = value;
-};
-
-H8.SourceTests_InnerClassTest.prototype.get_Value = function() {
- return this._Value_k__BackingField;
-};
-
-H8.SourceTests_InnerClassTest.prototype.set_Value = function(value /*System.Int32*/) {
- this._Value_k__BackingField = value;
-};
-
-H8.SourceTests_InnerClassTest.prototype.$ctor = function() {
- return this;
-};
-
-H8.SourceTests_InnerClassTest.prototype.$ctor = function(text /*System.String*/, value /*System.Int32*/) {
- this.set_Text(text);
- this.set_Value(value);
- return this;
-};
@@ -1,28 +0,0 @@
-H8.OuterClassTest = function() {
-};
-
-H8.OuterClassTest.prototype.get_Text = function() {
- return this._Text_k__BackingField;
-};
-
-H8.OuterClassTest.prototype.set_Text = function(value /*System.String*/) {
- this._Text_k__BackingField = value;
-};
-
-H8.OuterClassTest.prototype.get_Value = function() {
- return this.m_value;
-};
-
-H8.OuterClassTest.prototype.set_Value = function(value /*System.Int32*/) {
- this.m_value = value;
-};
-
-H8.OuterClassTest.prototype.$ctor = function() {
- return this;
-};
-
-H8.OuterClassTest.prototype.$ctor = function(text /*System.String*/, value /*System.Int32*/) {
- this.set_Text(text);
- this.set_Value(value);
- return this;
-};
Oops, something went wrong.

0 comments on commit a54163d

Please sign in to comment.