Closed guybedford closed 8 years ago
I'd like to understand why test/node-instantiate-test.js
passes. Any ideas?
__moduleName
is certainly used in our code, so we'll need to switch to the alternative.
@johnjbarton it's doing a double __moduleName
wrapping, that is it is creating both the variable and the function closure, which both have the same module name value provided. So it's more about the redundancy than anything else.
The change here does not affect __moduleName
in the Traceur cases, so we should be good to go? Just let me know if you have any further questions here and thanks for the quick response.
LGTM
Will this change ultimately affect System from es6-module-loader/index
?
LGTM
If you wanted to write a test we could check the generated code =P
Thanks. @arv yes you are right of course!
This removes the unnecessary
var __moduleName
output from System.register since we have a new wrapping format for this.There is still a
var __moduleName
creation in https://github.com/google/traceur-compiler/blob/master/src/codegeneration/ModuleTransformer.js#L132 which can be removed unless this is being used for other formats?//cc @johnjbarton
@arv I guess you will ask for a test here :) But such a test would be like testing for the non-existence of any arbitrary nonsense scope variable in an output - it shouldn't have been there to begin with.