mirror of
https://github.com/Samsung/escargot.git
synced 2026-06-29 10:02:14 +00:00
1. implement String, Number proxy object
2. optimze Script Parser(esprima) Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
This commit is contained in:
parent
b3d3202ae7
commit
e1c48390a7
13 changed files with 256 additions and 108 deletions
|
|
@ -9,15 +9,10 @@ StringObject::StringObject(ExecutionState& state, String* value)
|
|||
, m_primitiveValue(value)
|
||||
{
|
||||
m_structure = state.context()->defaultStructureForStringObject();
|
||||
m_values[ESCARGOT_OBJECT_BUILTIN_PROPERTY_NUMBER] = Value(m_primitiveValue->length());
|
||||
m_values[ESCARGOT_OBJECT_BUILTIN_PROPERTY_NUMBER] = Value();
|
||||
setPrototype(state, state.context()->globalObject()->stringPrototype());
|
||||
}
|
||||
|
||||
void StringObject::setStringData(ExecutionState& state, String* data)
|
||||
{
|
||||
m_primitiveValue = data;
|
||||
defineOwnProperty(state, ObjectPropertyName(state.context()->staticStrings().length), ObjectPropertyDescriptorForDefineOwnProperty(Value(data->length()), ObjectPropertyDescriptorForDefineOwnProperty::NotPresent));
|
||||
}
|
||||
|
||||
ObjectGetResult StringObject::getOwnProperty(ExecutionState& state, const ObjectPropertyName& P) ESCARGOT_OBJECT_SUBCLASS_MUST_REDEFINE
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue