You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
to no longer rely on a 'shim' script in order to get at the variables exported by modules. This should improve execution speed, remove pollution of the global namespace, reduce the possibility of down-stream side effects, and allow the export of non-default values as well.
The text was updated successfully, but these errors were encountered:
Oceanswave
changed the title
Improve module evaluation by not requiring shim scripts to get at the namespace objects.
Improve module evaluation by not requiring shim scripts in order to access namespace objects.
Mar 1, 2018
This functionality is now partially implemented thanks to the upstream changes in ChakraCore 1.10.x.
The relevant sections of BaristaModuleRecord.cs still parse script, however, as 1) It doesn't appear to be able to set variables in namespaces 2) attempting to eval getnamespace during module loading breaks the runtime and throws an exception.
Thanks to chakra-core/ChakraCore#4707, it's now possible to programmatically get at namespace objects.
This allows the functionality in
https://github.com/BaristaLabs/BaristaCore/blob/master/src/BaristaLabs.BaristaCore.Common/BaristaContext.cs#L456
and
https://github.com/BaristaLabs/BaristaCore/blob/master/src/BaristaLabs.BaristaCore.Common/BaristaModuleRecord.cs#L260
to no longer rely on a 'shim' script in order to get at the variables exported by modules. This should improve execution speed, remove pollution of the global namespace, reduce the possibility of down-stream side effects, and allow the export of non-default values as well.
The text was updated successfully, but these errors were encountered: