Home
last modified time | relevance | path

Searched refs:FunctionKind (Results 1 – 16 of 16) sorted by relevance

/ark/js_runtime/ecmascript/
Djs_function.h69FunctionKind kind = FunctionKind::NORMAL_FUNCTION, bool strict = true);
165 FunctionKind kind = GetFunctionKind(); in IsBase()
166 return kind <= FunctionKind::CLASS_CONSTRUCTOR; in IsBase()
171 FunctionKind kind = GetFunctionKind(); in IsDerivedConstructor()
172 return kind == FunctionKind::DERIVED_CONSTRUCTOR; in IsDerivedConstructor()
175 inline static bool IsArrowFunction(FunctionKind kind) in IsArrowFunction()
177 … return (kind >= FunctionKind::ARROW_FUNCTION) && (kind <= FunctionKind::ASYNC_ARROW_FUNCTION); in IsArrowFunction()
180 inline static bool IsClassConstructor(FunctionKind kind) in IsClassConstructor()
182 … return (kind == FunctionKind::CLASS_CONSTRUCTOR) || (kind == FunctionKind::DERIVED_CONSTRUCTOR); in IsClassConstructor()
185 inline static bool IsConstructorKind(FunctionKind kind) in IsConstructorKind()
[all …]
Dliteral_data_extractor.cpp46 FunctionKind kind; in ExtractObjectDatas()
78 kind = FunctionKind::NORMAL_FUNCTION; in ExtractObjectDatas()
84 kind = FunctionKind::GENERATOR_FUNCTION; in ExtractObjectDatas()
130 FunctionKind kind; in GetDatasIgnoreType()
157 kind = FunctionKind::NORMAL_FUNCTION; in GetDatasIgnoreType()
163 kind = FunctionKind::GENERATOR_FUNCTION; in GetDatasIgnoreType()
Dobject_factory.h145 FunctionKind kind = FunctionKind::NORMAL_FUNCTION);
148 FunctionKind kind = FunctionKind::NORMAL_FUNCTION);
300 JSHandle<JSFunction> CloneJSFuction(JSHandle<JSFunction> obj, FunctionKind kind);
329 FunctionKind kind = FunctionKind::NORMAL_FUNCTION);
423 JSHandle<JSHClass> CreateFunctionClass(FunctionKind kind, uint32_t size, JSType type,
Djs_function_kind.h22 enum class FunctionKind : uint8_t { enum
Djs_function.cpp34 …nction::InitializeJSFunction(JSThread *thread, const JSHandle<JSFunction> &func, FunctionKind kind, in InitializeJSFunction()
60 if (kind == FunctionKind::BASE_CONSTRUCTOR || kind == FunctionKind::GENERATOR_FUNCTION) { in InitializeJSFunction()
65 …PropertyDescriptor desc(thread, accessor, kind != FunctionKind::BUILTIN_CONSTRUCTOR, false, false); in InitializeJSFunction()
152 if (JSHandle<JSFunction>::Cast(self)->GetFunctionKind() == FunctionKind::GETTER_FUNCTION) { in NameGetter()
155 if (JSHandle<JSFunction>::Cast(self)->GetFunctionKind() == FunctionKind::SETTER_FUNCTION) { in NameGetter()
545 FunctionKind kind = newTargetFunc->GetFunctionKind(); in GetInstanceJSHClass()
591 … const JSHandle<JSFunction> &func, FunctionKind kind, bool strict) in InitializeJSFunction()
Dobject_factory.cpp406 JSHandle<JSFunction> ObjectFactory::CloneJSFuction(JSHandle<JSFunction> obj, FunctionKind kind) in CloneJSFuction()
411 if (kind == FunctionKind::GENERATOR_FUNCTION) { in CloneJSFuction()
435 FunctionKind kind = ctor->GetFunctionKind(); in CloneClassCtor()
436 … ASSERT_PRINT(kind == FunctionKind::CLASS_CONSTRUCTOR || kind == FunctionKind::DERIVED_CONSTRUCTOR, in CloneClassCtor()
891 FunctionKind kind) in NewJSFunction()
897 …> ObjectFactory::NewJSFunction(const JSHandle<GlobalEnv> &env, JSMethod *method, FunctionKind kind) in NewJSFunction()
900 if (kind == FunctionKind::BASE_CONSTRUCTOR) { in NewJSFunction()
911 JSHandle<JSHClass> ObjectFactory::CreateFunctionClass(FunctionKind kind, uint32_t size, JSType type, in CreateFunctionClass()
975 FunctionKind kind) in NewJSFunctionByDynClass()
989 return NewJSFunctionByDynClass(target, dynclass, FunctionKind::BUILTIN_CONSTRUCTOR); in NewJSNativeErrorFunction()
[all …]
Dbuiltins.cpp185FunctionKind::ASYNC_FUNCTION, JSAsyncFunction::SIZE, JSType::JS_ASYNC_FUNCTION, objFuncInstancePro… in Initialize()
189 … factory_->CreateFunctionClass(FunctionKind::NORMAL_FUNCTION, JSAsyncAwaitStatusFunction::SIZE, in Initialize()
227 …JSHandle<JSHClass> functionClass = factory_->CreateFunctionClass(FunctionKind::BASE_CONSTRUCTOR, J… in Initialize()
230 …functionClass = factory_->CreateFunctionClass(FunctionKind::NORMAL_FUNCTION, JSFunction::SIZE, JST… in Initialize()
233 functionClass = factory_->CreateFunctionClass(FunctionKind::CLASS_CONSTRUCTOR, JSFunction::SIZE, in Initialize()
295 …factory_->CreateFunctionClass(FunctionKind::GENERATOR_FUNCTION, JSFunction::SIZE, JSType::JS_GENER… in Initialize()
366 …factory_->NewJSFunctionByDynClass(ctor, funcFuncIntanceDynclass, FunctionKind::BUILTIN_CONSTRUCTOR… in InitializeFunction()
380 factory_->CreateFunctionClass(FunctionKind::NORMAL_FUNCTION, JSIntlBoundFunction::SIZE, in InitializeFunction()
854 …factory_->NewJSFunction(env, reinterpret_cast<void *>(ctorFunc), FunctionKind::BUILTIN_PROXY_CONST… in InitializeExoticConstructor()
1447 factory_->NewJSFunction(env, static_cast<void *>(nullptr), FunctionKind::BASE_CONSTRUCTOR)); in InitializeStringIterator()
[all …]
Dclass_info_extractor.cpp286FunctionKind::CLASS_CONSTRUCTOR); in DefineClassTemplate()
/ark/js_runtime/ecmascript/class_linker/
Dpanda_file_translator.cpp122 factory_->NewJSFunctionByDynClass(mainMethod, dynclass, FunctionKind::BASE_CONSTRUCTOR); in GenerateProgram()
157 factory_->NewJSFunctionByDynClass(method, dynclass, FunctionKind::BASE_CONSTRUCTOR); in GenerateProgram()
167 … factory_->NewJSFunctionByDynClass(method, normalDynclass, FunctionKind::NORMAL_FUNCTION); in GenerateProgram()
177 … factory_->NewJSFunctionByDynClass(method, generatorDynclass, FunctionKind::GENERATOR_FUNCTION); in GenerateProgram()
196 … factory_->NewJSFunctionByDynClass(method, asyncDynclass, FunctionKind::ASYNC_FUNCTION); in GenerateProgram()
213 … factory_->NewJSFunctionByDynClass(method, normalDynclass, FunctionKind::NORMAL_FUNCTION); in GenerateProgram()
545 … PandaFileTranslator::DefineMethodInLiteral(JSThread *thread, uint32_t methodId, FunctionKind kind, in DefineMethodInLiteral()
553 if (kind == FunctionKind::NORMAL_FUNCTION) { in DefineMethodInLiteral()
560 if (kind == FunctionKind::GENERATOR_FUNCTION) { in DefineMethodInLiteral()
Dpanda_file_translator.h49 … JSHandle<JSFunction> DefineMethodInLiteral(JSThread *thread, uint32_t methodId, FunctionKind kind,
/ark/js_runtime/ecmascript/tests/
Djs_function_test.cpp86FunctionKind::BASE_CONSTRUCTOR); in HWTEST_F_L0()
106 EXPECT_EQ(func->GetFunctionKind(), FunctionKind::BASE_CONSTRUCTOR); in HWTEST_F_L0()
Djs_object_test.cpp709 factory->NewJSFunction(env, static_cast<void *>(nullptr), FunctionKind::BASE_CONSTRUCTOR); in HWTEST_F_L0()
724 factory->NewJSFunction(env, static_cast<void *>(nullptr), FunctionKind::BASE_CONSTRUCTOR); in HWTEST_F_L0()
/ark/js_runtime/ecmascript/interpreter/
Dslow_runtime_stub.cpp1486 JSHandle<JSFunction>::Cast(getterHandle)->SetFunctionKind(FunctionKind::GETTER_FUNCTION); in DefineGetterSetterByValue()
1490 JSHandle<JSFunction>::Cast(setterHandle)->SetFunctionKind(FunctionKind::SETTER_FUNCTION); in DefineGetterSetterByValue()
1834 …JSHandle<JSFunction> jsFunc = factory->NewJSFunctionByDynClass(method, dynclass, FunctionKind::ASY… in DefineAsyncFunc()
1848 …JSHandle<JSFunction> jsFunc = factory->NewJSFunctionByDynClass(method, dynclass, FunctionKind::ARR… in DefineNCFuncDyn()
1862 …JSHandle<JSFunction> jsFunc = factory->NewJSFunctionByDynClass(method, dynclass, FunctionKind::BAS… in DefinefuncDyn()
1928 …JSHandle<JSFunction> jsFunc = factory->NewJSFunctionByDynClass(method, dynclass, FunctionKind::NOR… in DefineMethod()
2139 JSHandle<JSFunction>::Cast(cls)->SetFunctionKind(FunctionKind::CLASS_CONSTRUCTOR); in SetClassInheritanceRelationship()
2143 JSHandle<JSFunction>::Cast(cls)->SetFunctionKind(FunctionKind::DERIVED_CONSTRUCTOR); in SetClassInheritanceRelationship()
2149 JSHandle<JSFunction>::Cast(cls)->SetFunctionKind(FunctionKind::DERIVED_CONSTRUCTOR); in SetClassInheritanceRelationship()
/ark/js_runtime/ecmascript/napi/test/
Djsnapi_tests.cpp802 …factory->NewJSFunctionByDynClass(ctor, funcFuncProtoIntanceDynclass, FunctionKind::BUILTIN_CONSTRU… in HWTEST_F_L0()
819 …factory->NewJSFunctionByDynClass(ctor, funcFuncNoProtoProtoIntanceDynclass, FunctionKind::BUILTIN_… in HWTEST_F_L0()
/ark/js_runtime/ecmascript/containers/
Dcontainers_private.cpp101 …factory->NewJSFunction(env, reinterpret_cast<void *>(ctorFunc), FunctionKind::BUILTIN_CONSTRUCTOR); in NewContainerConstructor()
/ark/js_runtime/ecmascript/napi/
Djsnapi.cpp990 … factory->NewJSFunctionByDynClass(method, dynclass, ecmascript::FunctionKind::CLASS_CONSTRUCTOR); in NewClassFunction()