Example #1
0
            protected void PushLocation(Node node)
            {
#if DEBUG || DIAGNOSE
                if (!JSRuntime.Instance.Configuration.EnableDiagLocation)
                {
                    return;
                }
                //Errors may occur both during compilation or execution, so we push location now, and also generate code for execution time
                JSRuntime.PushLocation(_currFuncMetadata, node.SourceOffset);
                if (_ilGen != null)
                {
                    Ldarg_func();
                    _ilGen.Call(Types.DFunction.GetMetadata);
                    _ilGen.Castclass(Types.JSFunctionMetadata.TypeOf);
                    _ilGen.Ldc_I4(node.SourceOffset);
                    _ilGen.Call(Types.JSRuntime.PushLocation);
                }
#endif
            }