Update Object.prototype.toString based on ES10

* isArray is updated as an internal method of Object
* legacy internalClassProperty is nowhere to be used

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
This commit is contained in:
HyukWoo Park 2020-03-26 17:12:31 +09:00 committed by Patrick Kim
commit 32f6f6938e
11 changed files with 65 additions and 38 deletions

View file

@ -356,6 +356,10 @@ PersistentRefHolder<ContextRef> createEscargotContext(VMInstanceRef* instance)
}
#if defined(ESCARGOT_ENABLE_TEST)
// There is no specific standard for the [@@toStringTag] property of global object.
// But "global" string is added here to pass legacy TCs
context->globalObject()->defineDataProperty(state, context->vmInstance()->toStringTagSymbol(), ObjectRef::DataPropertyDescriptor(AtomicStringRef::create(context, "global")->string(), (ObjectRef::PresentAttribute)(ObjectRef::NonWritablePresent | ObjectRef::NonEnumerablePresent | ObjectRef::ConfigurablePresent)));
{
FunctionObjectRef::NativeFunctionInfo nativeFunctionInfo(AtomicStringRef::create(context, "uneval"), builtinUneval, 1, true, false);
FunctionObjectRef* buildFunctionObjectRef = FunctionObjectRef::create(state, nativeFunctionInfo);