jfd16 / mariana Goto Github PK
View Code? Open in Web Editor NEWActionScript 3 runtime for .NET
License: MIT License
ActionScript 3 runtime for .NET
License: MIT License
Hello, experimented with inheritance and got an error
Unhandled exception. System.ArgumentException: The key 'class Parent' does not exist in the dictionary. (Parameter 'key')
at Mariana.Common.ReferenceDictionary`2.getValueRef(TKey key, Boolean createIfNotExists) in E:\Work\Programing\NetProjects\Mariana-main\Mariana.Common\src\ReferenceDictionary.cs:line 162
at Mariana.Common.ReferenceDictionary`2.get_Item(TKey key) in E:\Work\Programing\NetProjects\Mariana-main\Mariana.Common\src\ReferenceDictionary.cs:line 74
at Mariana.AVM2.Compiler.ScriptCompileContext._createClassDefIfInContext(Class klass) in E:\Work\Programing\NetProjects\Mariana-main\Mariana.AVM2\src\Compiler\ScriptCompileContext.cs:line 512
at Mariana.AVM2.Compiler.ScriptCompileContext._createClassDefIfInContext(Class klass) in E:\Work\Programing\NetProjects\Mariana-main\Mariana.AVM2\src\Compiler\ScriptCompileContext.cs:line 540
at Mariana.AVM2.Compiler.ScriptCompileContext.compileFile(ABCFile file) in E:\Work\Programing\NetProjects\Mariana-main\Mariana.AVM2\src\Compiler\ScriptCompileContext.cs:line 249
at Mariana.AVM2.Compiler.ScriptLoader.compile(ABCFile abcFile) in E:\Work\Programing\NetProjects\Mariana-main\Mariana.AVM2\src\Compiler\ScriptLoader.cs:line 68
Example code:
// Parent.as
public class Parent {}
// Child.as
public class Child extends Parent {}
// Main.as
public class Main
{
public static function main():void
{
new Child();
}
}
After fix #2 I tried to run this example:
// Test.as
public class Test { }
// Main.as
public class Main
{
public static function main():void
{
new Test();
}
}
And got an error:
Process terminated. Assertion failed.
at Mariana.AVM2.Core.MethodTrait.get_underlyingMethodInfo() in E:\Work\Programing\NetProjects\Mariana-main\Mariana.AVM2\src\Core\MethodTrait.cs:line 51
at Mariana.AVM2.Core.RuntimeDispatch.generateMethodStub(MethodTrait method) in E:\Work\Programing\NetProjects\Mariana-main\Mariana.AVM2\src\Core\RuntimeDispatch.cs:line 209
at Mariana.AVM2.Core.MethodTrait.<.ctor>b__10_0() in E:\Work\Programing\NetProjects\Mariana-main\Mariana.AVM2\src\Core\MethodTrait.cs:line 39
at Mariana.Common.LazyInitObject`1._internalGetValue() in E:\Work\Programing\NetProjects\Mariana-main\Mariana.Common\src\LazyInitObject.cs:line 179
at Mariana.AVM2.Core.MethodTrait.tryInvoke(ASAny target, ASAny receiver, ReadOnlySpan`1 args, ASAny& result) in E:\Work\Programing\NetProjects\Mariana-main\Mariana.AVM2\src\Core\MethodTrait.cs:line 226
at Mariana.AVM2.Core.Trait.invoke(ASAny target, ASAny receiver, ReadOnlySpan`1 args) in E:\Work\Programing\NetProjects\Mariana-main\Mariana.AVM2\src\Core\Trait.cs:line 225
at Mariana.AVM2.Core.Trait.invoke(ASAny target, ReadOnlySpan`1 args) in E:\Work\Programing\NetProjects\Mariana-main\Mariana.AVM2\src\Core\Trait.cs:line 214
at Mariana.AVM2.Core.Trait.invoke(ReadOnlySpan`1 args) in E:\Work\Programing\NetProjects\Mariana-main\Mariana.AVM2\src\Core\Trait.cs:line 251
Hello, I tried to use Mariana with Mono x64
var domain = new ApplicationDomain();
var loader = domain.createScriptLoader();
And got an error:
System.TypeInitializationException: The type initializer for 'Mariana.CodeGen.TypeSignature' threw an exception. ---> System.IndexOutOfRangeException: Index was outside the bounds of the array.
at Mariana.Common.ReferenceDictionary`2[TKey,TValue].getValueRef (TKey key, System.Boolean createIfNotExists) [0x001a4] in <cc2e8d4f9c6949a2bc4d71339b5ea90d>:0
at Mariana.Common.ReferenceDictionary`2[TKey,TValue].set_Item (TKey key, TValue value) [0x00000] in <cc2e8d4f9c6949a2bc4d71339b5ea90d>:0
at Mariana.CodeGen.TypeSignature..cctor () [0x000d5] in <c09d1fe0ee5649bc956390c8abb3bbf4>:0
--- End of inner exception stack trace ---
at Mariana.CodeGen.TypeBuilder..ctor (Mariana.CodeGen.TypeName name, System.Reflection.TypeAttributes attrs, System.Boolean isValueType, System.Int32 genParamCount, Mariana.CodeGen.MetadataContext metadataContext, System.Reflection.Metadata.EntityHandle handle) [0x00050] in <c09d1fe0ee5649bc956390c8abb3bbf4>:0
at Mariana.CodeGen.AssemblyBuilder.defineType (Mariana.CodeGen.TypeName name, System.Reflection.TypeAttributes attrs, System.Boolean isValueType, System.Int32 genParamCount) [0x000c4] in <c09d1fe0ee5649bc956390c8abb3bbf4>:0
at Mariana.AVM2.Compiler.EmitConstantData..ctor (Mariana.AVM2.Core.ApplicationDomain domain, Mariana.CodeGen.AssemblyBuilder assembly) [0x0009c] in <6b026edf6062485896980f8dde41b4f4>:0
at Mariana.AVM2.Compiler.ScriptCompileContext._initAssemblyBuilder () [0x00087] in <6b026edf6062485896980f8dde41b4f4>:0
at Mariana.AVM2.Compiler.ScriptCompileContext..ctor (Mariana.AVM2.Core.ApplicationDomain domain, Mariana.AVM2.Compiler.ScriptCompileOptions options) [0x00170] in <6b026edf6062485896980f8dde41b4f4>:0
at Mariana.AVM2.Compiler.ScriptLoader..ctor (Mariana.AVM2.Core.ApplicationDomain appDomain, Mariana.AVM2.Compiler.ScriptCompileOptions compileOptions) [0x00014] in <6b026edf6062485896980f8dde41b4f4>:0
at Mariana.AVM2.Core.ApplicationDomain.createScriptLoader (Mariana.AVM2.Compiler.ScriptCompileOptions compileOptions) [0x00028] in <6b026edf6062485896980f8dde41b4f4>:0
at MarianaTest.Program.Main (System.String[] args) [0x00008] in <c6f2dbc68fda4bef8cb2dfe5dbe6a2f2>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.TypeInitializationException: The type initializer for 'Mariana.CodeGen.TypeSignature' threw an exception. ---> System.IndexOutOfRangeException: Index was outside the bounds of the array.
at Mariana.Common.ReferenceDictionary`2[TKey,TValue].getValueRef (TKey key, System.Boolean createIfNotExists) [0x001a4] in <cc2e8d4f9c6949a2bc4d71339b5ea90d>:0
at Mariana.Common.ReferenceDictionary`2[TKey,TValue].set_Item (TKey key, TValue value) [0x00000] in <cc2e8d4f9c6949a2bc4d71339b5ea90d>:0
at Mariana.CodeGen.TypeSignature..cctor () [0x000d5] in <c09d1fe0ee5649bc956390c8abb3bbf4>:0
--- End of inner exception stack trace ---
at Mariana.CodeGen.TypeBuilder..ctor (Mariana.CodeGen.TypeName name, System.Reflection.TypeAttributes attrs, System.Boolean isValueType, System.Int32 genParamCount, Mariana.CodeGen.MetadataContext metadataContext, System.Reflection.Metadata.EntityHandle handle) [0x00050] in <c09d1fe0ee5649bc956390c8abb3bbf4>:0
at Mariana.CodeGen.AssemblyBuilder.defineType (Mariana.CodeGen.TypeName name, System.Reflection.TypeAttributes attrs, System.Boolean isValueType, System.Int32 genParamCount) [0x000c4] in <c09d1fe0ee5649bc956390c8abb3bbf4>:0
at Mariana.AVM2.Compiler.EmitConstantData..ctor (Mariana.AVM2.Core.ApplicationDomain domain, Mariana.CodeGen.AssemblyBuilder assembly) [0x0009c] in <6b026edf6062485896980f8dde41b4f4>:0
at Mariana.AVM2.Compiler.ScriptCompileContext._initAssemblyBuilder () [0x00087] in <6b026edf6062485896980f8dde41b4f4>:0
at Mariana.AVM2.Compiler.ScriptCompileContext..ctor (Mariana.AVM2.Core.ApplicationDomain domain, Mariana.AVM2.Compiler.ScriptCompileOptions options) [0x00170] in <6b026edf6062485896980f8dde41b4f4>:0
at Mariana.AVM2.Compiler.ScriptLoader..ctor (Mariana.AVM2.Core.ApplicationDomain appDomain, Mariana.AVM2.Compiler.ScriptCompileOptions compileOptions) [0x00014] in <6b026edf6062485896980f8dde41b4f4>:0
at Mariana.AVM2.Core.ApplicationDomain.createScriptLoader (Mariana.AVM2.Compiler.ScriptCompileOptions compileOptions) [0x00028] in <6b026edf6062485896980f8dde41b4f4>:0
at Test.Program.Main (System.String[] args) [0x00008] in <c6f2dbc68fda4bef8cb2dfe5dbe6a2f2>:0
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.