Condor icon indicating copy to clipboard operation
Condor copied to clipboard

Don't import or Include things twice

Open chaseWillden opened this issue 8 years ago • 0 comments

When we are calling an import or an include inside of a file, the requested file is parsed and compiled each time it's called.

See https://github.com/CondorLang/Condor/blob/master/src/condor/types/script/script.cc#L243

TODO

  • [ ] Check if file file is included.
    • if (isolate->GetContext()->IsIncluded(name)) continue;
  • [ ] If we decide not to cache unused symbols, we need to re-parse the file. If we decide to cache the unused symbols, create a cache area.

chaseWillden avatar Nov 03 '16 02:11 chaseWillden