rsdn/nemerle — Issue #179: PegGrammar EmitDebugSources crashes debug builds
Author: don-reba
Created: 2011-11-17 06:13:18+00:00
State: open

Enabling this option crashes the compiler. Here is a sample parser and the error:

using Nemerle.Collections;
using Nemerle.Peg;
using System.Collections.Generic;
using System;

[PegGrammar
( Options = EmitDebugSources
, Spec
, grammar
{
Spec : object = "Hello World";
}
)]
public class Parser
{
private Spec(_ : NToken) : object
{
null;
}
}

_ = Parser().Parse("VERSION 1.0-SP1");

---------------------------
Assertion Failed: Abort=Quit, Retry=Debug, Ignore=Continue
---------------------------

at _N__N_lambda__69941__69960.apply_void(Int32 id, TExpr v) c:\Users\Alexey\Programming\Nemerle\ncc\generation\ILEmitter.n(139)
at FunctionVoid`2.apply_void(Tuple`2 o) c:\Users\Alexey\Programming\Nemerle\lib\internal-numbered.n(144)
at Hashtable`2.Iter(FunctionVoid`2 f) c:\Users\Alexey\Programming\Nemerle\lib\hashtable.n(277)
at ILEmitter.Run() c:\Users\Alexey\Programming\Nemerle\ncc\generation\ILEmitter.n(142)
at _N__N_lambda__66571__66679.apply_void() c:\Users\Alexey\Programming\Nemerle\ncc\generation\HierarchyEmitter.n(857)
at TypeBuilder.BeforeFinalizeType() c:\Users\Alexey\Programming\Nemerle\ncc\hierarchy\TypeBuilder.n(1771)
at TypeBuilder.FinalizeType() c:\Users\Alexey\Programming\Nemerle\ncc\hierarchy\TypeBuilder.n(1777)
at TypeBuilder.EmitImplementation() c:\Users\Alexey\Programming\Nemerle\ncc\generation\HierarchyEmitter.n(679)
at _N_emit_impl__59658.apply_void(TypeBuilder ti) c:\Users\Alexey\Programming\Nemerle\ncc\generation\HierarchyEmitter.n(371)
at _N_maybe_f__59893.apply_void(TypeBuilder ti) c:\Users\Alexey\Programming\Nemerle\ncc\hierarchy\TypesManager.n(258)
at NList.Iter(list`1 l, FunctionVoid`1 f) c:\Users\Alexey\Programming\Nemerle\lib\list.n(926)
at list`1.Iter(FunctionVoid`1 f) c:\Users\Alexey\Programming\Nemerle\lib\list.n(318)
at TypesManager.Iter(list`1 builders, FunctionVoid`1 f) c:\Users\Alexey\Programming\Nemerle\ncc\hierarchy\TypesManager.n(265)
at TypesManager.Iter(FunctionVoid`1 f) c:\Users\Alexey\Programming\Nemerle\ncc\hierarchy\TypesManager.n(276)
at TypesManager.compile_all_tyinfos(Boolean aux_phase) c:\Users\Alexey\Programming\Nemerle\ncc\generation\HierarchyEmitter.n(403)
at _N__N_lambda__59080__59184.apply_void() c:\Users\Alexey\Programming\Nemerle\ncc\generation\HierarchyEmitter.n(241)
at Solver.Enqueue(FunctionVoid action) c:\Users\Alexey\Programming\Nemerle\ncc\typing\Solver.n(201)
at TypesManager.EmitDecls() c:\Users\Alexey\Programming\Nemerle\ncc\generation\HierarchyEmitter.n(261)
at ManagerClass.Run() c:\Users\Alexey\Programming\Nemerle\ncc\passes.n(609)
at MainClass.main_with_catching() c:\Users\Alexey\Programming\Nemerle\ncc\main.n(131)
at ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at ThreadHelper.ThreadStart()

---------------------------
Abort Retry Ignore
---------------------------