diff --git a/ecmascript/compiler/builtins/builtins_object_stub_builder.cpp b/ecmascript/compiler/builtins/builtins_object_stub_builder.cpp index 4fc85cc0c7..1228e4ad6c 100644 --- a/ecmascript/compiler/builtins/builtins_object_stub_builder.cpp +++ b/ecmascript/compiler/builtins/builtins_object_stub_builder.cpp @@ -684,67 +684,4 @@ void BuiltinsObjectStubBuilder::Assign(Variable *result, Label *exit, Label *slo } } } - -GateRef BuiltinsObjectStubBuilder::CloneObjectLiteral(GateRef glue, GateRef objLiteral) -{ - auto env = GetEnvironment(); - Label entry(env); - Label loopHead(env); - Label loopExit(env); - Label loopBack(env); - env->SubCfgEntry(&entry); - auto klass = LoadHClass(objLiteral); - NewObjectStubBuilder objBuilder(this); - auto newObj = objBuilder.NewJSObject(glue, klass); - - auto elements = GetElementsArray(objLiteral); - auto newElements = CloneProperties(glue, elements); - SetElementsArray(VariableType::JS_ANY(), glue, newObj, newElements); - - auto properties = GetPropertiesArray(objLiteral); - auto newProperties = CloneProperties(glue, properties); - SetPropertiesArray(VariableType::JS_ANY(), glue, newObj, newProperties); - - auto inlinedProperties = GetInlinedPropertiesFromHClass(klass); - DEFVARIABLE(idx, VariableType::INT32(), Int32(0)); - Jump(&loopHead); - LoopBegin(&loopHead); - Branch(Int32UnsignedLessThan(*idx, inlinedProperties), &loopBack, &loopExit); - Bind(&loopBack); - { - auto value = GetPropertyInlinedProps(objLiteral, klass, *idx); - SetPropertyInlinedProps(glue, newObj, klass, value, *idx, VariableType::JS_ANY()); - idx = Int32Add(*idx, Int32(1)); - LoopEnd(&loopHead); - } - Bind(&loopExit); - env->SubCfgExit(); - return newObj; -} - -GateRef BuiltinsObjectStubBuilder::CloneProperties(GateRef glue, GateRef old) -{ - auto env = GetEnvironment(); - Label entry(env); - env->SubCfgEntry(&entry); - DEFVARIABLE(res, VariableType::JS_ANY(), Hole()); - DEFVARIABLE(idx, VariableType::INT32(), Int32(0)); - auto newLength = GetLengthOfTaggedArray(old); - Label exit(env); - Label loopHead(env); - Label loopBack(env); - NewObjectStubBuilder newObjBuilder(GetEnvironment()); - auto newArray = newObjBuilder.NewTaggedArray(glue, newLength); - Jump(&loopHead); - LoopBegin(&loopHead); - Branch(Int32UnsignedLessThan(*idx, newLength), &loopBack, &exit); - Bind(&loopBack); - auto value = GetValueFromTaggedArray(old, *idx); - SetValueToTaggedArray(VariableType::JS_ANY(), glue, newArray, *idx, value); - idx = Int32Add(*idx, Int32(1)); - LoopEnd(&loopHead); - Bind(&exit); - env->SubCfgExit(); - return newArray; -} } // namespace panda::ecmascript::kungfu diff --git a/ecmascript/compiler/builtins/builtins_object_stub_builder.h b/ecmascript/compiler/builtins/builtins_object_stub_builder.h index 6e6f53371f..48ab77c168 100644 --- a/ecmascript/compiler/builtins/builtins_object_stub_builder.h +++ b/ecmascript/compiler/builtins/builtins_object_stub_builder.h @@ -32,8 +32,6 @@ public: void ToString(Variable *result, Label *exit, Label *slowPath); void Create(Variable *result, Label *exit, Label *slowPath); void Assign(Variable *result, Label *exit, Label *slowPath); - GateRef CloneObjectLiteral(GateRef glue, GateRef objLiteral); - GateRef CloneProperties(GateRef glue, GateRef old); private: GateRef OrdinaryNewJSObjectCreate(GateRef proto); diff --git a/ecmascript/compiler/circuit_builder.cpp b/ecmascript/compiler/circuit_builder.cpp index a2329a99db..ceff99f15d 100644 --- a/ecmascript/compiler/circuit_builder.cpp +++ b/ecmascript/compiler/circuit_builder.cpp @@ -26,7 +26,6 @@ #include "ecmascript/global_env.h" #include "ecmascript/js_thread.h" #include "ecmascript/js_function.h" -#include "ecmascript/jspandafile/program_object.h" #include "ecmascript/mem/region.h" #include "ecmascript/method.h" @@ -564,19 +563,13 @@ GateRef CircuitBuilder::GetObjectFromConstPool(GateRef glue, GateRef hirGate, Ga } } else if (type == ConstPoolType::OBJECT_LITERAL) { Label isAOTLiteralInfo(env_); - Label notAotLiteralInfo(env_); - Branch(IsAOTLiteralInfo(*result), &isAOTLiteralInfo, ¬AotLiteralInfo); + Branch(IsAOTLiteralInfo(*result), &isAOTLiteralInfo, &exit); Bind(&isAOTLiteralInfo); { result = CallRuntime(glue, RTSTUB_ID(GetObjectLiteralFromCache), Gate::InvalidGateRef, { constPool, Int32ToTaggedInt(index), module }, hirGate); Jump(&exit); } - Bind(¬AotLiteralInfo); - { - result = GetValueFromTaggedArray(cacheValue, Int32(ConstantPool::OBJECT_LITERAL_INFO_OBJECT_INDEX)); - Jump(&exit); - } } else { Jump(&exit); } @@ -587,57 +580,6 @@ GateRef CircuitBuilder::GetObjectFromConstPool(GateRef glue, GateRef hirGate, Ga return ret; } -GateRef CircuitBuilder::GetObjectInfoFromConstPool(GateRef glue, GateRef hirGate, GateRef jsFunc, GateRef index, - ConstPoolType type) -{ - GateRef constPool = GetConstPoolFromFunction(jsFunc); - GateRef module = GetModuleFromFunction(jsFunc); - return GetObjectInfoFromConstPool(glue, hirGate, constPool, module, index, type); -} - -GateRef CircuitBuilder::GetObjectInfoFromConstPool(GateRef glue, GateRef hirGate, GateRef constPool, GateRef module, - GateRef index, ConstPoolType type) -{ - Label entry(env_); - SubCfgEntry(&entry); - Label exit(env_); - Label cacheMiss(env_); - Label cache(env_); - - auto cacheValue = GetValueFromTaggedArray(constPool, index); - DEFVAlUE(result, env_, VariableType::JS_ANY(), cacheValue); - Branch(BoolOr(TaggedIsHole(*result), TaggedIsNullPtr(*result)), &cacheMiss, &cache); - Bind(&cacheMiss); - { - if (type == ConstPoolType::OBJECT_LITERAL) { - result = CallRuntime(glue, RTSTUB_ID(GetObjectLiteralInfoFromCache), Gate::InvalidGateRef, - { constPool, Int32ToTaggedInt(index), module }, hirGate); - } else { - UNREACHABLE(); - } - Jump(&exit); - } - Bind(&cache); - { - if (type == ConstPoolType::OBJECT_LITERAL) { - Label isAOTLiteralInfo(env_); - Branch(IsAOTLiteralInfo(*result), &isAOTLiteralInfo, &exit); - Bind(&isAOTLiteralInfo); - { - result = CallRuntime(glue, RTSTUB_ID(GetObjectLiteralInfoFromCache), Gate::InvalidGateRef, - { constPool, Int32ToTaggedInt(index), module }, hirGate); - Jump(&exit); - } - } else { - UNREACHABLE(); - } - } - Bind(&exit); - auto ret = *result; - SubCfgExit(); - return ret; -} - GateRef CircuitBuilder::GetFunctionLexicalEnv(GateRef function) { return Load(VariableType::JS_POINTER(), function, IntPtr(JSFunction::LEXICAL_ENV_OFFSET)); diff --git a/ecmascript/compiler/circuit_builder.h b/ecmascript/compiler/circuit_builder.h index 1f1d28133b..5950c51733 100644 --- a/ecmascript/compiler/circuit_builder.h +++ b/ecmascript/compiler/circuit_builder.h @@ -220,10 +220,6 @@ public: GateRef GetObjectFromConstPool(GateRef glue, GateRef hirGate, GateRef jsFunc, GateRef index, ConstPoolType type); GateRef GetObjectFromConstPool(GateRef glue, GateRef hirGate, GateRef constPool, GateRef module, GateRef index, ConstPoolType type); - GateRef GetObjectInfoFromConstPool(GateRef glue, GateRef hirGate, GateRef jsFunc, - GateRef index, ConstPoolType type); - GateRef GetObjectInfoFromConstPool(GateRef glue, GateRef hirGate, GateRef constPool, - GateRef module, GateRef index, ConstPoolType type); GateRef GetFunctionLexicalEnv(GateRef function); GateRef GetGlobalEnv(); GateRef GetGlobalEnvObj(GateRef env, size_t index); diff --git a/ecmascript/compiler/interpreter_stub.cpp b/ecmascript/compiler/interpreter_stub.cpp index 34ba2b0b06..a0d4679759 100644 --- a/ecmascript/compiler/interpreter_stub.cpp +++ b/ecmascript/compiler/interpreter_stub.cpp @@ -17,7 +17,6 @@ #include "ecmascript/base/number_helper.h" #include "ecmascript/compiler/access_object_stub_builder.h" #include "ecmascript/compiler/bc_call_signature.h" -#include "ecmascript/compiler/builtins/builtins_object_stub_builder.h" #include "ecmascript/compiler/ic_stub_builder.h" #include "ecmascript/compiler/interpreter_stub-inl.h" #include "ecmascript/compiler/llvm_ir_builder.h" @@ -33,7 +32,6 @@ #include "ecmascript/js_array.h" #include "ecmascript/js_function.h" #include "ecmascript/js_generator_object.h" -#include "ecmascript/jspandafile/program_object.h" #include "ecmascript/message_string.h" #include "ecmascript/tagged_hash_table.h" #include "libpandafile/bytecode_instruction-inl.h" @@ -3943,66 +3941,26 @@ DECLARE_ASM_HANDLER(HandleDeprecatedCreatearraywithbufferPrefImm16) DECLARE_ASM_HANDLER(HandleCreateobjectwithbufferImm8Id16) { - auto env = GetEnvironment(); GateRef imm = ZExtInt16ToInt32(ReadInst16_1(pc)); GateRef currentFunc = GetFunctionFromFrame(GetFrame(sp)); GateRef module = GetModuleFromFunction(currentFunc); - GateRef fixedArray = GetObjectLiteralInfoFromConstPool(glue, constpool, imm, module); - GateRef result = GetValueFromTaggedArray(fixedArray, Int32(ConstantPool::OBJECT_LITERAL_INFO_OBJECT_INDEX)); - GateRef hasMethod = GetValueFromTaggedArray(fixedArray, Int32(ConstantPool::OBJECT_LITERAL_INFO_HAS_METHOD_INDEX)); - DEFVARIABLE(res, VariableType::JS_ANY(), Hole()); - Label fastpath(env); - Label slowpath(env); - Label dispatch(env); - GateRef flag = BoolOr(IsDictionaryModeByHClass(LoadHClass(result)), TaggedIsTrue(hasMethod)); - Branch(flag, &slowpath, &fastpath); - Bind(&slowpath); - { - GateRef currentEnv = GetEnvFromFrame(GetFrame(sp)); - res = CallRuntime(glue, RTSTUB_ID(CreateObjectHavingMethod), { result, currentEnv }); - Jump(&dispatch); - } - Bind(&fastpath); - { - BuiltinsObjectStubBuilder builder(this); - res = builder.CloneObjectLiteral(glue, result); - Jump(&dispatch); - } - Bind(&dispatch); - callback.ProfileCreateObject(*res); - CHECK_EXCEPTION_WITH_ACC(*res, INT_PTR(CREATEOBJECTWITHBUFFER_IMM8_ID16)); + GateRef result = GetObjectLiteralFromConstPool(glue, constpool, imm, module); + GateRef currentEnv = GetEnvFromFrame(GetFrame(sp)); + GateRef res = CallRuntime(glue, RTSTUB_ID(CreateObjectHavingMethod), { result, currentEnv }); + callback.ProfileCreateObject(res); + CHECK_EXCEPTION_WITH_ACC(res, INT_PTR(CREATEOBJECTWITHBUFFER_IMM8_ID16)); } DECLARE_ASM_HANDLER(HandleCreateobjectwithbufferImm16Id16) { - auto env = GetEnvironment(); GateRef imm = ZExtInt16ToInt32(ReadInst16_2(pc)); GateRef currentFunc = GetFunctionFromFrame(GetFrame(sp)); GateRef module = GetModuleFromFunction(currentFunc); - GateRef fixedArray = GetObjectLiteralInfoFromConstPool(glue, constpool, imm, module); - GateRef result = GetValueFromTaggedArray(fixedArray, Int32(ConstantPool::OBJECT_LITERAL_INFO_OBJECT_INDEX)); - GateRef hasMethod = GetValueFromTaggedArray(fixedArray, Int32(ConstantPool::OBJECT_LITERAL_INFO_HAS_METHOD_INDEX)); - DEFVARIABLE(res, VariableType::JS_ANY(), Hole()); - Label fastpath(env); - Label slowpath(env); - Label dispatch(env); - GateRef flag = BoolOr(IsDictionaryModeByHClass(LoadHClass(result)), TaggedIsTrue(hasMethod)); - Branch(flag, &slowpath, &fastpath); - Bind(&slowpath); - { - GateRef currentEnv = GetEnvFromFrame(GetFrame(sp)); - res = CallRuntime(glue, RTSTUB_ID(CreateObjectHavingMethod), { result, currentEnv }); - Jump(&dispatch); - } - Bind(&fastpath); - { - BuiltinsObjectStubBuilder builder(this); - res = builder.CloneObjectLiteral(glue, result); - Jump(&dispatch); - } - Bind(&dispatch); - callback.ProfileCreateObject(*res); - CHECK_EXCEPTION_WITH_ACC(*res, INT_PTR(CREATEOBJECTWITHBUFFER_IMM16_ID16)); + GateRef result = GetObjectLiteralFromConstPool(glue, constpool, imm, module); + GateRef currentEnv = GetEnvFromFrame(GetFrame(sp)); + GateRef res = CallRuntime(glue, RTSTUB_ID(CreateObjectHavingMethod), { result, currentEnv }); + callback.ProfileCreateObject(res); + CHECK_EXCEPTION_WITH_ACC(res, INT_PTR(CREATEOBJECTWITHBUFFER_IMM16_ID16)); } DECLARE_ASM_HANDLER(HandleDeprecatedCreateobjectwithbufferPrefImm16) diff --git a/ecmascript/compiler/stub_builder-inl.h b/ecmascript/compiler/stub_builder-inl.h index c17a2876ab..42c19a1665 100644 --- a/ecmascript/compiler/stub_builder-inl.h +++ b/ecmascript/compiler/stub_builder-inl.h @@ -1010,11 +1010,6 @@ inline GateRef StubBuilder::GetExtractLengthOfTaggedArray(GateRef array) return Load(VariableType::INT32(), array, IntPtr(TaggedArray::EXTRACT_LENGTH_OFFSET)); } -inline void StubBuilder::SetExtractLengthOfTaggedArray(GateRef glue, GateRef array, GateRef extraLength) -{ - return Store(VariableType::INT32(), glue, array, IntPtr(TaggedArray::EXTRACT_LENGTH_OFFSET), extraLength); -} - inline GateRef StubBuilder::IsJSHClass(GateRef obj) { ASM_ASSERT(GET_MESSAGE_STRING_ID(IsJSHClass), TaggedIsHeapObject(obj)); diff --git a/ecmascript/compiler/stub_builder.cpp b/ecmascript/compiler/stub_builder.cpp index bba91a1a8e..2e01283309 100644 --- a/ecmascript/compiler/stub_builder.cpp +++ b/ecmascript/compiler/stub_builder.cpp @@ -5438,13 +5438,6 @@ GateRef StubBuilder::GetObjectLiteralFromConstPool(GateRef glue, GateRef constpo ConstPoolType::OBJECT_LITERAL); } -GateRef StubBuilder::GetObjectLiteralInfoFromConstPool(GateRef glue, GateRef constpool, GateRef index, GateRef module) -{ - GateRef hirGate = Circuit::NullGate(); - return env_->GetBuilder()->GetObjectInfoFromConstPool(glue, hirGate, constpool, module, index, - ConstPoolType::OBJECT_LITERAL); -} - GateRef StubBuilder::JSAPIContainerGet(GateRef glue, GateRef receiver, GateRef index) { auto env = GetEnvironment(); diff --git a/ecmascript/compiler/stub_builder.h b/ecmascript/compiler/stub_builder.h index 8d80fe8945..fc94624577 100644 --- a/ecmascript/compiler/stub_builder.h +++ b/ecmascript/compiler/stub_builder.h @@ -290,7 +290,6 @@ public: void SetHash(GateRef glue, GateRef object, GateRef hash); GateRef GetLengthOfTaggedArray(GateRef array); GateRef GetExtractLengthOfTaggedArray(GateRef array); - void SetExtractLengthOfTaggedArray(GateRef glue, GateRef array, GateRef extraLength); // object operation GateRef IsJSHClass(GateRef obj); GateRef LoadHClass(GateRef object); @@ -604,7 +603,6 @@ public: GateRef GetMethodFromConstPool(GateRef glue, GateRef constpool, GateRef index, GateRef module); GateRef GetArrayLiteralFromConstPool(GateRef glue, GateRef constpool, GateRef index, GateRef module); GateRef GetObjectLiteralFromConstPool(GateRef glue, GateRef constpool, GateRef index, GateRef module); - GateRef GetObjectLiteralInfoFromConstPool(GateRef glue, GateRef constpool, GateRef index, GateRef module); void SetExtensibleToBitfield(GateRef glue, GateRef obj, bool isExtensible); // fast path diff --git a/ecmascript/jspandafile/program_object.h b/ecmascript/jspandafile/program_object.h index ec9f08c15c..52cf9709f4 100644 --- a/ecmascript/jspandafile/program_object.h +++ b/ecmascript/jspandafile/program_object.h @@ -32,6 +32,7 @@ #include "ecmascript/pgo_profiler/pgo_utils.h" #include "libpandafile/class_data_accessor-inl.h" #include "libpandafile/index_accessor.h" + namespace panda { namespace ecmascript { class JSThread; @@ -73,10 +74,6 @@ class ConstantPool : public TaggedArray { public: static constexpr size_t JS_PANDA_FILE_INDEX = 1; // not need gc static constexpr size_t INDEX_HEADER_INDEX = 2; // not need gc - static constexpr size_t OBJECT_LITERAL_INFO_OBJECT_INDEX = 0; - static constexpr size_t OBJECT_LITERAL_INFO_HAS_METHOD_INDEX = 1; - static constexpr size_t KEY_VALUE_PAIR_VALUE_OFFSET = 1; - static constexpr size_t KEY_VALUE_PAIR_SIZE = 2; static constexpr size_t CONSTANT_INDEX_INFO_INDEX = 3; static constexpr size_t RESERVED_POOL_LENGTH = INDEX_HEADER_INDEX; // divide the gc area @@ -271,14 +268,14 @@ public: } template - static JSTaggedValue GetLiteralInfoFromCache(JSThread *thread, JSTaggedValue constpool, - uint32_t index, CString entry) + static JSTaggedValue GetLiteralFromCache(JSThread *thread, JSTaggedValue constpool, uint32_t index, CString entry) { static_assert(type == ConstPoolType::OBJECT_LITERAL || type == ConstPoolType::ARRAY_LITERAL); [[maybe_unused]] EcmaHandleScope handleScope(thread); const ConstantPool *taggedPool = ConstantPool::Cast(constpool.GetTaggedObject()); auto val = taggedPool->GetObjectFromCache(index); JSPandaFile *jsPandaFile = taggedPool->GetJSPandaFile(); + // For AOT bool isLoadedAOT = jsPandaFile->IsLoadedAOT(); JSHandle entryIndexes(thread, JSTaggedValue::Undefined()); @@ -307,28 +304,13 @@ public: JSHandle obj = JSObject::CreateObjectFromProperties(thread, properties, ihcVal); JSMutableHandle key(thread, JSTaggedValue::Undefined()); JSMutableHandle valueHandle(thread, JSTaggedValue::Undefined()); - bool hasMethod = false; - size_t propertiesLen = properties->GetLength(); - for (size_t i = 0; i < propertiesLen; i += ConstantPool::KEY_VALUE_PAIR_SIZE) { - key.Update(properties->Get(i)); - if (key->IsHole()) { - break; - } - valueHandle.Update(properties->Get(i + ConstantPool::KEY_VALUE_PAIR_VALUE_OFFSET)); - if (key->IsJSFunction() || valueHandle->IsJSFunction()) { - hasMethod = true; - } - } size_t elementsLen = elements->GetLength(); - for (size_t i = 0; i < elementsLen; i += ConstantPool::KEY_VALUE_PAIR_SIZE) { + for (size_t i = 0; i < elementsLen; i += 2) { // 2: Each literal buffer has a pair of key-value. key.Update(elements->Get(i)); if (key->IsHole()) { break; } - valueHandle.Update(elements->Get(i + ConstantPool::KEY_VALUE_PAIR_VALUE_OFFSET)); - if (key->IsJSFunction() || valueHandle->IsJSFunction()) { - hasMethod = true; - } + valueHandle.Update(elements->Get(i + 1)); JSObject::DefinePropertyByLiteral(thread, obj, key, valueHandle); } if (thread->GetEcmaVM()->IsEnablePGOProfiler()) { @@ -338,13 +320,7 @@ public: thread->GetEcmaVM()->GetPGOProfiler()->ProfileCreateObject(obj.GetTaggedType(), abcId, id.GetOffset()); } - JSHandle fixedArray = - thread->GetEcmaVM()->GetFactory()->NewTaggedArray(2); // 2: object + hasMethod - // new fixed array - fixedArray->Set(thread, ConstantPool::OBJECT_LITERAL_INFO_OBJECT_INDEX, obj); - fixedArray->Set(thread, ConstantPool::OBJECT_LITERAL_INFO_HAS_METHOD_INDEX, - hasMethod ? JSTaggedValue::True() : JSTaggedValue::False()); - val = fixedArray.GetTaggedValue(); + val = obj.GetTaggedValue(); break; } case ConstPoolType::ARRAY_LITERAL: { @@ -365,16 +341,7 @@ public: } constpoolHandle->SetObjectToCache(thread, index, val); } - return val; - } - template - static JSTaggedValue GetLiteralFromCache(JSThread *thread, JSTaggedValue constpool, uint32_t index, CString entry) - { - auto val = GetLiteralInfoFromCache(thread, constpool, index, entry); - if (type == ConstPoolType::OBJECT_LITERAL) { - return JSHandle(thread, val)->Get(ConstantPool::OBJECT_LITERAL_INFO_OBJECT_INDEX); - } return val; } @@ -393,14 +360,6 @@ public: return GetLiteralFromCache(thread, constpool, index, entry); } - template - static JSTaggedValue GetLiteralInfoFromCache(JSThread *thread, JSTaggedValue constpool, - uint32_t index, JSTaggedValue module) - { - CString entry = ModuleManager::GetRecordName(module); - return GetLiteralInfoFromCache(thread, constpool, index, entry); - } - static JSTaggedValue PUBLIC_API GetStringFromCache(JSThread *thread, JSTaggedValue constpool, uint32_t index) { const ConstantPool *taggedPool = ConstantPool::Cast(constpool.GetTaggedObject()); diff --git a/ecmascript/stubs/runtime_stubs.cpp b/ecmascript/stubs/runtime_stubs.cpp index cac3b07188..9bd74ed7fd 100644 --- a/ecmascript/stubs/runtime_stubs.cpp +++ b/ecmascript/stubs/runtime_stubs.cpp @@ -899,16 +899,6 @@ DEF_RUNTIME_STUBS(GetObjectLiteralFromCache) thread, constpool.GetTaggedValue(), index.GetInt(), module.GetTaggedValue()).GetRawData(); } -DEF_RUNTIME_STUBS(GetObjectLiteralInfoFromCache) -{ - RUNTIME_STUBS_HEADER(GetObjectLiteralInfoFromCache); - JSHandle constpool = GetHArg(argv, argc, 0); // 0: means the zeroth parameter - JSTaggedValue index = GetArg(argv, argc, 1); // 1: means the first parameter - JSHandle module = GetHArg(argv, argc, 2); // 2: means the second parameter - return ConstantPool::GetLiteralInfoFromCache( - thread, constpool.GetTaggedValue(), index.GetInt(), module.GetTaggedValue()).GetRawData(); -} - DEF_RUNTIME_STUBS(GetArrayLiteralFromCache) { RUNTIME_STUBS_HEADER(GetArrayLiteralFromCache); diff --git a/ecmascript/stubs/runtime_stubs.h b/ecmascript/stubs/runtime_stubs.h index ee18f26663..5338a9027a 100644 --- a/ecmascript/stubs/runtime_stubs.h +++ b/ecmascript/stubs/runtime_stubs.h @@ -306,7 +306,6 @@ using FastCallAotEntryType = JSTaggedValue (*)(uintptr_t glue, uint32_t argc, co V(GetMethodFromCache) \ V(GetArrayLiteralFromCache) \ V(GetObjectLiteralFromCache) \ - V(GetObjectLiteralInfoFromCache) \ V(GetStringFromCache) \ V(OptLdSuperByValue) \ V(OptStSuperByValue) \ diff --git a/test/moduletest/BUILD.gn b/test/moduletest/BUILD.gn index 159574584f..6d415f79ac 100644 --- a/test/moduletest/BUILD.gn +++ b/test/moduletest/BUILD.gn @@ -39,7 +39,6 @@ group("ark_js_moduletest") { "concurrent", "container", "createarray", - "createobjectwithbuffer", "dataproperty", "datecase", "datecompare", @@ -176,7 +175,6 @@ group("ark_asm_test") { "compareobjecthclass", "concurrent", "container", - "createobjectwithbuffer", "dataproperty", "dateparse", "decodeuricomponent", @@ -293,7 +291,6 @@ group("ark_asm_single_step_test") { "compareobjecthclass", "concurrent", "container", - "createobjectwithbuffer", "dataproperty", "dynamicimport", "dyninstruction", diff --git a/test/moduletest/createobjectwithbuffer/BUILD.gn b/test/moduletest/createobjectwithbuffer/BUILD.gn deleted file mode 100644 index 424ee9b87f..0000000000 --- a/test/moduletest/createobjectwithbuffer/BUILD.gn +++ /dev/null @@ -1,18 +0,0 @@ -# Copyright (c) 2023 Huawei Device Co., Ltd. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import("//arkcompiler/ets_runtime/test/test_helper.gni") - -host_moduletest_action("createobjectwithbuffer") { - deps = [] -} diff --git a/test/moduletest/createobjectwithbuffer/createobjectwithbuffer.js b/test/moduletest/createobjectwithbuffer/createobjectwithbuffer.js deleted file mode 100644 index 17842c7fae..0000000000 --- a/test/moduletest/createobjectwithbuffer/createobjectwithbuffer.js +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (c) 2023 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * @tc.name:createobjectwithbuffer - * @tc.desc:test createobjectwithbuffer - * @tc.type: FUNC - * @tc.require: issueI84U4E - */ - -function logit(a) { - print(a.x) - print(a.y) - print(a[0]) - print(a[1]) -} - -function foo() { - for (let i = 0; i < 1; ++i) { - let a = { - x : 1, - y : "tik", - z() { return 666 }, - 0 : 0, - 1 : 1, - } - logit(a) - } -} - -function goo() { - let a = { - x : 1, - y : "yyy", - 0 : 0, - 1 : 1, - } - logit(a) -} - -function hoo() { - for (let i = 0; i < 1; ++i) { - let a = { - 444444444444 : 16, - } - print(a[444444444444]); - } -} - -foo(); -goo(); -hoo(); diff --git a/test/moduletest/createobjectwithbuffer/expect_output.txt b/test/moduletest/createobjectwithbuffer/expect_output.txt deleted file mode 100644 index 1ec0a1e06b..0000000000 --- a/test/moduletest/createobjectwithbuffer/expect_output.txt +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright (c) 2023 Huawei Device Co., Ltd. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -1 -tik -0 -1 -1 -yyy -0 -1 -16