/ark/js_runtime/ecmascript/ |
D | js_function.h | 69 … FunctionKind 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 …]
|
D | literal_data_extractor.cpp | 46 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()
|
D | object_factory.h | 145 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,
|
D | js_function_kind.h | 22 enum class FunctionKind : uint8_t { enum
|
D | js_function.cpp | 34 …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()
|
D | object_factory.cpp | 406 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 …]
|
D | builtins.cpp | 185 …FunctionKind::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 …]
|
D | class_info_extractor.cpp | 286 … FunctionKind::CLASS_CONSTRUCTOR); in DefineClassTemplate()
|
/ark/js_runtime/ecmascript/class_linker/ |
D | panda_file_translator.cpp | 122 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()
|
D | panda_file_translator.h | 49 … JSHandle<JSFunction> DefineMethodInLiteral(JSThread *thread, uint32_t methodId, FunctionKind kind,
|
/ark/js_runtime/ecmascript/tests/ |
D | js_function_test.cpp | 86 … FunctionKind::BASE_CONSTRUCTOR); in HWTEST_F_L0() 106 EXPECT_EQ(func->GetFunctionKind(), FunctionKind::BASE_CONSTRUCTOR); in HWTEST_F_L0()
|
D | js_object_test.cpp | 709 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/ |
D | slow_runtime_stub.cpp | 1486 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/ |
D | jsnapi_tests.cpp | 802 …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/ |
D | containers_private.cpp | 101 …factory->NewJSFunction(env, reinterpret_cast<void *>(ctorFunc), FunctionKind::BUILTIN_CONSTRUCTOR); in NewContainerConstructor()
|
/ark/js_runtime/ecmascript/napi/ |
D | jsnapi.cpp | 990 … factory->NewJSFunctionByDynClass(method, dynclass, ecmascript::FunctionKind::CLASS_CONSTRUCTOR); in NewClassFunction()
|