BUG-6522: create a dedicated extensions map 68/47568/8
authorRobert Varga <rovarga@cisco.com>
Tue, 25 Oct 2016 23:24:15 +0000 (01:24 +0200)
committerRobert Varga <nite@hq.sk>
Wed, 26 Oct 2016 14:34:32 +0000 (14:34 +0000)
commit7eafc450f8a7c09f9d98c0d4d7608b16588244cb
tree21760d7d35c10a7e26bf5af7631081dc3bd5854b
parent012fb5b3fac35a0fec1380abbf19d07dcd5e0f28
BUG-6522: create a dedicated extensions map

SourceSpecificContext already calls out to BuildGlobalContext
to lookup up support statements, hence the potential extension
lookup will be slower.

This lookup occurs before we check for type arguments, hence
we want to keep it fast. Therefore we take a snapshot of all
extensions defined in the global context.

Also make StatementDefinitionNamespace a source-local, so the
definitions do not leak outside of the module where they are
defined.

Change-Id: I0c50de89cee5d4297e8ccd0cb61203c3cfe9a2f3
Signed-off-by: Robert Varga <rovarga@cisco.com>
yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/reactor/SourceSpecificContext.java
yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/YangInferencePipeline.java