From 714aa90cb00cee4c47ba11042d62dae4f001bbb9 Mon Sep 17 00:00:00 2001 From: chenjx-huawei Date: Tue, 30 Apr 2024 19:18:30 +0800 Subject: [PATCH] Revert !5816 on Supercallthisrange Issue: https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I9L1PX?from=project-issue Signed-off-by: chenjx-huawei Change-Id: I046debb98dc6da6ac6f1570c5d0d788ecd528ec7 --- .../compiler/new_object_stub_builder.cpp | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/ecmascript/compiler/new_object_stub_builder.cpp b/ecmascript/compiler/new_object_stub_builder.cpp index c7cb431cd..234bd5f39 100644 --- a/ecmascript/compiler/new_object_stub_builder.cpp +++ b/ecmascript/compiler/new_object_stub_builder.cpp @@ -1249,9 +1249,6 @@ GateRef NewObjectStubBuilder::FastSuperAllocateThis(GateRef glue, GateRef superC Label entry(env); env->SubCfgEntry(&entry); Label exit(env); - Label newTargetIsBase(env); - Label newTargetNotBase(env); - Label checkHeapObject(env); Label isHeapObject(env); Label checkJSObject(env); Label callRuntime(env); @@ -1259,20 +1256,8 @@ GateRef NewObjectStubBuilder::FastSuperAllocateThis(GateRef glue, GateRef superC DEFVARIABLE(thisObj, VariableType::JS_ANY(), Undefined()); DEFVARIABLE(protoOrHclass, VariableType::JS_ANY(), Undefined()); - BRANCH(IsBase(newTarget), &newTargetIsBase, &newTargetNotBase); - Bind(&newTargetIsBase); - { - protoOrHclass = Load(VariableType::JS_ANY(), superCtor, - IntPtr(JSFunction::PROTO_OR_DYNCLASS_OFFSET)); - Jump(&checkHeapObject); - } - Bind(&newTargetNotBase); - { - protoOrHclass = Load(VariableType::JS_ANY(), newTarget, - IntPtr(JSFunction::PROTO_OR_DYNCLASS_OFFSET)); - Jump(&checkHeapObject); - } - Bind(&checkHeapObject); + protoOrHclass = Load(VariableType::JS_ANY(), newTarget, + IntPtr(JSFunction::PROTO_OR_DYNCLASS_OFFSET)); BRANCH(TaggedIsHeapObject(*protoOrHclass), &isHeapObject, &callRuntime); Bind(&isHeapObject); BRANCH(IsJSHClass(*protoOrHclass), &checkJSObject, &callRuntime); -- Gitee