Improve execution performance (#491)

* Make ArgumentsObject light
* Implement lazy-creation of FunctionObject.prototype
* Don't copy ObjectStructor when executing Object::enumeration
* Use GC_REALLOC on Object, ArrayObject

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
This commit is contained in:
Patrick Kim 2019-11-04 11:18:03 +09:00 committed by Hyukwoo Park
commit e91d0f0fe7
16 changed files with 323 additions and 73 deletions

View file

@ -19,11 +19,18 @@
#include "Escargot.h"
#include "ScriptGeneratorFunctionObject.h"
#include "FunctionObjectInlines.h"
#include "runtime/Context.h"
#include "runtime/FunctionObjectInlines.h"
namespace Escargot {
Object* ScriptGeneratorFunctionObject::createFunctionPrototypeObject(ExecutionState& state)
{
Object* prototype = new Object(state);
prototype->setPrototype(state, state.context()->globalObject()->generatorPrototype());
return prototype;
}
class ScriptGeneratorFunctionObjectThisValueBinder {
public:
Value operator()(ExecutionState& calleeState, ScriptGeneratorFunctionObject* self, const Value& thisArgument, bool isStrict)