mirror of
https://github.com/Samsung/escargot.git
synced 2026-06-29 10:02:14 +00:00
Implement ES6 Symbol.hasInstance, iterator, toStringTag, toPrimitive and built-ins (#46)
* Implement Array.from * Disable part of ES6-shim due to wrong implementation Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
This commit is contained in:
parent
a363289951
commit
e66f512b32
61 changed files with 1407 additions and 419 deletions
|
|
@ -32,7 +32,11 @@ namespace Escargot {
|
|||
#ifdef ESCARGOT_SHELL
|
||||
static Value builtinPrint(ExecutionState& state, Value thisValue, size_t argc, Value* argv, bool isNewExpression)
|
||||
{
|
||||
puts(argv[0].toString(state)->toUTF8StringData().data());
|
||||
if (argv[0].isSymbol()) {
|
||||
puts(argv[0].asSymbol()->getSymbolDescriptiveString()->toNonGCUTF8StringData().data());
|
||||
} else {
|
||||
puts(argv[0].toString(state)->toNonGCUTF8StringData().data());
|
||||
}
|
||||
return Value();
|
||||
}
|
||||
|
||||
|
|
@ -168,7 +172,7 @@ ObjectGetResult GlobalObject::getOwnProperty(ExecutionState& state, const Object
|
|||
}
|
||||
target = target->getPrototypeObject();
|
||||
}
|
||||
Value virtialIdResult = state.context()->virtualIdentifierCallback()(state, P.string(state));
|
||||
Value virtialIdResult = state.context()->virtualIdentifierCallback()(state, P.toPlainValue(state));
|
||||
if (!virtialIdResult.isEmpty())
|
||||
return ObjectGetResult(virtialIdResult, true, true, true);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue