Implement Proxy object internal methods (#39)

* updated proxy methods
GetPrototypeOf
SetPrototypeOf
IsExtensible
PreventExtensions
GetOwnProperty
DefineOwnProperty
HasProperty
Get
Set
Delete
ProxyCreate

* TODO
Enumerate and OwnPropertyKeys
Call and Construct

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
This commit is contained in:
Hyukwoo Park 2019-01-21 12:22:40 +09:00 committed by yichoi
commit 40d4fa40c6
21 changed files with 1005 additions and 301 deletions

View file

@ -363,7 +363,7 @@ bool ArrayObject::setFastModeValue(ExecutionState& state, const ObjectPropertyNa
}
if (UNLIKELY(len <= idx)) {
if (UNLIKELY(!isExtensible())) {
if (UNLIKELY(!isExtensible(state))) {
return false;
}
if (UNLIKELY(!setArrayLength(state, idx + 1)) || UNLIKELY(!isFastModeArray())) {
@ -401,7 +401,7 @@ bool ArrayObject::setIndexedProperty(ExecutionState& state, const Value& propert
if (LIKELY(idx != Value::InvalidArrayIndexValue)) {
uint32_t len = getArrayLength(state);
if (UNLIKELY(len <= idx)) {
if (UNLIKELY(!isExtensible())) {
if (UNLIKELY(!isExtensible(state))) {
return false;
}
if (UNLIKELY(!setArrayLength(state, idx + 1)) || UNLIKELY(!isFastModeArray())) {