mirror of
https://github.com/Samsung/escargot.git
synced 2026-06-22 10:01:50 +00:00
Add setName API of FunctionObject
Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
This commit is contained in:
parent
ba1021cc14
commit
bd35e41168
17 changed files with 79 additions and 18 deletions
|
|
@ -28,14 +28,14 @@ NativeFunctionObject::NativeFunctionObject(ExecutionState& state, const NativeFu
|
|||
: FunctionObject(state, state.context()->globalObject()->functionPrototype(), info.m_isConstructor ? (ESCARGOT_OBJECT_BUILTIN_PROPERTY_NUMBER + 3) : (ESCARGOT_OBJECT_BUILTIN_PROPERTY_NUMBER + 2))
|
||||
{
|
||||
m_codeBlock = new NativeCodeBlock(state.context(), info);
|
||||
initStructureAndValues(state, info.m_isConstructor, false, false);
|
||||
initStructureAndValues(state, info.m_isConstructor, false);
|
||||
}
|
||||
|
||||
NativeFunctionObject::NativeFunctionObject(ExecutionState& state, const NativeFunctionInfo& info, ForGlobalBuiltin)
|
||||
: FunctionObject(state, state.context()->globalObject()->objectPrototype(), ESCARGOT_OBJECT_BUILTIN_PROPERTY_NUMBER + 2)
|
||||
{
|
||||
m_codeBlock = new NativeCodeBlock(state.context(), info);
|
||||
initStructureAndValues(state, info.m_isConstructor, false, false);
|
||||
initStructureAndValues(state, info.m_isConstructor, false);
|
||||
ASSERT(!NativeFunctionObject::isConstructor());
|
||||
}
|
||||
|
||||
|
|
@ -43,7 +43,7 @@ NativeFunctionObject::NativeFunctionObject(ExecutionState& state, const NativeFu
|
|||
: FunctionObject(state, state.context()->globalObject()->functionPrototype(), info.m_isConstructor ? (ESCARGOT_OBJECT_BUILTIN_PROPERTY_NUMBER + 3) : (ESCARGOT_OBJECT_BUILTIN_PROPERTY_NUMBER + 2))
|
||||
{
|
||||
m_codeBlock = new NativeCodeBlock(state.context(), info);
|
||||
initStructureAndValues(state, info.m_isConstructor, false, false);
|
||||
initStructureAndValues(state, info.m_isConstructor, false);
|
||||
if (info.m_isConstructor) {
|
||||
m_structure = state.context()->defaultStructureForBuiltinFunctionObject();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue