Skip to content

Instantly share code, notes, and snippets.

@tcare
Last active February 22, 2016 10:29
Show Gist options
  • Save tcare/5c491cf61a1579b9ba3e to your computer and use it in GitHub Desktop.
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.
/* 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()');
}
}
@gskachkov
Copy link

Is this implemente in IE edge?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment