Last active
February 22, 2016 10:29
-
-
Save tcare/5c491cf61a1579b9ba3e to your computer and use it in GitHub Desktop.
The use of super() in an eval() introduces complexity in the compiler implementation.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* The use of super() in an eval() introduces complexity in the compiler implementation. */ | |
class Child extends Parent { | |
method() { | |
// This method needs a reference to Parent available when super() is called. | |
// Chakra can determine this during the Parser stage. | |
super(); | |
} | |
methodEval() { | |
// This method also needs a reference to Parent available when super() is | |
// called, however Chakra doesn’t know for sure until we execute the code | |
// inside the eval(). | |
eval('super()'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is this implemente in IE edge?