Lines Matching defs:thread

37 JSFunction *JSObjectCreate(JSThread *thread)
39 EcmaVM *ecmaVM = thread->GetEcmaVM();
46 EcmaVM *ecmaVM = thread->GetEcmaVM();
48 JSHandle<JSFunction> funHandle = thread->GetEcmaVM()->GetFactory()->NewJSFunction(env);
52 JSHandle<LexicalEnv> lexicalEnv = thread->GetEcmaVM()->GetFactory()->NewLexicalEnv(0);
53 funHandle->SetLexicalEnv(thread, lexicalEnv.GetTaggedValue());
59 EcmaVM *ecmaVM = thread->GetEcmaVM();
61 JSHandle<JSFunction> func = thread->GetEcmaVM()->GetFactory()->NewJSFunction(env, static_cast<void *>(nullptr),
67 JSHandle<JSObject> nullHandle(thread, JSTaggedValue::Null());
68 JSHandle<JSObject> obj = JSObject::ObjectCreate(thread, nullHandle);
71 JSFunction::MakeConstructor(thread, func, objValue);
74 thread->GetEcmaVM()->GetFactory()->NewFromASCII("constructor"));
76 JSHandle<JSTaggedValue> protoKey(thread->GetEcmaVM()->GetFactory()->NewFromASCII("prototype"));
77 JSTaggedValue proto = JSObject::GetProperty(thread, funcHandle, protoKey).GetValue().GetTaggedValue();
79 JSObject::GetProperty(thread, JSHandle<JSTaggedValue>(obj), constructorKey).GetValue().GetTaggedValue();
87 JSHandle<JSTaggedValue> objFun(thread, JSObjectCreate(thread));
90 thread->GetEcmaVM()->GetFactory()->NewJSObjectByConstructor(JSHandle<JSFunction>(objFun), objFun);
91 JSHandle<JSTaggedValue> obj(thread, jsobject.GetTaggedValue());
94 EcmaVM *ecmaVM = thread->GetEcmaVM();
97 EXPECT_TRUE(ecmascript::JSFunction::OrdinaryHasInstance(thread, constructor, obj));
111 EcmaVM *ecmaVM = thread->GetEcmaVM();
113 JSHandle<JSTaggedValue> hclass(thread, JSObjectCreate(thread));
115 thread->GetEcmaVM()->GetFactory()->NewJSObjectByConstructor(JSHandle<JSFunction>::Cast(hclass), hclass));
119 JSHandle<JSTaggedValue> calleeKey(thread->GetEcmaVM()->GetFactory()->NewFromASCII(&keyArray[0]));
121 thread->GetEcmaVM()->GetFactory()->NewJSFunction(env, reinterpret_cast<void *>(TestInvokeInternal));
124 JSObject::SetProperty(thread, JSHandle<JSTaggedValue>(callee), calleeKey, calleeValue);
125 JSHandle<JSTaggedValue> undefined = thread->GlobalConstants()->GetHandledUndefined();
126 EcmaRuntimeCallInfo *info = EcmaInterpreter::NewRuntimeCallInfo(thread, undefined, callee, undefined, 1);
136 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory();
137 JSHandle<GlobalEnv> env = thread->GetEcmaVM()->GetGlobalEnv();
141 JSHandle<JSTaggedValue> prefix(thread, JSTaggedValue::Undefined());
142 JSFunction::SetFunctionName(thread, JSHandle<JSFunctionBase>(jsFunction), JSHandle<JSTaggedValue>(symbol), prefix);
144 JSFunctionBase::GetFunctionName(thread, JSHandle<JSFunctionBase>(jsFunction));