mirror of
https://github.com/Samsung/escargot.git
synced 2026-06-22 10:01:50 +00:00
Remove duplicated check code in Construct operation
* Object::construct directly calls each internal construct method without any check code * ByteCodeInterpreter::constructOperation is added to run IsConstructor check code Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
This commit is contained in:
parent
1a1078a462
commit
d9a9bcf860
5 changed files with 21 additions and 13 deletions
|
|
@ -130,9 +130,6 @@ 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