Implement more things according to newer ECMAScript spec

* Fix parser error related with async arrow function
* CodeBlock may have diffrent source code start position data(from `function` keyword)
  - new ECMAScript spec says we should make function source string from `function` keyword
* Apply new spec on builtin Function constructor
* AsyncFunctions must have correct initial properties

Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
This commit is contained in:
Seonghyun Kim 2020-01-17 15:17:08 +09:00 committed by Hyukwoo Park
commit ae35a576f5
25 changed files with 178 additions and 204 deletions

View file

@ -28,7 +28,7 @@ namespace Escargot {
class ScriptClassMethodFunctionObject : public ScriptFunctionObject {
public:
ScriptClassMethodFunctionObject(ExecutionState& state, CodeBlock* codeBlock, LexicalEnvironment* outerEnvironment, Object* homeObject)
: ScriptFunctionObject(state, codeBlock, outerEnvironment, false, codeBlock->isGenerator())
: ScriptFunctionObject(state, codeBlock, outerEnvironment, false, codeBlock->isGenerator(), codeBlock->isAsync())
, m_homeObject(homeObject)
{
}