Lines Matching refs:vm

223     Local(const EcmaVM *vm, const Global<T> &current);
225 Local(const EcmaVM *vm, const CopyableGlobal<T> &current);
309 CopyableGlobal(const EcmaVM *vm, const Local<S> &current);
311 CopyableGlobal(const EcmaVM *vm, const Local<T> &current);
407 Global(const EcmaVM *vm, const Local<S> &current);
409 Global(const EcmaVM *vm, const Global<S> &current);
421 Local<T> ToLocal(const EcmaVM *vm) const
423 return Local<T>(vm, *this);
475 static Local<PrimitiveRef> Undefined(const EcmaVM *vm);
476 static Local<PrimitiveRef> Null(const EcmaVM *vm);
477 static Local<PrimitiveRef> Hole(const EcmaVM *vm);
478 static Local<PrimitiveRef> True(const EcmaVM *vm);
479 static Local<PrimitiveRef> False(const EcmaVM *vm);
481 bool BooleaValue(const EcmaVM *vm);
482 int64_t IntegerValue(const EcmaVM *vm);
483 uint32_t Uint32Value(const EcmaVM *vm);
484 int32_t Int32Value(const EcmaVM *vm);
491 Local<NumberRef> ToNumber(const EcmaVM *vm);
492 Local<BooleanRef> ToBoolean(const EcmaVM *vm);
493 Local<BigIntRef> ToBigInt(const EcmaVM *vm);
494 Local<StringRef> ToString(const EcmaVM *vm);
495 Local<ObjectRef> ToObject(const EcmaVM *vm);
496 Local<ObjectRef> ToEcmaObject(const EcmaVM *vm);
497 Local<NativePointerRef> ToNativePointer(const EcmaVM *vm);
505 bool IsBigInt(const EcmaVM *vm);
509 bool IsString(const EcmaVM *vm);
510 bool IsSymbol(const EcmaVM *vm);
511 bool IsObject(const EcmaVM *vm);
512 bool IsArray(const EcmaVM *vm);
513 bool IsJSArray(const EcmaVM *vm);
514 bool IsConstructor(const EcmaVM *vm);
515 bool IsFunction(const EcmaVM *vm);
517 bool IsJSFunction(const EcmaVM *vm);
518 bool IsProxy(const EcmaVM *vm);
519 bool IsPromise(const EcmaVM *vm);
520 bool IsDataView(const EcmaVM *vm);
521 bool IsTypedArray(const EcmaVM *vm);
522 bool IsNativePointer(const EcmaVM *vm);
523 bool IsDate(const EcmaVM *vm);
524 bool IsError(const EcmaVM *vm);
525 bool IsMap(const EcmaVM *vm);
526 bool IsSet(const EcmaVM *vm);
527 bool IsWeakRef(const EcmaVM *vm);
528 bool IsWeakMap(const EcmaVM *vm);
529 bool IsWeakSet(const EcmaVM *vm);
530 bool IsRegExp(const EcmaVM *vm);
531 bool IsArrayIterator(const EcmaVM *vm);
532 bool IsStringIterator(const EcmaVM *vm);
533 bool IsSetIterator(const EcmaVM *vm);
534 bool IsMapIterator(const EcmaVM *vm);
535 bool IsArrayBuffer(const EcmaVM *vm);
536 bool IsBuffer(const EcmaVM *vm);
537 bool IsUint8Array(const EcmaVM *vm);
538 bool IsInt8Array(const EcmaVM *vm);
539 bool IsUint8ClampedArray(const EcmaVM *vm);
540 bool IsInt16Array(const EcmaVM *vm);
541 bool IsUint16Array(const EcmaVM *vm);
542 bool IsInt32Array(const EcmaVM *vm);
543 bool IsUint32Array(const EcmaVM *vm);
544 bool IsFloat32Array(const EcmaVM *vm);
545 bool IsFloat64Array(const EcmaVM *vm);
546 bool IsBigInt64Array(const EcmaVM *vm);
547 bool IsBigUint64Array(const EcmaVM *vm);
548 bool IsJSPrimitiveRef(const EcmaVM *vm);
549 bool IsJSPrimitiveNumber(const EcmaVM *vm);
550 bool IsJSPrimitiveInt(const EcmaVM *vm);
551 bool IsJSPrimitiveBoolean(const EcmaVM *vm);
552 bool IsJSPrimitiveString(const EcmaVM *vm);
554 bool IsJSSharedInt8Array(const EcmaVM *vm);
555 bool IsJSSharedUint8Array(const EcmaVM *vm);
556 bool IsJSSharedUint8ClampedArray(const EcmaVM *vm);
557 bool IsJSSharedInt16Array(const EcmaVM *vm);
558 bool IsJSSharedUint16Array(const EcmaVM *vm);
559 bool IsJSSharedInt32Array(const EcmaVM *vm);
560 bool IsJSSharedUint32Array(const EcmaVM *vm);
561 bool IsJSSharedFloat32Array(const EcmaVM *vm);
563 bool IsGeneratorObject(const EcmaVM *vm);
564 bool IsJSPrimitiveSymbol(const EcmaVM *vm);
566 bool IsArgumentsObject(const EcmaVM *vm);
567 bool IsGeneratorFunction(const EcmaVM *vm);
568 bool IsAsyncFunction(const EcmaVM *vm);
569 bool IsConcurrentFunction(const EcmaVM *vm);
570 bool IsJSLocale(const EcmaVM *vm);
571 bool IsJSDateTimeFormat(const EcmaVM *vm);
572 bool IsJSRelativeTimeFormat(const EcmaVM *vm);
573 bool IsJSIntl(const EcmaVM *vm);
574 bool IsJSNumberFormat(const EcmaVM *vm);
575 bool IsJSCollator(const EcmaVM *vm);
576 bool IsJSPluralRules(const EcmaVM *vm);
577 bool IsJSListFormat(const EcmaVM *vm);
578 bool IsAsyncGeneratorFunction(const EcmaVM *vm);
579 bool IsAsyncGeneratorObject(const EcmaVM *vm);
581 bool IsModuleNamespaceObject(const EcmaVM *vm);
582 bool IsNativeModuleFailureInfoObject(const EcmaVM *vm);
583 bool IsSharedArrayBuffer(const EcmaVM *vm);
584 bool IsSendableArrayBuffer(const EcmaVM *vm);
586 bool IsStrictEquals(const EcmaVM *vm, Local<JSValueRef> value);
587 Local<StringRef> Typeof(const EcmaVM *vm);
588 bool InstanceOf(const EcmaVM *vm, Local<JSValueRef> value);
590 bool IsArrayList(const EcmaVM *vm);
591 bool IsDeque(const EcmaVM *vm);
592 bool IsHashMap(const EcmaVM *vm);
593 bool IsHashSet(const EcmaVM *vm);
594 bool IsLightWeightMap(const EcmaVM *vm);
595 bool IsLightWeightSet(const EcmaVM *vm);
596 bool IsLinkedList(const EcmaVM *vm);
597 bool IsLinkedListIterator(const EcmaVM *vm);
598 bool IsList(const EcmaVM *vm);
599 bool IsPlainArray(const EcmaVM *vm);
600 bool IsQueue(const EcmaVM *vm);
601 bool IsStack(const EcmaVM *vm);
602 bool IsTreeMap(const EcmaVM *vm);
603 bool IsTreeSet(const EcmaVM *vm);
604 bool IsVector(const EcmaVM *vm);
605 bool IsSendableObject(const EcmaVM *vm);
606 bool IsJSShared(const EcmaVM *vm);
607 bool IsSharedArray(const EcmaVM *vm);
608 bool IsSharedTypedArray(const EcmaVM *vm);
609 bool IsSharedSet(const EcmaVM *vm);
610 bool IsSharedMap(const EcmaVM *vm);
611 bool IsSharedMapIterator(const EcmaVM *vm);
613 void *GetNativePointerValue(const EcmaVM *vm, bool &isNativePointer);
614 bool IsDetachedArraybuffer(const EcmaVM *vm, bool &isArrayBuffer);
615 void DetachedArraybuffer(const EcmaVM *vm, bool &isArrayBuffer);
616 void GetDataViewInfo(const EcmaVM *vm,
622 void TryGetArrayLength(const EcmaVM *vm, bool *isArrayOrSharedArray, uint32_t *arrayLength);
631 void *GetNativePointerValueImpl(const EcmaVM *vm, bool &isNativePointer);
692 Local<JSValueRef> GetValue(const EcmaVM *vm) const
695 return JSValueRef::Undefined(vm);
707 Local<JSValueRef> GetGetter(const EcmaVM *vm) const
710 return JSValueRef::Undefined(vm);
722 Local<JSValueRef> GetSetter(const EcmaVM *vm) const
725 return JSValueRef::Undefined(vm);
752 static Local<NativePointerRef> New(const EcmaVM *vm, void *nativePointer, size_t nativeBindingsize = 0);
753 static Local<NativePointerRef> New(const EcmaVM *vm, void *nativePointer, NativePointerCallback callBack,
755 static Local<NativePointerRef> NewConcurrent(const EcmaVM *vm, void *nativePointer,
758 static Local<NativePointerRef> NewSendable(const EcmaVM *vm,
783 static Local<ObjectRef> New(const EcmaVM *vm);
784 static uintptr_t NewObject(const EcmaVM *vm);
785 static Local<ObjectRef> NewS(const EcmaVM *vm);
786 static Local<ObjectRef> NewWithProperties(const EcmaVM *vm, size_t propertyCount, const Local<JSValueRef> *keys,
788 static Local<ObjectRef> NewSWithProperties(const EcmaVM *vm, SendablePropertiesInfo &info);
789 static Local<ObjectRef> NewWithNamedProperties(const EcmaVM *vm, size_t propertyCount, const char **keys,
791 static Local<ObjectRef> CreateNativeModuleFailureInfo(const EcmaVM *vm, const std::string &failureInfo);
792 static Local<ObjectRef> CreateAccessorData(const EcmaVM *vm, Local<FunctionRef> getter, Local<FunctionRef> setter);
793 static Local<ObjectRef> CreateSendableAccessorData(const EcmaVM *vm,
796 bool ConvertToNativeBindingObject(const EcmaVM *vm, Local<NativePointerRef> value);
797 bool Set(const EcmaVM *vm, Local<JSValueRef> key, Local<JSValueRef> value);
798 bool Set(const EcmaVM *vm, const char *utf8, Local<JSValueRef> value);
799 bool Set(const EcmaVM *vm, uint32_t key, Local<JSValueRef> value);
800 bool SetAccessorProperty(const EcmaVM *vm, Local<JSValueRef> key, Local<FunctionRef> getter,
802 Local<JSValueRef> Get(const EcmaVM *vm, Local<JSValueRef> key);
803 Local<JSValueRef> Get(const EcmaVM *vm, const char *utf8);
804 Local<JSValueRef> Get(const EcmaVM *vm, int32_t key);
806 bool GetOwnProperty(const EcmaVM *vm, Local<JSValueRef> key, PropertyAttribute &property);
807 Local<ArrayRef> GetOwnPropertyNames(const EcmaVM *vm);
808 Local<ArrayRef> GetAllPropertyNames(const EcmaVM *vm, uint32_t filter);
809 Local<ArrayRef> GetOwnEnumerablePropertyNames(const EcmaVM *vm);
810 Local<JSValueRef> GetPrototype(const EcmaVM *vm);
811 bool SetPrototype(const EcmaVM *vm, Local<ObjectRef> prototype);
813 bool DefineProperty(const EcmaVM *vm, Local<JSValueRef> key, PropertyAttribute attribute);
815 bool Has(const EcmaVM *vm, Local<JSValueRef> key);
816 bool Has(const EcmaVM *vm, uint32_t key);
818 bool HasOwnProperty(const EcmaVM *vm, Local<JSValueRef> key);
820 bool Delete(const EcmaVM *vm, Local<JSValueRef> key);
821 bool Delete(const EcmaVM *vm, uint32_t key);
823 Local<JSValueRef> Freeze(const EcmaVM *vm);
824 Local<JSValueRef> Seal(const EcmaVM *vm);
826 void SetNativePointerFieldCount(const EcmaVM *vm, int32_t count);
827 int32_t GetNativePointerFieldCount(const EcmaVM *vm);
828 void *GetNativePointerField(const EcmaVM *vm, int32_t index);
829 void SetNativePointerField(const EcmaVM *vm,
834 void SetConcurrentNativePointerField(const EcmaVM *vm,
850 static Local<FunctionRef> New(EcmaVM *vm, FunctionCallback nativeFunc, NativePointerCallback deleter = nullptr,
852 static Local<FunctionRef> NewConcurrent(EcmaVM *vm,
858 static Local<FunctionRef> New(EcmaVM *vm, InternalFunctionCallback nativeFunc, NativePointerCallback deleter,
860 static Local<FunctionRef> NewConcurrent(EcmaVM *vm,
866 static Local<FunctionRef> NewSendable(EcmaVM *vm,
872 static Local<FunctionRef> NewClassFunction(EcmaVM *vm, FunctionCallback nativeFunc, NativePointerCallback deleter,
874 static Local<FunctionRef> NewConcurrentClassFunction(EcmaVM *vm,
880 static Local<FunctionRef> NewClassFunction(EcmaVM *vm,
886 static Local<FunctionRef> NewSendableClassFunction(const EcmaVM *vm,
895 JSValueRef* CallForNapi(const EcmaVM *vm, JSValueRef *thisObj, JSValueRef *const argv[],
897 Local<JSValueRef> Call(const EcmaVM *vm, Local<JSValueRef> thisObj, const Local<JSValueRef> argv[],
899 Local<JSValueRef> Constructor(const EcmaVM *vm, const Local<JSValueRef> argv[], int32_t length);
900 JSValueRef* ConstructorOptimize(const EcmaVM *vm, JSValueRef* argv[], int32_t length);
902 Local<JSValueRef> GetFunctionPrototype(const EcmaVM *vm);
903 bool Inherit(const EcmaVM *vm, Local<FunctionRef> parent);
904 void SetName(const EcmaVM *vm, Local<StringRef> name);
905 Local<StringRef> GetName(const EcmaVM *vm);
906 Local<StringRef> GetSourceCode(const EcmaVM *vm, int lineNumber);
907 bool IsNative(const EcmaVM *vm);
908 void SetData(const EcmaVM *vm, void *data, NativePointerCallback deleter = nullptr, bool callNapi = false);
909 void* GetData(const EcmaVM *vm);
914 Local<JSValueRef> GetValue(const EcmaVM *vm);
919 static Local<SymbolRef> New(const EcmaVM *vm, Local<StringRef> description = Local<StringRef>());
920 Local<StringRef> GetDescription(const EcmaVM *vm);
925 static Local<BooleanRef> New(const EcmaVM *vm, bool input);
936 static Local<StringRef> NewFromUtf8WithoutStringTable(const EcmaVM *vm, const char *utf8, int length = -1);
937 static Local<StringRef> NewFromUtf8(const EcmaVM *vm, const char *utf8, int length = -1);
938 static Local<StringRef> NewFromUtf16WithoutStringTable(const EcmaVM *vm, const char16_t *utf16, int length = -1);
939 static Local<StringRef> NewFromUtf16(const EcmaVM *vm, const char16_t *utf16, int length = -1);
940 std::string ToString(const EcmaVM *vm);
941 std::string DebuggerToString(const EcmaVM *vm);
942 uint32_t Length(const EcmaVM *vm);
943 size_t Utf8Length(const EcmaVM *vm, bool isGetBufferSize = false);
944 uint32_t WriteUtf8(const EcmaVM *vm, char *buffer, uint32_t length, bool isWriteBuffer = false);
945 uint32_t WriteUtf16(const EcmaVM *vm, char16_t *buffer, uint32_t length);
946 uint32_t WriteLatin1(const EcmaVM *vm, char *buffer, uint32_t length);
947 static Local<StringRef> GetNapiWrapperString(const EcmaVM *vm);
948 Local<TypedArrayRef> EncodeIntoUint8Array(const EcmaVM *vm);
1008 static Local<BigIntRef> New(const EcmaVM *vm, uint64_t input);
1009 static Local<BigIntRef> New(const EcmaVM *vm, int64_t input);
1010 static Local<JSValueRef> CreateBigWords(const EcmaVM *vm, bool sign, uint32_t size, const uint64_t* words);
1011 void BigIntToInt64(const EcmaVM *vm, int64_t *value, bool *lossless);
1012 void BigIntToUint64(const EcmaVM *vm, uint64_t *value, bool *lossless);
1013 void GetWordsArray(const EcmaVM *vm, bool* signBit, size_t wordCount, uint64_t* words);
1014 uint32_t GetWordsArraySize(const EcmaVM *vm);
1020 explicit LocalScope(const EcmaVM *vm);
1024 inline LocalScope(const EcmaVM *vm, JSTaggedType value);
1038 explicit EscapeLocalScope(const EcmaVM *vm);
1060 static Local<IntegerRef> New(const EcmaVM *vm, int input);
1061 static Local<IntegerRef> NewFromUnsigned(const EcmaVM *vm, unsigned int input);
1067 static Local<ArrayBufferRef> New(const EcmaVM *vm, int32_t length);
1068 static Local<ArrayBufferRef> New(const EcmaVM *vm, void *buffer, int32_t length,
1071 int32_t ByteLength(const EcmaVM *vm);
1072 void *GetBuffer(const EcmaVM *vm);
1074 void Detach(const EcmaVM *vm);
1075 bool IsDetach(const EcmaVM *vm);
1080 static Local<SendableArrayBufferRef> New(const EcmaVM *vm, int32_t length);
1081 static Local<SendableArrayBufferRef> New(const EcmaVM *vm, void *buffer, int32_t length,
1084 int32_t ByteLength(const EcmaVM *vm);
1085 void *GetBuffer(const EcmaVM *vm);
1087 void Detach(const EcmaVM *vm);
1088 bool IsDetach(const EcmaVM *vm);
1093 static Local<DateRef> New(const EcmaVM *vm, double time);
1094 Local<StringRef> ToString(const EcmaVM *vm);
1095 double GetTime(const EcmaVM *vm);
1100 uint32_t ByteLength(const EcmaVM *vm);
1101 uint32_t ByteOffset(const EcmaVM *vm);
1102 uint32_t ArrayLength(const EcmaVM *vm);
1103 Local<ArrayBufferRef> GetArrayBuffer(const EcmaVM *vm);
1108 uint32_t ByteLength(const EcmaVM *vm);
1109 uint32_t ByteOffset(const EcmaVM *vm);
1110 uint32_t ArrayLength(const EcmaVM *vm);
1111 Local<SendableArrayBufferRef> GetArrayBuffer(const EcmaVM *vm);
1116 static Local<ArrayRef> New(const EcmaVM *vm, uint32_t length = 0);
1117 uint32_t Length(const EcmaVM *vm);
1118 static bool SetValueAt(const EcmaVM *vm, Local<JSValueRef> obj, uint32_t index, Local<JSValueRef> value);
1119 static Local<JSValueRef> GetValueAt(const EcmaVM *vm, Local<JSValueRef> obj, uint32_t index);
1124 static Local<SendableArrayRef> New(const EcmaVM *vm, uint32_t length = 0);
1125 uint32_t Length(const EcmaVM *vm);
1126 static Local<JSValueRef> GetValueAt(const EcmaVM *vm, Local<JSValueRef> obj, uint32_t index);
1127 static bool SetProperty(const EcmaVM *vm, Local<JSValueRef> obj, uint32_t index, Local<JSValueRef> value);
1132 static Local<Int8ArrayRef> New(const EcmaVM *vm, Local<ArrayBufferRef> buffer, int32_t byteOffset, int32_t length);
1137 static Local<SharedInt8ArrayRef> New(const EcmaVM *vm, Local<SendableArrayBufferRef> buffer,
1143 static Local<Uint8ArrayRef> New(const EcmaVM *vm, Local<ArrayBufferRef> buffer, int32_t byteOffset, int32_t length);
1148 static Local<SharedUint8ArrayRef> New(const EcmaVM *vm, Local<SendableArrayBufferRef> buffer,
1154 static Local<Uint8ClampedArrayRef> New(const EcmaVM *vm, Local<ArrayBufferRef> buffer, int32_t byteOffset,
1160 static Local<Int16ArrayRef> New(const EcmaVM *vm, Local<ArrayBufferRef> buffer, int32_t byteOffset, int32_t length);
1165 static Local<SharedInt16ArrayRef> New(const EcmaVM *vm, Local<SendableArrayBufferRef> buffer,
1171 static Local<Uint16ArrayRef> New(const EcmaVM *vm, Local<ArrayBufferRef> buffer, int32_t byteOffset,
1177 static Local<SharedUint16ArrayRef> New(const EcmaVM *vm, Local<SendableArrayBufferRef> buffer,
1183 static Local<Int32ArrayRef> New(const EcmaVM *vm, Local<ArrayBufferRef> buffer, int32_t byteOffset, int32_t length);
1188 static Local<SharedInt32ArrayRef> New(const EcmaVM *vm, Local<SendableArrayBufferRef> buffer,
1194 static Local<SharedFloat32ArrayRef> New(const EcmaVM *vm, Local<SendableArrayBufferRef> buffer,
1200 static Local<SharedUint8ClampedArrayRef> New(const EcmaVM *vm, Local<SendableArrayBufferRef> buffer,
1206 static Local<Uint32ArrayRef> New(const EcmaVM *vm, Local<ArrayBufferRef> buffer, int32_t byteOffset,
1212 static Local<SharedUint32ArrayRef> New(const EcmaVM *vm, Local<SendableArrayBufferRef> buffer,
1218 static Local<Float32ArrayRef> New(const EcmaVM *vm, Local<ArrayBufferRef> buffer, int32_t byteOffset,
1224 static Local<Float64ArrayRef> New(const EcmaVM *vm, Local<ArrayBufferRef> buffer, int32_t byteOffset,
1230 static Local<BigInt64ArrayRef> New(const EcmaVM *vm, Local<ArrayBufferRef> buffer, int32_t byteOffset,
1236 static Local<BigUint64ArrayRef> New(const EcmaVM *vm, Local<ArrayBufferRef> buffer, int32_t byteOffset,
1242 static Local<JSValueRef> Error(const EcmaVM *vm, Local<StringRef> message);
1243 static Local<JSValueRef> RangeError(const EcmaVM *vm, Local<StringRef> message);
1244 static Local<JSValueRef> ReferenceError(const EcmaVM *vm, Local<StringRef> message);
1245 static Local<JSValueRef> SyntaxError(const EcmaVM *vm, Local<StringRef> message);
1246 static Local<JSValueRef> TypeError(const EcmaVM *vm, Local<StringRef> message);
1247 static Local<JSValueRef> AggregateError(const EcmaVM *vm, Local<StringRef> message);
1248 static Local<JSValueRef> EvalError(const EcmaVM *vm, Local<StringRef> message);
1249 static Local<JSValueRef> OOMError(const EcmaVM *vm, Local<StringRef> message);
1250 static Local<JSValueRef> TerminationError(const EcmaVM *vm, Local<StringRef> message);
1255 FunctionCallScope(EcmaVM *vm);
1264 explicit JSExecutionScope(const EcmaVM *vm);
1276 explicit JsiNativeScope(const EcmaVM *vm);
1288 explicit JsiFastNativeScope(const EcmaVM *vm);
1377 int32_t GetSize(const EcmaVM *vm);
1378 int32_t GetTotalElements(const EcmaVM *vm);
1379 Local<JSValueRef> Get(const EcmaVM *vm, Local<JSValueRef> key);
1380 Local<JSValueRef> Get(const EcmaVM *vm, const char *utf8);
1381 Local<JSValueRef> GetKey(const EcmaVM *vm, int entry);
1382 Local<JSValueRef> GetValue(const EcmaVM *vm, int entry);
1383 static Local<MapRef> New(const EcmaVM *vm);
1384 void Set(const EcmaVM *vm, Local<JSValueRef> key, Local<JSValueRef> value);
1385 void Set(const EcmaVM *vm, const char *utf8, Local<JSValueRef> value);
1386 bool Has(const EcmaVM *vm, Local<JSValueRef> key);
1387 bool Has(const EcmaVM *vm, const char *utf8);
1388 void Delete(const EcmaVM *vm, Local<JSValueRef> key);
1389 void Clear(const EcmaVM *vm);
1390 Local<MapIteratorRef> GetEntries(const EcmaVM *vm);
1391 Local<MapIteratorRef> GetKeys(const EcmaVM *vm);
1392 Local<MapIteratorRef> GetValues(const EcmaVM *vm);
1397 static Local<SendableMapRef> New(const EcmaVM *vm);
1398 uint32_t GetSize(const EcmaVM *vm);
1399 uint32_t GetTotalElements(const EcmaVM *vm);
1400 Local<JSValueRef> Get(const EcmaVM *vm, Local<JSValueRef> key);
1401 Local<JSValueRef> Get(const EcmaVM *vm, const char *utf8);
1402 Local<JSValueRef> GetKey(const EcmaVM *vm, int entry);
1403 Local<JSValueRef> GetValue(const EcmaVM *vm, int entry);
1404 void Set(const EcmaVM *vm, Local<JSValueRef> key, Local<JSValueRef> value);
1405 void Set(const EcmaVM *vm, const char *utf8, Local<JSValueRef> value);
1406 bool Has(const EcmaVM *vm, Local<JSValueRef> key);
1407 bool Has(const EcmaVM *vm, const char *utf8);
1408 void Delete(const EcmaVM *vm, Local<JSValueRef> key);
1409 void Clear(const EcmaVM *vm);
1410 Local<SendableMapIteratorRef> GetEntries(const EcmaVM *vm);
1411 Local<SendableMapIteratorRef> GetKeys(const EcmaVM *vm);
1412 Local<SendableMapIteratorRef> GetValues(const EcmaVM *vm);
1417 static Local<SendableSetRef> New(const EcmaVM *vm);
1418 uint32_t GetSize(const EcmaVM *vm);
1419 uint32_t GetTotalElements(const EcmaVM *vm);
1420 Local<JSValueRef> GetValue(const EcmaVM *vm, int entry);
1421 void Add(const EcmaVM *vm, Local<JSValueRef> value);
1426 static Local<BufferRef> New(const EcmaVM *vm, int32_t length);
1427 static Local<BufferRef> New(const EcmaVM *vm, void *buffer, int32_t length, const NativePointerCallback &deleter,
1430 int32_t ByteLength(const EcmaVM *vm);
1431 void *GetBuffer(const EcmaVM *vm);
1437 Local<PromiseRef> Catch(const EcmaVM *vm, Local<FunctionRef> handler);
1438 Local<PromiseRef> Then(const EcmaVM *vm, Local<FunctionRef> handler);
1439 Local<PromiseRef> Finally(const EcmaVM *vm, Local<FunctionRef> handler);
1440 Local<PromiseRef> Then(const EcmaVM *vm, Local<FunctionRef> onFulfilled, Local<FunctionRef> onRejected);
1442 Local<JSValueRef> GetPromiseState(const EcmaVM *vm);
1443 Local<JSValueRef> GetPromiseResult(const EcmaVM *vm);
1448 static Local<PromiseCapabilityRef> New(const EcmaVM *vm);
1449 bool Resolve(const EcmaVM *vm, uintptr_t value);
1450 bool Resolve(const EcmaVM *vm, Local<JSValueRef> value);
1451 bool Reject(const EcmaVM *vm, uintptr_t reason);
1452 bool Reject(const EcmaVM *vm, Local<JSValueRef> reason);
1453 Local<PromiseRef> GetPromise(const EcmaVM *vm);
1458 static Local<NumberRef> New(const EcmaVM *vm, double input);
1459 static Local<NumberRef> New(const EcmaVM *vm, int32_t input);
1460 static Local<NumberRef> New(const EcmaVM *vm, uint32_t input);
1461 static Local<NumberRef> New(const EcmaVM *vm, int64_t input);
1468 static Local<DataViewRef> New(const EcmaVM *vm, Local<ArrayBufferRef> arrayBuffer, uint32_t byteOffset,
1472 Local<ArrayBufferRef> GetArrayBuffer(const EcmaVM *vm);
1478 Local<JSValueRef> GetKind(const EcmaVM *vm);
1479 static Local<MapIteratorRef> New(const EcmaVM *vm, Local<MapRef> map);
1480 ecmascript::EcmaRuntimeCallInfo* GetEcmaRuntimeCallInfo(const EcmaVM *vm);
1481 static Local<ArrayRef> Next(const EcmaVM *vm, ecmascript::EcmaRuntimeCallInfo* ecmaRuntimeCallInfo);
1482 Local<JSValueRef> Next(const EcmaVM *vm);
1487 Local<JSValueRef> Next(const EcmaVM *vm);
1552 static void LoadAotFileInternal(EcmaVM *vm, const std::string &moduleName, std::string &aotFileName);
1553 static void LoadAotFile(EcmaVM *vm, const std::string &moduleName);
1555 static void LoadAotFile(EcmaVM *vm, [[maybe_unused]] const std::string &bundleName,
1560 static EcmaContext *CreateJSContext(EcmaVM *vm);
1561 static void SwitchCurrentContext(EcmaVM *vm, EcmaContext *context);
1562 static void DestroyJSContext(EcmaVM *vm, EcmaContext *context);
1565 static bool ExecuteInContext(EcmaVM *vm, const std::string &fileName, const std::string &entry,
1568 static bool ExecuteForAbsolutePath(const EcmaVM *vm, const std::string &fileName, const std::string &entry,
1570 static bool Execute(const EcmaVM *vm, const std::string &fileName, const std::string &entry,
1572 static bool Execute(EcmaVM *vm, const uint8_t *data, int32_t size, const std::string &entry,
1574 static int ExecuteWithSingletonPatternFlag(EcmaVM *vm, const std::string &bundleName,
1576 static bool IsExecuteModuleInAbcFile(EcmaVM *vm, const std::string &bundleName,
1579 static bool ExecuteModuleBuffer(EcmaVM *vm, const uint8_t *data, int32_t size, const std::string &filename = "",
1581 static bool ExecuteModuleFromBuffer(EcmaVM *vm, const void *data, int32_t size, const std::string &file);
1582 static Local<ObjectRef> GetExportObject(EcmaVM *vm, const std::string &file, const std::string &key);
1583 static Local<ObjectRef> GetExportObjectFromBuffer(EcmaVM *vm, const std::string &file, const std::string &key);
1584 static Local<ObjectRef> GetExportObjectFromOhmUrl(EcmaVM *vm, const std::string &ohmUrl, const std::string &key);
1585 static Local<ObjectRef> ExecuteNativeModule(EcmaVM *vm, const std::string &key);
1586 static Local<ObjectRef> GetModuleNameSpaceFromFile(EcmaVM *vm, const std::string &file,
1588 static Local<ObjectRef> GetModuleNameSpaceWithModuleInfo(EcmaVM *vm, const std::string &file,
1598 static bool ExecuteSecure(EcmaVM *vm, uint8_t *data, int32_t size, const std::string &entry,
1606 static bool ExecuteModuleBufferSecure(EcmaVM *vm, uint8_t *data, int32_t size, const std::string &filename = "",
1609 static bool ExecuteSecureWithOhmUrl(EcmaVM *vm, uint8_t *data, int32_t size, const std::string &srcFilename,
1613 static Local<ObjectRef> GetGlobalObject(const EcmaVM *vm);
1614 static void ExecutePendingJob(const EcmaVM *vm);
1618 static void TriggerGC(const EcmaVM *vm, TRIGGER_GC_TYPE gcType = TRIGGER_GC_TYPE::SEMI_GC);
1619 static void TriggerGC(const EcmaVM *vm, ecmascript::GCReason reason,
1621 static void HintGC(const EcmaVM *vm, MemoryReduceDegree degree, ecmascript::GCReason reason);
1622 static void TriggerIdleGC(const EcmaVM *vm, TRIGGER_IDLE_GC_TYPE gcType);
1626 static void ThrowException(const EcmaVM *vm, Local<JSValueRef> error);
1627 static void PrintExceptionInfo(const EcmaVM *vm);
1628 static Local<ObjectRef> GetAndClearUncaughtException(const EcmaVM *vm);
1629 static Local<ObjectRef> GetUncaughtException(const EcmaVM *vm);
1630 static bool IsExecutingPendingJob(const EcmaVM *vm);
1631 static bool HasPendingException(const EcmaVM *vm);
1632 static bool HasPendingJob(const EcmaVM *vm);
1633 static void EnableUserUncaughtErrorHandler(EcmaVM *vm);
1635 static bool StartDebuggerCheckParameters(EcmaVM *vm, const DebugOption &option, int32_t instanceId,
1637 static bool StartDebugger(EcmaVM *vm, const DebugOption &option, int32_t instanceId = 0,
1640 static bool StartDebuggerForOldProcess(EcmaVM *vm, const DebugOption &option, int32_t instanceId = 0,
1645 static bool NotifyDebugMode(int tid, EcmaVM *vm, const DebugOption &option, int32_t instanceId = 0,
1648 int tid, EcmaVM *vm, const DebugOption &option, const DebuggerPostTask &debuggerPostTask, bool debugApp);
1649 static bool StopDebugger(EcmaVM *vm);
1650 static bool IsMixedDebugEnabled(const EcmaVM *vm);
1651 static bool IsDebugModeEnabled(const EcmaVM *vm);
1652 static void NotifyNativeCalling(const EcmaVM *vm, const void *nativeAddress);
1653 static void NotifyNativeReturn(const EcmaVM *vm, const void *nativeAddress);
1654 static void NotifyLoadModule(const EcmaVM *vm);
1655 static void NotifyUIIdle(const EcmaVM *vm, int idleTime);
1656 static void NotifyLooperIdleStart(const EcmaVM *vm, int64_t timestamp, int idleTime);
1657 static void NotifyLooperIdleEnd(const EcmaVM *vm, int64_t timestamp);
1658 static bool IsJSMainThreadOfEcmaVM(const EcmaVM *vm);
1659 static void SetDeviceDisconnectCallback(EcmaVM *vm, DeviceDisconnectCallback cb);
1661 static void* SerializeValue(const EcmaVM *vm, Local<JSValueRef> data, Local<JSValueRef> transfer,
1665 static Local<JSValueRef> DeserializeValue(const EcmaVM *vm, void *recoder, void *hint);
1667 static void SetHostPromiseRejectionTracker(EcmaVM *vm, void *cb, void* data);
1668 static void SetHostResolveBufferTracker(EcmaVM *vm,
1670 static void SetUnloadNativeModuleCallback(EcmaVM *vm, const std::function<bool(const std::string &moduleKey)> &cb);
1671 static void SetNativePtrGetter(EcmaVM *vm, void* cb);
1672 static void SetSourceMapCallback(EcmaVM *vm, SourceMapCallback cb);
1673 static void SetSourceMapTranslateCallback(EcmaVM *vm, SourceMapTranslateCallback cb);
1674 static void SetHostEnqueueJob(const EcmaVM* vm, Local<JSValueRef> cb,
1677 static void PreFork(EcmaVM *vm);
1678 static void PostFork(EcmaVM *vm, const RuntimeOption &option);
1681 static void GetStackBeforeCallNapiSuccess(EcmaVM *vm, bool &getStackBeforeCallNapiSuccess);
1682 static void GetStackAfterCallNapi(EcmaVM *vm);
1683 static PatchErrorCode LoadPatch(EcmaVM *vm, const std::string &patchFileName, const std::string &baseFileName);
1684 static PatchErrorCode LoadPatch(EcmaVM *vm,
1687 static PatchErrorCode UnloadPatch(EcmaVM *vm, const std::string &patchFileName);
1689 static bool IsQuickFixCausedException(EcmaVM *vm, Local<ObjectRef> exception, const std::string &patchFileName);
1691 static void RegisterQuickFixQueryFunc(EcmaVM *vm, std::function<bool(std::string baseFileName,
1695 static bool IsBundle(EcmaVM *vm);
1696 static void SetBundle(EcmaVM *vm, bool value);
1697 static bool IsNormalizedOhmUrlPack(EcmaVM *vm);
1699 static void SetAssetPath(EcmaVM *vm, const std::string &assetPath);
1700 static void SetMockModuleList(EcmaVM *vm, const std::map<std::string, std::string> &list);
1701 static void SetPkgNameList(EcmaVM *vm, const std::map<std::string, std::string> &list);
1702 static std::string GetPkgName(EcmaVM *vm, const std::string &moduleName);
1703 static void SetPkgAliasList(EcmaVM *vm, const std::map<std::string, std::string> &list);
1704 static void SetHmsModuleList(EcmaVM *vm, const std::vector<panda::HmsMap> &list);
1705 static void SetModuleInfo(EcmaVM *vm, const std::string &assetPath, const std::string &entryPoint);
1706 static void SetpkgContextInfoList(EcmaVM *vm, const std::map<std::string,
1708 static void SetExecuteBufferMode(const EcmaVM *vm);
1709 static void SetLoop(EcmaVM *vm, void *loop);
1710 static void SetWeakFinalizeTaskCallback(EcmaVM *vm, const WeakFinalizeTaskCallback &callback);
1711 static void SetAsyncCleanTaskCallback(EcmaVM *vm, const NativePointerTaskCallback &callback);
1712 static void SetTriggerGCTaskCallback(EcmaVM *vm, const TriggerGCTaskCallback& callback);
1713 static void SetStartIdleMonitorCallback(EcmaVM *vm, const StartIdleMonitorCallback& callback);
1714 static std::string GetAssetPath(EcmaVM *vm);
1715 static bool InitForConcurrentThread(EcmaVM *vm, ConcurrentCallback cb, void *data);
1716 static bool InitForConcurrentFunction(EcmaVM *vm, Local<JSValueRef> func, void *taskInfo);
1717 static void* GetCurrentTaskInfo(const EcmaVM *vm);
1718 static void ClearCurrentTaskInfo(const EcmaVM *vm);
1719 static void SetBundleName(EcmaVM *vm, const std::string &bundleName);
1720 static std::string GetBundleName(EcmaVM *vm);
1721 static void SetModuleName(EcmaVM *vm, const std::string &moduleName);
1722 static std::string GetModuleName(EcmaVM *vm);
1723 static std::pair<std::string, std::string> GetCurrentModuleInfo(EcmaVM *vm, bool needRecordName = false);
1725 static void AllowCrossThreadExecution(EcmaVM *vm);
1726 static void SynchronizVMInfo(EcmaVM *vm, const EcmaVM *hostVM);
1727 static bool IsProfiling(EcmaVM *vm);
1728 static void SetProfilerState(const EcmaVM *vm, bool value);
1729 static void SetRequestAotCallback(EcmaVM *vm, const std::function<int32_t(const std::string &bundleName,
1732 static void SetSearchHapPathTracker(EcmaVM *vm, std::function<bool(const std::string moduleName,
1734 static void *GetEnv(EcmaVM *vm);
1735 static void SetEnv(EcmaVM *vm, void *env);
1740 static Local<JSValueRef> NapiHasProperty(const EcmaVM *vm, uintptr_t nativeObj, uintptr_t key);
1741 static Local<JSValueRef> NapiHasOwnProperty(const EcmaVM *vm, uintptr_t nativeObj, uintptr_t key);
1742 static Local<JSValueRef> NapiGetProperty(const EcmaVM *vm, uintptr_t nativeObj, uintptr_t key);
1743 static Local<JSValueRef> NapiDeleteProperty(const EcmaVM *vm, uintptr_t nativeObj, uintptr_t key);
1744 static Local<JSValueRef> NapiGetNamedProperty(const EcmaVM *vm, uintptr_t nativeObj, const char* utf8Key);
1746 static Local<JSValueRef> CreateLocal(const EcmaVM *vm, JSValueRef src);
1750 static int GetStartRealTime(const EcmaVM *vm);
1751 static void NotifyTaskBegin(const EcmaVM *vm);
1752 static void NotifyTaskFinished(const EcmaVM *vm);
1753 static bool IsMultiThreadCheckEnabled(const EcmaVM *vm);
1763 static uintptr_t GetHandleAddr(const EcmaVM *vm, uintptr_t localAddress);
1764 static uintptr_t GetGlobalHandleAddr(const EcmaVM *vm, uintptr_t localAddress);
1765 static uintptr_t SetWeak(const EcmaVM *vm, uintptr_t localAddress);
1766 static uintptr_t SetWeakCallback(const EcmaVM *vm, uintptr_t localAddress, void *ref,
1769 static uintptr_t ClearWeak(const EcmaVM *vm, uintptr_t localAddress);
1770 static bool IsWeak(const EcmaVM *vm, uintptr_t localAddress);
1771 static void DisposeGlobalHandleAddr(const EcmaVM *vm, uintptr_t addr);
1772 static bool IsSerializationTimeoutCheckEnabled(const EcmaVM *vm);
1773 static void GenerateTimeoutTraceIfNeeded(const EcmaVM *vm, std::chrono::system_clock::time_point &start,
1787 Local<JSValueRef> GetHandler(const EcmaVM *vm);
1788 Local<JSValueRef> GetTarget(const EcmaVM *vm);
1794 int32_t GetSize(const EcmaVM *vm);
1795 int32_t GetTotalElements(const EcmaVM *vm);
1796 Local<JSValueRef> GetKey(const EcmaVM *vm, int entry);
1797 Local<JSValueRef> GetValue(const EcmaVM *vm, int entry);
1798 static Local<WeakMapRef> New(const EcmaVM *vm);
1799 void Set(const EcmaVM *vm, const Local<JSValueRef> &key, const Local<JSValueRef> &value);
1800 bool Has(const EcmaVM *vm, Local<JSValueRef> key);
1805 int32_t GetSize(const EcmaVM *vm);
1806 int32_t GetTotalElements(const EcmaVM *vm);
1807 Local<JSValueRef> GetValue(const EcmaVM *vm, int entry);
1808 static Local<SetRef> New(const EcmaVM *vm);
1809 void Add(const EcmaVM *vm, Local<JSValueRef> value);
1814 int32_t GetSize(const EcmaVM *vm);
1815 int32_t GetTotalElements(const EcmaVM *vm);
1816 Local<JSValueRef> GetValue(const EcmaVM *vm, int entry);
1817 static Local<WeakSetRef> New(const EcmaVM *vm);
1818 void Add(const EcmaVM *vm, Local<JSValueRef> value);
1824 Local<JSValueRef> GetKind(const EcmaVM *vm);
1825 static Local<SetIteratorRef> New(const EcmaVM *vm, Local<SetRef> set);
1826 ecmascript::EcmaRuntimeCallInfo *GetEcmaRuntimeCallInfo(const EcmaVM *vm);
1827 static Local<ArrayRef> Next(const EcmaVM *vm, ecmascript::EcmaRuntimeCallInfo *ecmaRuntimeCallInfo);
1835 static bool RegisterStringCacheTable(const EcmaVM *vm, uint32_t size);
1836 static bool SetCachedString(const EcmaVM *vm, const char *name, uint32_t propertyIndex);
1837 static bool HasCachedString(const EcmaVM *vm, uint32_t propertyIndex);
1838 static Local<StringRef> GetCachedString(const EcmaVM *vm, uint32_t propertyIndex);