Re: JScript engine as a COM (internal compiler error during the 1st compilation) -
07-25-2003
, 07:06 AM
I have made a bit more "research" and found the "real" cause is
assigning 0 to a variable :
..
..
var a = 0;
..
..
wherever in the script makes the error. When I assign something else,
it works. It has nothing to do with cycles, but with this assignment.
To be complete, there is the exception thrown :
Microsoft.Vsa.VsaException: InternalCompilerError (0x80133021):
System.DivideByZeroException: Attempted to divide by zero.
at Microsoft.JScript.ConstantWrapper.TranslateToIL(IL Generator il,
Object val, Type rtype)
at Microsoft.JScript.ConstantWrapper.TranslateToIL(IL Generator il,
Type rtype)
at Microsoft.JScript.Binding.TranslateToILSet(ILGener ator il, AST
rhvalue)
at Microsoft.JScript.Lookup.TranslateToILSet(ILGenera tor il,
Boolean doBoth, AST rhvalue)
at Microsoft.JScript.VariableDeclaration.TranslateToI L(ILGenerator
il, Type rtype)
at Microsoft.JScript.Block.TranslateToIL(ILGenerator il, Type
rtype)
at Microsoft.JScript.Block.TranslateToIL(ILGenerator il, Type
rtype)
at Microsoft.JScript.FunctionObject.TranslateToIL(Com pilerGlobals
compilerGlobals)
at Microsoft.JScript.FunctionDeclaration.TranslateToI LInitializer(ILGenerator
il)
at Microsoft.JScript.Block.TranslateToILInstanceIniti alizers(ILGenerator
il)
at Microsoft.JScript.Class.TranslateToCOMPlusClass()
at Microsoft.JScript.Class.TranslateToIL(ILGenerator il, Type
rtype)
at Microsoft.JScript.Block.TranslateToIL(ILGenerator il, Type
rtype)
at Microsoft.JScript.ScriptBlock.TranslateToIL(ILGene rator il, Type
rtype)
at Microsoft.JScript.ScriptBlock.TranslateToILClass(C ompilerGlobals
compilerGlobals)
at Microsoft.JScript.VsaStaticCode.TranslateToIL()
at Microsoft.JScript.Vsa.VsaEngine.DoCompile()
at Microsoft.Vsa.BaseVsaEngine.Compile()
at XB.Extensions.ScriptEngine.ScriptSite.Compile(Stri ng p_name,
String p_source_text)
in c:\\...\\vsasite.cs:line 164
at XB.Extensions.ScriptEngine.ScriptEngine.Compile(St ring p_name,
String p_source)
in c:\\...\\comaccess.cs:line 68
- Marek |