Jump to page: 1 2
Thread overview
Weird Compile Error
Feb 13, 2005
John Demme
Feb 13, 2005
Chris Sauls
Feb 13, 2005
John Demme
Feb 13, 2005
Chris Sauls
Feb 13, 2005
John Demme
Feb 15, 2005
Walter
Feb 15, 2005
John Demme
Re: Weird Compile Error [test case]
Feb 15, 2005
John Demme
Feb 14, 2005
John Demme
Feb 14, 2005
John Demme
Feb 14, 2005
Chris Sauls
Feb 14, 2005
John Reimer
Feb 14, 2005
John Reimer
Feb 14, 2005
John Demme
February 13, 2005
OK... This error message has me totally confused:
src/com/neuralnexus/nnengine/nodeweb.d(436): function com.neuralnexus.nnengine.nodeweb.nnWebNode.getImmediateChildren cannot access frame of function __funclit9

????

I'm running DMD 0.113 on Linux.

Thanks
John
February 13, 2005
Sounds like you're trying to do something strange with a function literal.  Can you show the body of nnWebNode.getImmediateChildren ?

-- Chris S

John Demme wrote:
> OK... This error message has me totally confused:
> src/com/neuralnexus/nnengine/nodeweb.d(436): function com.neuralnexus.nnengine.nodeweb.nnWebNode.getImmediateChildren cannot access frame of function __funclit9
> 
> ????
> 
> I'm running DMD 0.113 on Linux.
> 
> Thanks
> John
February 13, 2005
public nnWebNode[] getImmediateChildren()
	{
		if (this == nodes.pcRel || this == nodes.cRel || this == nodes.pRel)
		{
			nnWebNode[] ret = linkedNodes.keys.dup;
			if (this == nodes.pcRel)
			{
				ret ~= nodes.cRel;
				ret ~= nodes.pRel;
			}
		}
		else
		{
			nnWebNode[] pcRels = getLinkedPCRelChildren();
			nnWebNode[] pRels = getLinkedPRelChildren();
			nnWebNode[] gpcRels;
			
			foreach(nnWebNode pcRel; pcRels)
				foreach(nnWebNode pRel; pRels)
					if (pcRel.isLinkedTo(pRel))
						gpcRels ~= pcRel;
			
			nnWebNode[] ret;
			foreach(nnWebNode pcRel; gpcRels)
			{
				nnWebNode[] cRels = pcRel.getLinkedCRelChildren();
				foreach(nnWebNode cRel; cRels)
					foreach(nnWebNode lNode; cRel.getLinkedNodes())
						if (pcRel.isLinkedTo(lNode))
							ret ~= lNode;
			}
			
			if (this == nodes.Rel)
				ret ~= nodes.pcRel;
			return ret;
		}
	}


I was going to post it originally, but it's a pretty mundane function. Also of note is that this compiled no problem with previous versions of DMD.  I haven't touched the code in awhile, so I'm not sure when it stopped working.

John
Chris Sauls wrote:
> Sounds like you're trying to do something strange with a function literal.  Can you show the body of nnWebNode.getImmediateChildren ?
> 
> -- Chris S
> 
> John Demme wrote:
> 
>> OK... This error message has me totally confused:
>> src/com/neuralnexus/nnengine/nodeweb.d(436): function com.neuralnexus.nnengine.nodeweb.nnWebNode.getImmediateChildren cannot access frame of function __funclit9
>>
>> ????
>>
>> I'm running DMD 0.113 on Linux.
>>
>> Thanks
>> John
February 13, 2005
Hmm... wow, now I'm confused.  Don't see any use of func literals in there at all.  Suddenly I see why you asked about it on the newsgroup. Which line is #436, btw?

And is there a special reason (just something I noted when scanning it and mentally compiling) why 'nnWebNode[] ret' is defined seperately in the if and else blocks?

-- Chris S
February 13, 2005
Chris Sauls wrote:
> Hmm... wow, now I'm confused.  Don't see any use of func literals in there at all.  Suddenly I see why you asked about it on the newsgroup. Which line is #436, btw?
436 is the first line- the function declaration.

> 
> And is there a special reason (just something I noted when scanning it and mentally compiling) why 'nnWebNode[] ret' is defined seperately in the if and else blocks?
> 
> -- Chris S

No reason...  I just changed it to see if it made any difference in compilation... it didn't.

John
February 14, 2005
Alright.. I've got another clue, although I haven't been able to boil it down to a short test case.

I've got a struct, called "Nodes" and then, first thing in the module, I've got:
Nodes nodes;
To create a global instance of the struct.

Any function that uses this struct seems to fail on this error.

Any suggestions?  Please?

John

John Demme wrote:
> OK... This error message has me totally confused:
> src/com/neuralnexus/nnengine/nodeweb.d(436): function com.neuralnexus.nnengine.nodeweb.nnWebNode.getImmediateChildren cannot access frame of function __funclit9
> 
> ????
> 
> I'm running DMD 0.113 on Linux.
> 
> Thanks
> John
February 14, 2005
OK... I fixed the problem by modifying that line from:
public Node nodes;
to
public static Node nodes;

John Demme wrote:
> Alright.. I've got another clue, although I haven't been able to boil it down to a short test case.
> 
> I've got a struct, called "Nodes" and then, first thing in the module, I've got:
> Nodes nodes;
> To create a global instance of the struct.
> 
> Any function that uses this struct seems to fail on this error.
> 
> Any suggestions?  Please?
> 
> John
> 
> John Demme wrote:
> 
>> OK... This error message has me totally confused:
>> src/com/neuralnexus/nnengine/nodeweb.d(436): function com.neuralnexus.nnengine.nodeweb.nnWebNode.getImmediateChildren cannot access frame of function __funclit9
>>
>> ????
>>
>> I'm running DMD 0.113 on Linux.
>>
>> Thanks
>> John
February 14, 2005
Hmm.  Odd.
A) I wouldn't think that would have to be static... but oh well, that shouldn't hurt it any at all.
B) The error message sure didn't give /any/ clues at all.  Obviously, considering my initial intuitive response was, "Oh, something wrong with a function literal?"  I think maybe the compiler misdiagnosed.

Bug.

-- Chris S

John Demme wrote:
> OK... I fixed the problem by modifying that line from:
> public Node nodes;
> to
> public static Node nodes;
> 
> John Demme wrote:
> 
>> Alright.. I've got another clue, although I haven't been able to boil it down to a short test case.
>>
>> I've got a struct, called "Nodes" and then, first thing in the module, I've got:
>> Nodes nodes;
>> To create a global instance of the struct.
>>
>> Any function that uses this struct seems to fail on this error.
>>
>> Any suggestions?  Please?
>>
>> John
>>
>> John Demme wrote:
>>
>>> OK... This error message has me totally confused:
>>> src/com/neuralnexus/nnengine/nodeweb.d(436): function com.neuralnexus.nnengine.nodeweb.nnWebNode.getImmediateChildren cannot access frame of function __funclit9
>>>
>>> ????
>>>
>>> I'm running DMD 0.113 on Linux.
>>>
>>> Thanks
>>> John
February 14, 2005
Strange.

I wonder why the non-static version causes the "funclit" error.

As for the Node struct, perhaps, without the static designation, it can't be accessed properly outside of its module;  the d manual states:

"Static data has only one instance for the entire program, not once per object."

So what does this imply for non-static module level instances of a struct?  Is access to them limited to the module only?  It would be nice to know a few more nitty gritty details here about how the compiler works.

-John R.



John Demme wrote:
> OK... I fixed the problem by modifying that line from:
> public Node nodes;
> to
> public static Node nodes;
> 
> John Demme wrote:
> 
>> Alright.. I've got another clue, although I haven't been able to boil it down to a short test case.
>>
>> I've got a struct, called "Nodes" and then, first thing in the module, I've got:
>> Nodes nodes;
>> To create a global instance of the struct.
>>
>> Any function that uses this struct seems to fail on this error.
>>
>> Any suggestions?  Please?
>>
>> John
>>
>> John Demme wrote:
>>
>>> OK... This error message has me totally confused:
>>> src/com/neuralnexus/nnengine/nodeweb.d(436): function com.neuralnexus.nnengine.nodeweb.nnWebNode.getImmediateChildren cannot access frame of function __funclit9
>>>
>>> ????
>>>
>>> I'm running DMD 0.113 on Linux.
>>>
>>> Thanks
>>> John
February 14, 2005
Chris Sauls wrote:
> Hmm.  Odd.
> A) I wouldn't think that would have to be static... but oh well, that shouldn't hurt it any at all.
> B) The error message sure didn't give /any/ clues at all.  Obviously, considering my initial intuitive response was, "Oh, something wrong with a function literal?"  I think maybe the compiler misdiagnosed.
> 
> Bug.

Either it's a misdiagnosed error, or it's a valid error for something the compiler is doing behind the scenes.
« First   ‹ Prev
1 2