mirror of
https://github.com/Samsung/escargot.git
synced 2026-06-22 10:01:50 +00:00
Don't use heap allocated lexical environment if possible (#378)
- We should not heap allocated env on... * functions uses variable on upper function * functions have `typeof` operation * functions have unmapped arguments object - Improve calling function performance by remove accessing vtable once in interpreter(from isCallable, call to just call) Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
This commit is contained in:
parent
8e4f170f3f
commit
3c0a1cfddd
23 changed files with 297 additions and 65 deletions
|
|
@ -148,6 +148,9 @@ public:
|
|||
|
||||
Object* ScriptFunctionObject::construct(ExecutionState& state, const size_t argc, NULLABLE Value* argv, Object* newTarget)
|
||||
{
|
||||
if (UNLIKELY(!newTarget->isConstructor())) {
|
||||
ErrorObject::throwBuiltinError(state, ErrorObject::TypeError, errorMessage_Not_Constructor_Function, codeBlock()->functionName());
|
||||
}
|
||||
// Assert: Type(newTarget) is Object.
|
||||
ASSERT(newTarget->isObject());
|
||||
ASSERT(newTarget->isConstructor());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue