Lines Matching refs:JSHandle

205     JSHandle<Method> NewMethodForNativeFunction(const void *func, FunctionKind kind = FunctionKind::NORMAL_FUNCTION,
210 JSHandle<ProfileTypeInfo> NewProfileTypeInfo(uint32_t length);
211 JSHandle<ConstantPool> NewConstantPool(uint32_t capacity);
212 JSHandle<Program> NewProgram();
214 JSHandle<JSObject> PUBLIC_API GetJSError(const ErrorType &errorType, const char *data = nullptr,
217 JSHandle<JSObject> NewJSError(const ErrorType &errorType, const JSHandle<EcmaString> &message,
220 JSHandle<JSObject> NewJSAggregateError();
222 JSHandle<TransitionHandler> NewTransitionHandler();
224 JSHandle<PrototypeHandler> NewPrototypeHandler();
226 JSHandle<TransWithProtoHandler> NewTransWithProtoHandler();
228 JSHandle<StoreTSHandler> NewStoreTSHandler();
230 JSHandle<JSObject> NewEmptyJSObject(uint32_t inlinedProps = JSHClass::DEFAULT_CAPACITY_OF_IN_OBJECTS);
234 JSHandle<JSFunction> NewJSFunction(const JSHandle<GlobalEnv> &env, const void *nativeFunc = nullptr,
238 JSHandle<JSFunction> NewSFunction(const JSHandle<GlobalEnv> &env,
243 void InitializeMethod(const MethodLiteral *methodLiteral, JSHandle<Method> &method);
245 JSHandle<JSFunction> NewJSFunction(const JSHandle<GlobalEnv> &env, const JSHandle<Method> &method);
247 JSHandle<JSFunction> NewJSFunction(const JSHandle<Method> &methodHandle);
249 JSHandle<JSFunction> NewJSFunction(const JSHandle<Method> &methodHandle,
250 const JSHandle<JSTaggedValue> &homeObject);
252 JSHandle<JSFunction> NewJSNativeErrorFunction(const JSHandle<GlobalEnv> &env, const void *nativeFunc = nullptr);
254 JSHandle<JSFunction> NewSpecificTypedArrayFunction(const JSHandle<GlobalEnv> &env,
259 JSHandle<JSObject> OrdinaryNewJSObjectCreate(const JSHandle<JSTaggedValue> &proto);
261 JSHandle<JSObject> CreateNullJSObject();
263 JSHandle<JSFunction> NewAotFunction(uint32_t numArgs, uintptr_t codeEntry);
265 JSHandle<JSBoundFunction> NewJSBoundFunction(const JSHandle<JSTaggedValue> &target,
266 const JSHandle<JSTaggedValue> &boundThis,
267 const JSHandle<TaggedArray> &args);
269 JSHandle<JSIntlBoundFunction> NewJSIntlBoundFunction(MethodIndex idx, int functionLength = 1);
271 JSHandle<JSProxyRevocFunction> NewJSProxyRevocFunction(const JSHandle<JSProxy> &proxy);
273 JSHandle<JSAsyncAwaitStatusFunction> NewJSAsyncAwaitStatusFunction(MethodIndex idx);
275 JSHandle<JSGeneratorObject> NewJSGeneratorObject(JSHandle<JSTaggedValue> generatorFunction);
277 JSHandle<JSAsyncFuncObject> NewJSAsyncFuncObject();
278 JSHandle<JSAsyncGeneratorObject> NewJSAsyncGeneratorObject(JSHandle<JSTaggedValue> generatorFunction);
280 JSHandle<JSPrimitiveRef> NewJSPrimitiveRef(const JSHandle<JSFunction> &function,
281 const JSHandle<JSTaggedValue> &object);
282 JSHandle<JSPrimitiveRef> NewJSPrimitiveRef(PrimitiveType type, const JSHandle<JSTaggedValue> &object);
285 JSHandle<GlobalEnv> NewGlobalEnv(JSHClass *globalEnvClass);
288 JSHandle<LexicalEnv> NewLexicalEnv(int numSlots);
292 JSHandle<JSSymbol> NewEmptySymbol();
294 JSHandle<JSSymbol> NewJSSymbol();
296 JSHandle<JSSymbol> NewPrivateSymbol();
298 JSHandle<JSSymbol> NewPrivateNameSymbol(const JSHandle<JSTaggedValue> &name);
300 JSHandle<JSSymbol> NewWellKnownSymbol(const JSHandle<JSTaggedValue> &name);
302 JSHandle<JSSymbol> NewPublicSymbol(const JSHandle<JSTaggedValue> &name);
304 JSHandle<JSSymbol> NewSymbolWithTable(const JSHandle<JSTaggedValue> &name);
306 JSHandle<JSSymbol> NewPrivateNameSymbolWithChar(std::string_view description);
308 JSHandle<JSSymbol> NewWellKnownSymbolWithChar(std::string_view description);
310 JSHandle<JSSymbol> NewPublicSymbolWithChar(std::string_view description);
312 JSHandle<JSSymbol> NewSymbolWithTableWithChar(std::string_view description);
314 JSHandle<AccessorData> NewAccessorData();
315 JSHandle<AccessorData> NewInternalAccessor(void *setter, void *getter);
317 JSHandle<PromiseCapability> NewPromiseCapability();
319 JSHandle<PromiseReaction> NewPromiseReaction();
321 JSHandle<PromiseRecord> NewPromiseRecord();
322 JSHandle<AsyncGeneratorRequest> NewAsyncGeneratorRequest();
324 JSHandle<AsyncIteratorRecord> NewAsyncIteratorRecord(const JSHandle<JSTaggedValue> &itor,
325 const JSHandle<JSTaggedValue> &next, bool done);
327 JSHandle<ResolvingFunctionsRecord> NewResolvingFunctionsRecord();
329 JSHandle<PromiseIteratorRecord> NewPromiseIteratorRecord(const JSHandle<JSTaggedValue> &itor, bool done);
331 JSHandle<job::MicroJobQueue> NewMicroJobQueue();
333 JSHandle<job::PendingJob> NewPendingJob(const JSHandle<JSFunction> &func, const JSHandle<TaggedArray> &argv);
335 JSHandle<JSArray> NewJSArray();
336 JSHandle<JSSharedArray> PUBLIC_API NewJSSArray();
337 JSHandle<JSArray> PUBLIC_API NewJSArray(size_t length, JSHandle<JSHClass> &hclass);
338 JSHandle<TaggedArray> PUBLIC_API NewJsonFixedArray(size_t start, size_t length,
339 const std::vector<JSHandle<JSTaggedValue>> &vec);
340 JSHandle<TaggedArray> PUBLIC_API NewSJsonFixedArray(size_t start, size_t length,
341 const std::vector<JSHandle<JSTaggedValue>> &vec);
343 JSHandle<JSProxy> NewJSProxy(const JSHandle<JSTaggedValue> &target, const JSHandle<JSTaggedValue> &handler);
344 JSHandle<JSRealm> NewJSRealm();
346 JSHandle<JSArguments> NewJSArguments();
348 JSHandle<JSPrimitiveRef> NewJSString(const JSHandle<JSTaggedValue> &str, const JSHandle<JSTaggedValue> &newTarget);
351 JSHandle<TaggedArray> ConvertListToArray(const JSThread *thread, const JSHandle<Derived> &list,
355 JSHandle<TaggedArray> dstElements = NewTaggedArrayWithoutInit(numberOfNodes, spaceType);
367 JSHandle<JSObject> NewAndCopyJSArrayObject(JSHandle<JSObject> thisObjHandle, uint32_t newLength,
369 JSHandle<TaggedArray> NewAndCopyTaggedArray(JSHandle<TaggedArray> &srcElements, uint32_t newLength,
371 JSHandle<TaggedArray> NewAndCopyTaggedArraySkipBarrier(JSHandle<TaggedArray> &srcElements, uint32_t newLength,
373 JSHandle<TaggedArray> NewAndCopySNameDictionary(JSHandle<TaggedArray> &srcElements, uint32_t length);
374 JSHandle<TaggedArray> NewAndCopyTaggedArrayByObject(JSHandle<JSObject> thisObjHandle, uint32_t newLength,
376 JSHandle<MutantTaggedArray> NewAndCopyMutantTaggedArrayByObject(JSHandle<JSObject> thisObjHandle,
379 JSHandle<TaggedArray> PUBLIC_API NewTaggedArray(uint32_t length, JSTaggedValue initVal = JSTaggedValue::Hole());
380 JSHandle<TaggedArray> NewTaggedArray(uint32_t length, JSTaggedValue initVal, bool nonMovable);
381 JSHandle<TaggedArray> NewTaggedArray(uint32_t length, JSTaggedValue initVal, MemSpaceType spaceType);
383 JSHandle<COWTaggedArray> NewCOWTaggedArray(uint32_t length, JSTaggedValue initVal = JSTaggedValue::Hole());
384 JSHandle<COWMutantTaggedArray> NewCOWMutantTaggedArray(uint32_t length, JSTaggedType initVal = base::SPECIAL_HOLE);
385 JSHandle<MutantTaggedArray> NewMutantTaggedArray(uint32_t length, JSTaggedType initVal = base::SPECIAL_HOLE);
386 JSHandle<TaggedArray> PUBLIC_API NewDictionaryArray(uint32_t length);
387 JSHandle<JSForInIterator> NewJSForinIterator(const JSHandle<JSTaggedValue> &obj,
388 const JSHandle<JSTaggedValue> keys,
389 const JSHandle<JSTaggedValue> cachedHclass);
391 JSHandle<ByteArray> NewByteArray(uint32_t length, uint32_t size, void *srcData = nullptr,
394 JSHandle<PropertyBox> NewPropertyBox(const JSHandle<JSTaggedValue> &name);
396 JSHandle<ProtoChangeMarker> NewProtoChangeMarker();
398 JSHandle<ProtoChangeDetails> NewProtoChangeDetails();
400 JSHandle<MarkerCell> NewMarkerCell();
401 JSHandle<BigInt> NewBigInt(uint32_t length);
403 JSHandle<TaggedArray> ExtendArray(const JSHandle<TaggedArray> &old, uint32_t length,
407 JSHandle<TaggedArray> CopyPartArray(const JSHandle<TaggedArray> &old, uint32_t start, uint32_t end);
408 JSHandle<TaggedArray> PUBLIC_API CopyArray(const JSHandle<TaggedArray> &old, uint32_t oldLength, uint32_t newLength,
412 JSHandle<TaggedArray> CopyFromEnumCache(const JSHandle<TaggedArray> &old);
413 JSHandle<TaggedArray> CloneProperties(const JSHandle<TaggedArray> &old);
414 JSHandle<TaggedArray> CloneProperties(const JSHandle<TaggedArray> &old, const JSHandle<JSTaggedValue> &env,
415 const JSHandle<JSObject> &obj);
417 JSHandle<LayoutInfo> PUBLIC_API CreateLayoutInfo(int properties, MemSpaceType type = MemSpaceType::SEMI_SPACE,
420 JSHandle<LayoutInfo> ExtendLayoutInfo(const JSHandle<LayoutInfo> &old, int properties);
422 JSHandle<LayoutInfo> CopyLayoutInfo(const JSHandle<LayoutInfo> &old);
424 JSHandle<LayoutInfo> CopyAndReSort(const JSHandle<LayoutInfo> &old, int end, int capacity);
426 JSHandle<EcmaString> GetEmptyString() const;
428 JSHandle<TaggedArray> EmptyArray() const;
430 JSHandle<MutantTaggedArray> EmptyMutantArray() const;
435 TaggedObject *NewObject(const JSHandle<JSHClass> &hclass);
437 TaggedObject *NewNonMovableObject(const JSHandle<JSHClass> &hclass, uint32_t inobjPropCount = 0);
439 void InitializeExtraProperties(const JSHandle<JSHClass> &hclass, TaggedObject *obj, uint32_t inobjPropCount);
441 JSHandle<TaggedQueue> NewTaggedQueue(uint32_t length);
443 JSHandle<TaggedQueue> GetEmptyTaggedQueue() const;
445 JSHandle<JSSetIterator> NewJSSetIterator(const JSHandle<JSSet> &set, IterationKind kind);
446 JSHandle<JSSharedSetIterator> NewJSSetIterator(const JSHandle<JSSharedSet> &set, IterationKind kind);
448 JSHandle<JSRegExpIterator> NewJSRegExpIterator(const JSHandle<JSTaggedValue> &matcher,
449 const JSHandle<EcmaString> &inputStr, bool global,
452 JSHandle<JSMapIterator> NewJSMapIterator(const JSHandle<JSMap> &map, IterationKind kind);
454 JSHandle<JSSharedMapIterator> NewJSMapIterator(const JSHandle<JSSharedMap> &map, IterationKind kind);
456 JSHandle<JSArrayIterator> NewJSArrayIterator(const JSHandle<JSObject> &array, IterationKind kind);
457 JSHandle<JSSharedArrayIterator> NewJSSharedArrayIterator(const JSHandle<JSObject> &array, IterationKind kind);
459 JSHandle<CompletionRecord> NewCompletionRecord(CompletionRecordType type, JSHandle<JSTaggedValue> value);
461 JSHandle<GeneratorContext> NewGeneratorContext();
463 JSHandle<JSPromiseReactionsFunction> CreateJSPromiseReactionsFunction(MethodIndex idx);
465 JSHandle<JSPromiseExecutorFunction> CreateJSPromiseExecutorFunction();
467 JSHandle<JSAsyncModuleFulfilledFunction> CreateJSAsyncModuleFulfilledFunction();
469 JSHandle<JSAsyncModuleRejectedFunction> CreateJSAsyncModuleRejectedFunction();
471 JSHandle<JSPromiseAllResolveElementFunction> NewJSPromiseAllResolveElementFunction();
473 JSHandle<JSPromiseAnyRejectElementFunction> NewJSPromiseAnyRejectElementFunction();
475 JSHandle<JSPromiseAllSettledElementFunction> NewJSPromiseAllSettledResolveElementFunction();
477 JSHandle<JSPromiseAllSettledElementFunction> NewJSPromiseAllSettledRejectElementFunction();
479 JSHandle<JSPromiseFinallyFunction> NewJSPromiseThenFinallyFunction();
481 JSHandle<JSPromiseFinallyFunction> NewJSPromiseCatchFinallyFunction();
483 JSHandle<JSPromiseValueThunkOrThrowerFunction> NewJSPromiseValueThunkFunction();
485 JSHandle<JSPromiseValueThunkOrThrowerFunction> NewJSPromiseThrowerFunction();
487 JSHandle<JSAsyncGeneratorResNextRetProRstFtn> NewJSAsyGenResNextRetProRstFulfilledFtn();
489 JSHandle<JSAsyncGeneratorResNextRetProRstFtn> NewJSAsyGenResNextRetProRstRejectedFtn();
491 JSHandle<JSAsyncFromSyncIterUnwarpFunction> NewJSAsyncFromSyncIterUnwarpFunction();
493 JSHandle<JSObject> CloneObjectLiteral(JSHandle<JSObject> object, const JSHandle<JSTaggedValue> &env,
495 JSHandle<JSObject> CloneObjectLiteral(JSHandle<JSObject> object);
496 JSHandle<JSArray> CloneArrayLiteral(JSHandle<JSArray> object);
497 JSHandle<JSFunction> CloneJSFunction(JSHandle<JSFunction> func);
498 JSHandle<JSFunction> CloneSFunction(JSHandle<JSFunction> func);
499 JSHandle<JSFunction> CloneClassCtor(JSHandle<JSFunction> ctor, const JSHandle<JSTaggedValue> &lexenv,
501 JSHandle<JSFunction> CreateJSFunctionFromTemplate(JSHandle<FunctionTemplate> funcTemp);
502 JSHandle<JSFunction> CreateSFunctionFromTemplate(JSHandle<FunctionTemplate> funcTemp);
504 void NewJSArrayBufferData(const JSHandle<JSArrayBuffer> &array, int32_t length);
505 void NewJSSendableArrayBufferData(const JSHandle<JSSendableArrayBuffer> &array, int32_t length);
506 JSHandle<JSSendableArrayBuffer> NewJSSendableArrayBuffer(int32_t length);
507 JSHandle<JSSendableArrayBuffer> NewJSSendableArrayBuffer(void *buffer, int32_t length,
510 JSHandle<JSArrayBuffer> NewJSArrayBuffer(int32_t length);
512 JSHandle<JSArrayBuffer> NewJSArrayBuffer(void *buffer, int32_t length, const NativePointerCallback &deleter,
515 JSHandle<JSDataView> NewJSDataView(JSHandle<JSArrayBuffer> buffer, uint32_t offset, uint32_t length);
517 void NewJSSharedArrayBufferData(const JSHandle<JSArrayBuffer> &array, int32_t length);
519 JSHandle<JSArrayBuffer> NewJSSharedArrayBuffer(int32_t length);
521 JSHandle<JSArrayBuffer> NewJSSharedArrayBuffer(void *buffer, int32_t length);
523 void NewJSRegExpByteCodeData(const JSHandle<JSRegExp> &regexp, void *buffer, size_t size);
526 inline void NewJSIntlIcuData(const JSHandle<T> &obj, const S &icu, const NativePointerCallback &callback);
528 EcmaString *PUBLIC_API InternString(const JSHandle<JSTaggedValue> &key);
530 inline JSHandle<JSNativePointer> NewJSNativePointer(void *externalPointer,
538 JSHandle<JSObject> NewOldSpaceObjLiteralByHClass(const JSHandle<JSHClass> &hclass);
539 JSHandle<JSHClass> SetLayoutInObjHClass(const JSHandle<TaggedArray> &properties, size_t length,
540 const JSHandle<JSHClass> &objClass);
542 JSHandle<JSHClass> CreateObjectLiteralRootHClass(size_t length);
543 JSHandle<JSHClass> GetObjectLiteralRootHClass(size_t length);
544 JSHandle<JSHClass> GetObjectLiteralHClass(const JSHandle<TaggedArray> &properties, size_t length);
546 JSHandle<JSFunction> NewJSFunctionByHClass(const JSHandle<Method> &method, const JSHandle<JSHClass> &clazz,
548 JSHandle<JSFunction> NewJSFunctionByHClass(const void *func, const JSHandle<JSHClass> &clazz,
550 JSHandle<JSFunction> NewJSFunctionByHClassWithoutAccessor(const void *func,
551 const JSHandle<JSHClass> &clazz, FunctionKind kind = FunctionKind::NORMAL_FUNCTION);
552 JSHandle<Method> NewMethod(const MethodLiteral *methodLiteral, MemSpaceType spaceType = OLD_SPACE);
554 JSHandle<Method> NewMethod(const JSPandaFile *jsPandaFile, MethodLiteral *methodLiteral,
555 JSHandle<ConstantPool> constpool, uint32_t entryIndex,
559 JSHandle<JSObject> PUBLIC_API NewJSObjectByConstructor(const JSHandle<JSFunction> &constructor,
560 const JSHandle<JSTaggedValue> &newTarget);
561 JSHandle<JSObject> NewJSObjectByConstructor(JSHandle<GlobalEnv> env,
562 const JSHandle<JSFunction> &constructor, uint32_t inlinedProps);
563 JSHandle<JSObject> NewJSObjectByConstructor(const JSHandle<JSFunction> &constructor,
565 void InitializeJSObject(const JSHandle<JSObject> &obj, const JSHandle<JSHClass> &jshclass);
567 JSHandle<JSObject> NewJSObjectWithInit(const JSHandle<JSHClass> &jshclass);
570 JSHandle<MachineCode> SetMachineCodeObjectData(TaggedObject *obj, size_t length,
571 const MachineCodeDesc &desc, JSHandle<Method> &method);
572 JSHandle<MachineCode> NewMachineCodeObject(size_t length, const MachineCodeDesc &desc, JSHandle<Method> &method);
573 JSHandle<ClassInfoExtractor> NewClassInfoExtractor(JSHandle<JSTaggedValue> method);
574 JSHandle<ClassLiteral> NewClassLiteral();
577 JSHandle<EcmaString> PUBLIC_API NewFromASCII(std::string_view data);
578 JSHandle<EcmaString> NewFromUtf8WithoutStringTable(std::string_view data);
579 JSHandle<EcmaString> PUBLIC_API NewFromUtf8(std::string_view data);
580 JSHandle<EcmaString> NewFromUtf8(std::string_view data, bool canBeCompress);
581 JSHandle<EcmaString> NewFromUtf8ReadOnly(std::string_view data);
582 JSHandle<EcmaString> NewFromASCIISkippingStringTable(std::string_view data);
583 JSHandle<EcmaString> NewFromUtf16WithoutStringTable(std::u16string_view data);
584 JSHandle<EcmaString> NewFromUtf16(std::u16string_view data);
586 JSHandle<EcmaString> PUBLIC_API NewFromStdString(const std::string &data);
588 JSHandle<EcmaString> NewFromUtf8WithoutStringTable(const uint8_t *utf8Data, uint32_t utf8Len);
589 JSHandle<EcmaString> NewFromUtf8(const uint8_t *utf8Data, uint32_t utf8Len);
591 JSHandle<EcmaString> NewFromUtf16WithoutStringTable(const uint16_t *utf16Data, uint32_t utf16Len);
592 JSHandle<EcmaString> PUBLIC_API NewFromUtf16(const uint16_t *utf16Data, uint32_t utf16Len);
593 JSHandle<EcmaString> NewFromUtf16Compress(const uint16_t *utf16Data, uint32_t utf16Len);
594 JSHandle<EcmaString> NewFromUtf16NotCompress(const uint16_t *utf16Data, uint32_t utf16Len);
596 JSHandle<EcmaString> NewFromUtf8Literal(const uint8_t *utf8Data, uint32_t utf8Len);
597 JSHandle<EcmaString> PUBLIC_API NewFromUtf8LiteralCompress(const uint8_t *utf8Data, uint32_t utf8Len);
598 JSHandle<EcmaString> PUBLIC_API NewFromUtf8LiteralCompressSubString(const JSHandle<EcmaString> &string,
600 JSHandle<EcmaString> PUBLIC_API NewCompressedUtf8(const uint8_t *utf8Data, uint32_t utf8Len);
601 JSHandle<EcmaString> PUBLIC_API NewCompressedUtf8SubString(const JSHandle<EcmaString> &string,
603 JSHandle<EcmaString> NewFromUtf16Literal(const uint16_t *utf16Data, uint32_t utf16Len);
604 JSHandle<EcmaString> NewFromUtf16LiteralCompress(const uint16_t *utf16Data, uint32_t utf16Len);
605 JSHandle<EcmaString> PUBLIC_API NewFromUtf16LiteralNotCompress(const uint16_t *utf16Data, uint32_t utf16Len);
616 JSHandle<EcmaString> ConcatFromString(const JSHandle<EcmaString> &firstString,
617 const JSHandle<EcmaString> &secondString);
620 JSHandle<JSObject> PUBLIC_API NewJSObject(const JSHandle<JSHClass> &jshclass);
623 JSHandle<JSHClass> NewEcmaHClass(uint32_t size, JSType type, const JSHandle<JSTaggedValue> &prototype);
624 JSHandle<JSHClass> NewEcmaHClass(uint32_t size, uint32_t inlinedProps, JSType type,
625 const JSHandle<JSTaggedValue> &prototype);
628 JSHandle<JSHClass> PUBLIC_API NewEcmaHClass(uint32_t size, JSType type,
631 JSHandle<JSHClass> PUBLIC_API NewEcmaHClass(uint32_t size, uint32_t inlinedProps, JSType type,
632 const JSHandle<JSTaggedValue> &prototype, const JSHandle<JSTaggedValue> &layout);
635 JSHandle<JSAPIPlainArray> NewJSAPIPlainArray(uint32_t capacity);
636 JSHandle<JSAPIPlainArrayIterator> NewJSAPIPlainArrayIterator(const JSHandle<JSAPIPlainArray> &plainarray,
638 JSHandle<JSAPIArrayList> NewJSAPIArrayList(uint32_t capacity);
640 JSHandle<JSAPILightWeightMapIterator> NewJSAPILightWeightMapIterator(const JSHandle<JSAPILightWeightMap> &obj,
642 JSHandle<JSAPILightWeightSetIterator> NewJSAPILightWeightSetIterator(const JSHandle<JSAPILightWeightSet> &obj,
644 JSHandle<TaggedArray> CopyQueue(const JSHandle<TaggedArray> &old, uint32_t newLength,
646 JSHandle<JSAPIQueueIterator> NewJSAPIQueueIterator(const JSHandle<JSAPIQueue> &queue);
647 JSHandle<TaggedArray> CopyDeque(const JSHandle<TaggedArray> &old, uint32_t newLength, uint32_t oldLength,
649 JSHandle<JSAPIDequeIterator> NewJSAPIDequeIterator(const JSHandle<JSAPIDeque> &deque);
650 JSHandle<JSAPIArrayListIterator> NewJSAPIArrayListIterator(const JSHandle<JSAPIArrayList> &arrayList);
651 JSHandle<JSAPIList> NewJSAPIList();
652 JSHandle<JSAPILinkedList> NewJSAPILinkedList();
653 JSHandle<JSAPILinkedListIterator> NewJSAPILinkedListIterator(const JSHandle<JSAPILinkedList> &linkedList);
654 JSHandle<JSAPIListIterator> NewJSAPIListIterator(const JSHandle<JSAPIList> &list);
655 JSHandle<JSAPITreeMapIterator> NewJSAPITreeMapIterator(const JSHandle<JSAPITreeMap> &map, IterationKind kind);
656 JSHandle<JSAPITreeSetIterator> NewJSAPITreeSetIterator(const JSHandle<JSAPITreeSet> &set, IterationKind kind);
657 JSHandle<JSAPIStackIterator> NewJSAPIStackIterator(const JSHandle<JSAPIStack> &stack);
658 JSHandle<JSAPIVector> NewJSAPIVector(uint32_t capacity);
659 JSHandle<JSAPIVectorIterator> NewJSAPIVectorIterator(const JSHandle<JSAPIVector> &vector);
660 JSHandle<JSAPIBitVector> NewJSAPIBitVector(uint32_t capacity);
661 JSHandle<JSAPIBitVectorIterator> NewJSAPIBitVectorIterator(const JSHandle<JSAPIBitVector> &bitVector);
662 JSHandle<JSAPIHashMapIterator> NewJSAPIHashMapIterator(const JSHandle<JSAPIHashMap> &hashMap, IterationKind kind);
663 JSHandle<JSAPIHashSetIterator> NewJSAPIHashSetIterator(const JSHandle<JSAPIHashSet> &hashSet, IterationKind kind);
664 JSHandle<TaggedHashArray> NewTaggedHashArray(uint32_t length);
665 JSHandle<LinkedNode> NewLinkedNode(int hash, const JSHandle<JSTaggedValue> &key,
666 const JSHandle<JSTaggedValue> &value,
667 const JSHandle<LinkedNode> &next);
668 JSHandle<RBTreeNode> NewTreeNode(int hash, const JSHandle<JSTaggedValue> &key,
669 const JSHandle<JSTaggedValue> &value);
671 JSHandle<ModuleNamespace> NewModuleNamespace();
672 JSHandle<NativeModuleFailureInfo> NewNativeModuleFailureInfo();
673 JSHandle<ImportEntry> NewImportEntry();
674 JSHandle<ImportEntry> NewImportEntry(const JSHandle<JSTaggedValue> &moduleRequest,
675 const JSHandle<JSTaggedValue> &importName,
676 const JSHandle<JSTaggedValue> &localName,
678 JSHandle<LocalExportEntry> NewLocalExportEntry();
679 JSHandle<LocalExportEntry> NewLocalExportEntry(
680 const JSHandle<JSTaggedValue> &exportName, const JSHandle<JSTaggedValue> &localName,
682 JSHandle<IndirectExportEntry> NewIndirectExportEntry();
683 JSHandle<IndirectExportEntry> NewIndirectExportEntry(const JSHandle<JSTaggedValue> &exportName,
684 const JSHandle<JSTaggedValue> &moduleRequest,
685 const JSHandle<JSTaggedValue> &importName,
687 JSHandle<StarExportEntry> NewStarExportEntry();
688 JSHandle<StarExportEntry> NewStarExportEntry(const JSHandle<JSTaggedValue> &moduleRequest,
690 JSHandle<SourceTextModule> NewSourceTextModule();
691 JSHandle<ResolvedBinding> NewResolvedBindingRecord();
692 JSHandle<ResolvedBinding> NewResolvedBindingRecord(const JSHandle<SourceTextModule> &module,
693 const JSHandle<JSTaggedValue> &bindingName);
694 JSHandle<ResolvedIndexBinding> NewResolvedIndexBindingRecord();
695 JSHandle<ResolvedIndexBinding> NewResolvedIndexBindingRecord(
696 const JSHandle<SourceTextModule> &module, int32_t index);
698 JSHandle<CellRecord> NewCellRecord();
699 JSHandle<JSFunction> NewJSAsyncGeneratorFunction(const JSHandle<Method> &method);
701 JSHandle<CjsModule> NewCjsModule();
702 JSHandle<CjsExports> NewCjsExports();
703 JSHandle<CjsRequire> NewCjsRequire();
705 JSHandle<JSHClass> CreateIteratorResultInstanceClass(const JSHandle<GlobalEnv> &env);
708 JSHandle<JSObject> NewOldSpaceJSObject(const JSHandle<JSHClass> &jshclass);
709 TaggedObject *NewOldSpaceObject(const JSHandle<JSHClass> &hclass);
710 JSHandle<TaggedArray> NewOldSpaceTaggedArray(uint32_t length, JSTaggedValue initVal = JSTaggedValue::Hole());
713 JSHandle<JSArray> NewJSStableArrayWithElements(const JSHandle<TaggedArray> &elements);
716 JSHandle<AOTLiteralInfo> NewAOTLiteralInfo(uint32_t length, JSTaggedValue initVal = JSTaggedValue::Hole());
717 JSHandle<ExtraProfileTypeInfo> NewExtraProfileTypeInfo();
718 JSHandle<ProfileTypeInfoCell> NewProfileTypeInfoCell(const JSHandle<JSTaggedValue> &value);
719 JSHandle<FunctionTemplate> NewFunctionTemplate(
720 const JSHandle<Method> &method, const JSHandle<JSTaggedValue> &module, int32_t length);
721 JSHandle<VTable> NewVTable(uint32_t length, JSTaggedValue initVal = JSTaggedValue::Hole());
722 JSHandle<JSHClass> NewEcmaHClass(JSHClass *hclass, uint32_t size, JSType type,
726 JSHandle<JSTaggedValue> CreateJSObjectWithProperties(size_t propertyCount, const Local<JSValueRef> *keys,
728 JSHandle<JSTaggedValue> CreateJSObjectWithNamedProperties(size_t propertyCount, const char **keys,
734 JSHandle<JSObject> PUBLIC_API NewSharedOldSpaceJSObject(const JSHandle<JSHClass> &jshclass);
736 JSHandle<JSObject> PUBLIC_API NewSharedOldSpaceJSObjectWithInit(const JSHandle<JSHClass> &jshclass);
738 TaggedObject *NewSharedOldSpaceObject(const JSHandle<JSHClass> &hclass);
740 JSHandle<JSTaggedValue> CreateSObjectWithProperties(std::vector<PropertyDescriptor> &descs);
742 JSHandle<JSHClass> PUBLIC_API NewSEcmaHClass(uint32_t size, JSType type, uint32_t inlinedProps);
744 JSHandle<JSHClass> PUBLIC_API NewSEcmaHClass(JSHClass *hclass, uint32_t size, JSType type,
747 JSHandle<JSHClass> PUBLIC_API NewSEcmaHClass(uint32_t size, uint32_t inlinedProps, JSType type,
748 const JSHandle<JSTaggedValue> &prototype, const JSHandle<JSTaggedValue> &layout);
750 JSHandle<JSHClass> PUBLIC_API NewSEcmaHClassDictMode(uint32_t size, uint32_t inlinedProps, JSType type,
751 const JSHandle<JSTaggedValue> &prototype);
753 JSHandle<JSHClass> NewSEcmaHClassClass(JSHClass *hclass, uint32_t size, JSType type);
755 JSHandle<JSHClass> InitSClassClass();
757 JSHandle<JSHClass> NewSEcmaReadOnlyHClass(JSHClass *hclass, uint32_t size, JSType type,
760 JSHandle<TaggedArray> SharedEmptyArray() const;
762 JSHandle<TaggedArray> CopySArray(const JSHandle<TaggedArray> &old, uint32_t oldLength, uint32_t newLength,
766 JSHandle<TaggedArray> ExtendSArray(const JSHandle<TaggedArray> &old, uint32_t length,
769 JSHandle<Method> NewSMethodForNativeFunction(const void *func, FunctionKind kind = FunctionKind::NORMAL_FUNCTION,
774 JSHandle<JSFunction> NewSFunctionByHClass(const JSHandle<Method> &methodHandle,
775 const JSHandle<JSHClass> &hclass);
776 JSHandle<JSFunction> NewSFunctionByHClass(const void *func, const JSHandle<JSHClass> &hclass,
781 JSHandle<JSFunction> NewSFunctionWithAccessor(
783 const JSHandle<JSHClass> &hclass,
788 JSHandle<Method> NewSMethod(const MethodLiteral *methodLiteral, MemSpaceType methodSpaceType = SHARED_OLD_SPACE);
790 JSHandle<Method> PUBLIC_API NewSMethod(const JSPandaFile *jsPandaFile,
792 JSHandle<ConstantPool> constpool,
797 JSHandle<ConstantPool> NewSConstantPool(uint32_t capacity);
799 JSHandle<AOTLiteralInfo> NewSAOTLiteralInfo(uint32_t length, JSTaggedValue initVal = JSTaggedValue::Hole());
801 JSHandle<COWTaggedArray> NewSCOWTaggedArray(uint32_t length, JSTaggedValue initVal = JSTaggedValue::Hole());
803 JSHandle<ClassLiteral> NewSClassLiteral();
805 JSHandle<ClassInfoExtractor> NewSClassInfoExtractor(JSHandle<JSTaggedValue> method);
807 JSHandle<TaggedArray> NewSOldSpaceTaggedArray(uint32_t length, JSTaggedValue initVal = JSTaggedValue::Hole());
809 JSHandle<TaggedArray> PUBLIC_API NewSTaggedArray(uint32_t length,
813 JSHandle<AccessorData> NewSAccessorData();
815 JSHandle<SourceTextModule> NewSSourceTextModule();
817 JSHandle<ModuleNamespace> NewSModuleNamespace();
819 JSHandle<ImportEntry> NewSImportEntry(const JSHandle<JSTaggedValue> &moduleRequest,
820 const JSHandle<JSTaggedValue> &importName,
821 const JSHandle<JSTaggedValue> &localName);
823 JSHandle<LocalExportEntry> NewSLocalExportEntry(const JSHandle<JSTaggedValue> &exportName,
824 const JSHandle<JSTaggedValue> &localName, const uint32_t index);
826 JSHandle<IndirectExportEntry> NewSIndirectExportEntry(const JSHandle<JSTaggedValue> &exportName,
827 const JSHandle<JSTaggedValue> &moduleRequest,
828 const JSHandle<JSTaggedValue> &importName);
830 JSHandle<StarExportEntry> NewSStarExportEntry(const JSHandle<JSTaggedValue> &moduleRequest);
832 JSHandle<ResolvedIndexBinding> NewSResolvedIndexBindingRecord();
834 JSHandle<ResolvedIndexBinding> NewSResolvedIndexBindingRecord(const JSHandle<SourceTextModule> &module,
837 JSHandle<ResolvedBinding> NewSResolvedBindingRecord();
839 JSHandle<ResolvedBinding> NewSResolvedBindingRecord(const JSHandle<SourceTextModule> &module,
840 const JSHandle<JSTaggedValue> &bindingName);
842 JSHandle<ResolvedRecordIndexBinding> NewSResolvedRecordIndexBindingRecord();
844 JSHandle<ResolvedRecordIndexBinding> NewSResolvedRecordIndexBindingRecord(
845 const JSHandle<EcmaString> &moduleRecord, const JSHandle<EcmaString> &abcFileName, int32_t index);
847 JSHandle<ResolvedRecordBinding> NewSResolvedRecordBindingRecord();
849 JSHandle<ResolvedRecordBinding> NewSResolvedRecordBindingRecord(
850 const JSHandle<EcmaString> &moduleRecord, const JSHandle<JSTaggedValue> &bindingName);
852 JSHandle<LayoutInfo> CopyAndReSortSLayoutInfo(const JSHandle<LayoutInfo> &old, int end, int capacity);
854 JSHandle<LayoutInfo> PUBLIC_API CreateSLayoutInfo(uint32_t properties);
856 JSHandle<LayoutInfo> PUBLIC_API NewSEmptyLayoutInfo();
858 JSHandle<ProfileTypeInfoCell> NewSEmptyProfileTypeInfoCell();
860 JSHandle<FunctionTemplate> NewSFunctionTemplate(
861 const JSHandle<Method> &method, const JSHandle<JSTaggedValue> &module, int32_t length);
863 JSHandle<TaggedArray> NewSEmptyArray(); // only used for EcmaVM.
865 JSHandle<MutantTaggedArray> NewSEmptyMutantArray();
867 JSHandle<TaggedArray> PUBLIC_API NewSDictionaryArray(uint32_t length);
869 JSHandle<TaggedArray> NewSTaggedArrayWithoutInit(uint32_t length,
872 JSHandle<JSHClass> CreateSFunctionClass(uint32_t size, JSType type,
873 const JSHandle<JSTaggedValue> &prototype,
876 JSHandle<JSNativePointer> NewSJSNativePointer(void *externalPointer,
883 JSHandle<JSNativePointer> NewSReadOnlyJSNativePointer(void *externalPointer);
885 JSHandle<AccessorData> NewSInternalAccessor(void *setter, void *getter);
887 JSHandle<JSSymbol> NewSWellKnownSymbol(const JSHandle<JSTaggedValue> &name);
888 JSHandle<JSSymbol> NewSEmptySymbol();
889 JSHandle<JSSymbol> NewSWellKnownSymbolWithChar(std::string_view description);
890 JSHandle<JSSymbol> NewSPublicSymbolWithChar(std::string_view description);
891 JSHandle<JSSymbol> NewSPublicSymbol(const JSHandle<JSTaggedValue> &name);
892 JSHandle<SendableEnv> NewSendableEnv(int numSlots);
893 JSHandle<JSFunction> NewJSSendableFunction(const JSHandle<Method> &methodHandle);
920 JSHandle<JSHClass> NewEcmaHClassClass(JSHClass *hclass, uint32_t size, JSType type);
922 JSHandle<JSHClass> NewEcmaReadOnlyHClass(JSHClass *hclass, uint32_t size, JSType type,
924 JSHandle<JSHClass> InitClassClass();
927 JSHandle<JSObject> NewNonMovableJSObject(const JSHandle<JSHClass> &jshclass);
930 JSHandle<EcmaString> NewFromASCIINonMovable(std::string_view data);
932 JSHandle<EcmaString> NewFromASCIIReadOnly(std::string_view data);
935 JSHandle<JSFunction> NewJSFunction(const JSHandle<GlobalEnv> &env, const JSHandle<JSHClass> &hclass);
936 JSHandle<JSHClass> CreateObjectClass(const JSHandle<TaggedArray> &keys, const JSHandle<TaggedArray> &values);
937 JSHandle<JSHClass> CreateObjectClass(const JSHandle<TaggedArray> &properties, size_t length);
938 JSHandle<JSHClass> CreateFunctionClass(FunctionKind kind, uint32_t size, JSType type,
939 const JSHandle<JSTaggedValue> &prototype);
940 JSHandle<JSHClass> CreateBoundFunctionClass();
941 JSHandle<JSHClass> CreateDefaultClassPrototypeHClass(JSHClass *hclass);
942 JSHandle<JSHClass> CreateDefaultClassConstructorHClass(JSHClass *hclass);
945 JSHandle<JSPrimitiveRef> NewJSPrimitiveRef(const JSHandle<JSHClass> &hclass,
946 const JSHandle<JSTaggedValue> &object);
948 JSHandle<EcmaString> GetStringFromStringTable(const uint8_t *utf8Data, uint32_t utf8Len, bool canBeCompress) const;
949 JSHandle<EcmaString> GetCompressedSubStringFromStringTable(const JSHandle<EcmaString> &string, uint32_t offset,
951 JSHandle<EcmaString> GetStringFromStringTableNonMovable(const uint8_t *utf8Data, uint32_t utf8Len) const;
952 JSHandle<EcmaString> GetStringFromStringTableReadOnly(const uint8_t *utf8Data, uint32_t utf8Len,
963 JSHandle<EcmaString> GetStringFromStringTable(const uint16_t *utf16Data, uint32_t utf16Len,
966 JSHandle<EcmaString> GetStringFromStringTable(EcmaString *string) const;
968 JSHandle<EcmaString> GetStringFromStringTable(const JSHandle<EcmaString> &firstString,
969 const JSHandle<EcmaString> &secondString);
971 JSHandle<JSHClass> CreateJSArguments(const JSHandle<GlobalEnv> &env);
972 JSHandle<JSHClass> CreateJSArrayInstanceClass(JSHandle<JSTaggedValue> proto,
974 JSHandle<JSHClass> CreateJSRegExpInstanceClass(JSHandle<JSTaggedValue> proto);
977 JSHandle<TaggedArray> NewTaggedArrayWithoutInit(uint32_t length, MemSpaceType spaceType);
980 JSHandle<JSTaggedValue> CreateLargeJSObjectWithProperties(size_t propertyCount,
983 JSHandle<JSTaggedValue> CreateLargeJSObjectWithNamedProperties(size_t propertyCount, const char **keys,
986 JSHandle<JSTaggedValue> CreateDictionaryJSObjectWithProperties(size_t propertyCount,
989 JSHandle<JSTaggedValue> CreateDictionaryJSObjectWithNamedProperties(size_t propertyCount, const char **keys,
992 JSHandle<MutantTaggedArray> NewMutantTaggedArrayWithoutInit(uint32_t length, MemSpaceType spaceType);