Skip to content

Don't import or Include things twice #11

Description

@chaseWillden

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions