Skip to content

Commit

Permalink
perf(check): Don't look in the global context for non-globals
Browse files Browse the repository at this point in the history
  • Loading branch information
Marwes committed Jan 27, 2019
1 parent b9da733 commit 45bc2ad
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion vm/src/vm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,11 @@ impl PrimitiveEnv for VmEnv {

impl MetadataEnv for VmEnv {
fn get_metadata(&self, id: &SymbolRef) -> Option<&Metadata> {
self.get_metadata(id.definition_name()).ok()
if id.is_global() {
self.get_metadata(id.definition_name()).ok()
} else {
None
}
}
}

Expand Down

0 comments on commit 45bc2ad

Please sign in to comment.