ES6 classes: When a class extends B, super() invokes B.prototype.constructor() instead of B()
https://bugs.webkit.org/show_bug.cgi?id=149001

Reviewed by Saam Barati.

Source/JavaScriptCore:

This patch matches the `super()` call in the constructor to the latest spec.
Before this patch, when calling `super()`, it loads `callee.[[HomeObject]].__proto__.constructor`
as a super constructor. But after this patch, it loads `callee.__proto__` as a super constructor.
This behavior corresponds to the section 12.3.5.2[1].

[1]: http://www.ecma-international.org/ecma-262/6.0/#sec-getsuperconstructor

* bytecompiler/NodesCodegen.cpp:
(JSC::SuperNode::emitBytecode):
* tests/stress/super-call-does-not-look-up-constructor.js: Added.
(shouldBe):
(B):
(C):
(B.prototype):

LayoutTests:

An error message becomes changed.

* js/class-syntax-call-expected.txt:
* js/class-syntax-extends-expected.txt:
* js/class-syntax-super-expected.txt:
* js/script-tests/class-syntax-call.js:
* js/script-tests/class-syntax-extends.js:
* js/script-tests/class-syntax-super.js:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@190847 268f45cc-cd09-0410-ab3c-d52691b4dbfc
10 files changed