[ES6] Implement Reflect.has
authorutatane.tea@gmail.com <utatane.tea@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 11 Aug 2015 18:18:39 +0000 (18:18 +0000)
committerutatane.tea@gmail.com <utatane.tea@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 11 Aug 2015 18:18:39 +0000 (18:18 +0000)
commit53477b99b4bb3717780ca4ad1585f0d8c8e7cb1a
tree992085ed341eebe1282502b1ea884ed29d2903a2
parent06d50262b7d05a61a0980e5417ca1f2ead548f66
[ES6] Implement Reflect.has
https://bugs.webkit.org/show_bug.cgi?id=147875

Reviewed by Sam Weinig.

This patch implements Reflect.has[1].
Since the semantics is the same to the `in` operator in the JS[2],
we can implement it in builtin JS code.

[1]: http://www.ecma-international.org/ecma-262/6.0/#sec-reflect.has
[2]: http://www.ecma-international.org/ecma-262/6.0/#sec-relational-operators-runtime-semantics-evaluation

* builtins/ReflectObject.js:
(has):
* runtime/ReflectObject.cpp:
* tests/stress/reflect-has.js: Added.
(shouldBe):
(shouldThrow):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@188264 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/builtins/ReflectObject.js
Source/JavaScriptCore/runtime/ReflectObject.cpp
Source/JavaScriptCore/tests/stress/reflect-has.js [new file with mode: 0644]