mirror of
https://github.com/Samsung/escargot.git
synced 2026-06-22 10:01:50 +00:00
1. implement instanceof, in, delete operator
2. VariableDeclaratorNode does not affect execute result 3. optimize Object get, set in interpreter Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
This commit is contained in:
parent
b2ea88b251
commit
11e625f373
26 changed files with 386 additions and 114 deletions
|
|
@ -259,11 +259,14 @@ bool Object::defineOwnProperty(ExecutionState& state, const ObjectPropertyName&
|
|||
}
|
||||
}
|
||||
|
||||
void Object::deleteOwnProperty(ExecutionState& state, const ObjectPropertyName& P) ESCARGOT_OBJECT_SUBCLASS_MUST_REDEFINE
|
||||
bool Object::deleteOwnProperty(ExecutionState& state, const ObjectPropertyName& P) ESCARGOT_OBJECT_SUBCLASS_MUST_REDEFINE
|
||||
{
|
||||
ASSERT(getOwnProperty(state, P).hasValue());
|
||||
ASSERT(getOwnProperty(state, P).isConfigurable());
|
||||
deleteOwnProperty(state, m_structure->findProperty(state, P.toPropertyName(state)));
|
||||
auto result = getOwnProperty(state, P);
|
||||
if (result.hasValue() && result.isConfigurable()) {
|
||||
deleteOwnProperty(state, m_structure->findProperty(state, P.toPropertyName(state)));
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void Object::enumeration(ExecutionState& state, std::function<bool(const ObjectPropertyName&, const ObjectStructurePropertyDescriptor& desc)> fn) ESCARGOT_OBJECT_SUBCLASS_MUST_REDEFINE
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue