Introduce Object, FunctionTemplate

* Add cctest for Object, FunctionTemplates
* Fix one of EncodedValue <-> EncodedSmallValue conversion bug

Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
This commit is contained in:
Seonghyun Kim 2020-06-23 11:33:15 +09:00 committed by Hyukwoo Park
commit ca9b832a77
26 changed files with 1686 additions and 192 deletions

View file

@ -88,6 +88,12 @@ NativeFunctionObject::NativeFunctionObject(ExecutionState& state, NativeFunction
ASSERT(codeBlock()->hasCallNativeFunctionCode());
}
NativeFunctionObject::NativeFunctionObject(CodeBlock* codeBlock, ObjectStructure* structure, ObjectPropertyValueVector&& values)
: FunctionObject(structure, std::move(values), codeBlock->context()->globalObject()->functionPrototype())
{
m_codeBlock = codeBlock;
}
bool NativeFunctionObject::isConstructor() const
{
return m_codeBlock->isNativeFunctionConstructor();