Developer forums (C::B DEVELOPMENT STRICTLY!) > CodeCompletion redesign
Rewrote the DoParse function
Loaden:
I rewrote the DoParse function, replace "else if" to "switch, case", found that performance has improved.
And now, the DoParse function like this:
--- Code: ---void ParserThread::DoParse()
{
...
bool switchHandled = true;
switch (token.Length())
{
case 1:
if (token == ParserConsts::semicolon)
{
...
}
else if (token == ParserConsts::dot
|| (token == ParserConsts::gt && m_LastToken == ParserConsts::dash))
{
...
}
else if (token == ParserConsts::opbrace)
{
...
}
else if (token == ParserConsts::clbrace)
{
...
}
else if (token == ParserConsts::colon)
{
...
}
else if (token == ParserConsts::hash)
{
...
}
else
switchHandled = false;
break;
case 2:
if (token == ParserConsts::kw_if || token == ParserConsts::kw_do)
{
...
}
else
switchHandled = false;
break;
case 3:
if (token == ParserConsts::kw_for)
{
...
}
else
switchHandled = false;
break;
......
case 9:
if (token == ParserConsts::kw_namespace)
{
m_Str.Clear();
HandleNamespace();
}
else
switchHandled = false;
break;
default:
switchHandled = false;
break;
--- End code ---
[attachment deleted by admin]
MortenMacFly:
Hi Loaden,
I fully respect all the work you are doing. Hence please keep in mind that we need to track all your ideas for a proper later integration. Unluckily it comes to a moment where we are in feature freeze. I am hardly trying to keep everything you are proposing but it's getting harder and harder with every patch of yours. So my request would be, can you please track everything in a way that we can have all patches in one place? Probably you can post all of them in an own thread of yours, just a short information:
- what do they do
- what do they modify
- what's the base SVN revision to apply them to
- (what other patches are required for the to apply)
- what are conflicts with other patches
- link to another place in the forums for discussions.
Inform that this thread is a collection of patches and that answers are not welcome (I can even remove discussion).
I realised that you already conflict with a patch of OllyDbg. It will be hard to resolve this in the end and I don't want to take such a risk later on.
JGM:
I think the problem here is that english is hard for him, he needs a mediator, some one that speaks on his native language, discuss with him his work and organize the ideas here, just a suggestion :)
Would be a shame loosing track of his work because of lack in organization (communication problems?)
Loaden:
Sorry, I am not a professional programmer, I'm just a physics teacher.
I can not understand some replies, but one thing. That is i fully agree: After CB official release, discuss whether to apply my patch.
I have not studied English for 10 years. :(
MortenMacFly:
--- Quote from: Loaden on April 19, 2010, 07:07:15 pm ---Sorry, I am not a professional programmer, I'm just a physics teacher.
--- End quote ---
Interesting combination: Physics teacher advancing CC. ;-)
So to make things simple: Please start an own thread and post there your patch and a short explanation (including base SVN revision) and nothing else. Next time you have a patch, do the same in this very thread (basically "reply"). I will make this topic sticky and move every "replies" to another thread. Thus we have a clear history of your work in one place.
Probably it's already too late, but I would love to see this from the beginning of your work. Probably another CC dev can help?!
Navigation
[0] Message Index
[#] Next page
Go to full version