mirror of
https://github.com/Samsung/escargot.git
synced 2026-06-22 10:01:50 +00:00
1. reduce size of ByteCodeBlock, CodeBlock classes
2. optimize function calling performance - change local variable binding order (this, function name first) - revise opcode table init method 3. remove OpcodeTable::m_reverseTable 4. use shared thrower JSGetterSetter instance for arguments, function object 5. revise Function.prototype.toString for to print function's source Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
This commit is contained in:
parent
abea619044
commit
b1cc608191
29 changed files with 378 additions and 359 deletions
|
|
@ -143,13 +143,13 @@ ArgumentsObject::ArgumentsObject(ExecutionState& state, FunctionEnvironmentRecor
|
|||
} else {
|
||||
// Else, strict is true so
|
||||
// Let thrower be the [[ThrowTypeError]] function Object (13.2.3).
|
||||
FunctionObject* thrower = state.context()->globalObject()->throwTypeError();
|
||||
auto thrower = state.context()->globalObject()->throwerGetterSetterData();
|
||||
// Call the [[DefineOwnProperty]] internal method of obj with arguments "callee", PropertyDescriptor {[[Get]]: thrower, [[Set]]: thrower, [[Enumerable]]: false, [[Configurable]]: false}, and false.
|
||||
// obj->defineOwnProperty(state, ObjectPropertyName(state.context()->staticStrings().callee), ObjectPropertyDescriptor(JSGetterSetter(thrower, thrower), (ObjectPropertyDescriptor::PresentAttribute)(ObjectPropertyDescriptor::NonEnumerablePresent | ObjectPropertyDescriptor::NonConfigurablePresent)));
|
||||
m_values[ESCARGOT_OBJECT_BUILTIN_PROPERTY_NUMBER + 1] = Value(new JSGetterSetter(thrower, thrower));
|
||||
m_values[ESCARGOT_OBJECT_BUILTIN_PROPERTY_NUMBER + 1] = Value(thrower);
|
||||
// Call the [[DefineOwnProperty]] internal method of obj with arguments "caller", PropertyDescriptor {[[Get]]: thrower, [[Set]]: thrower, [[Enumerable]]: false, [[Configurable]]: false}, and false.
|
||||
// obj->defineOwnProperty(state, ObjectPropertyName(state.context()->staticStrings().caller), ObjectPropertyDescriptor(JSGetterSetter(thrower, thrower), (ObjectPropertyDescriptor::PresentAttribute)(ObjectPropertyDescriptor::NonEnumerablePresent | ObjectPropertyDescriptor::NonConfigurablePresent)));
|
||||
m_values[ESCARGOT_OBJECT_BUILTIN_PROPERTY_NUMBER + 2] = Value(new JSGetterSetter(thrower, thrower));
|
||||
m_values[ESCARGOT_OBJECT_BUILTIN_PROPERTY_NUMBER + 2] = Value(thrower);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue