Lines Matching defs:target
163 // target.bind(thisArg)
170 JSHandle<JSFunction> target = factory->NewJSFunction(env);
171 JSFunction::SetFunctionName(thread, JSHandle<JSFunctionBase>(target),
172 JSHandle<JSTaggedValue>(factory->NewFromASCII("target")),
174 JSFunction::SetFunctionLength(thread, target, JSTaggedValue(2));
179 auto result = FunctionAlgorithm(thread, target, args, 6, AlgorithmType::PROTOTYPE_BIND);
185 ASSERT_EQ(resultFunc->GetBoundTarget(), target.GetTaggedValue());
196 JSHandle<EcmaString> boundTarget = factory->NewFromASCII("bound target");
204 // target.bind(thisArg, 123, "helloworld")
211 JSHandle<JSFunction> target = factory->NewJSFunction(env);
212 JSFunction::SetFunctionName(thread, JSHandle<JSFunctionBase>(target),
215 JSFunction::SetFunctionLength(thread, target, JSTaggedValue(5));
222 auto result = FunctionAlgorithm(thread, target, args, 10, AlgorithmType::PROTOTYPE_BIND);
228 ASSERT_EQ(resultFunc->GetBoundTarget(), target.GetTaggedValue());
250 // target.length is 5, (...args) length is 2
254 // target.bind(thisArg, 123, "helloworld") set target_name = EmptyString()
261 JSHandle<JSFunction> target = factory->NewJSFunction(env);
263 JSTaggedValue::DefinePropertyOrThrow(thread, JSHandle<JSTaggedValue>(target),
265 JSFunction::SetFunctionLength(thread, target, JSTaggedValue(5));
271 auto result = FunctionAlgorithm(thread, target, args, 10, AlgorithmType::PROTOTYPE_BIND);
280 ASSERT_EQ(resultFunc->GetBoundTarget(), target.GetTaggedValue());
301 // target.length is 5, (...args) length is 2