Lines Matching defs:args
35 args.GetIsolate()->ThrowError( \
122 static void AddAllSlowCallback(const FunctionCallbackInfo<Value>& args) {
123 Isolate* isolate = args.GetIsolate();
125 FastCApiObject* self = UnwrapObject(args.This());
132 if (args.Length() > 1 && args[1]->IsNumber()) {
133 sum += args[1]->Int32Value(isolate->GetCurrentContext()).FromJust();
135 if (args.Length() > 2 && args[2]->IsNumber()) {
136 sum += args[2]->Uint32Value(isolate->GetCurrentContext()).FromJust();
138 if (args.Length() > 3 && args[3]->IsNumber()) {
139 sum += args[3]->IntegerValue(isolate->GetCurrentContext()).FromJust();
141 if (args.Length() > 4 && args[4]->IsNumber()) {
142 sum += args[4]->IntegerValue(isolate->GetCurrentContext()).FromJust();
144 if (args.Length() > 5 && args[5]->IsNumber()) {
145 sum += args[5]->NumberValue(isolate->GetCurrentContext()).FromJust();
149 if (args.Length() > 6 && args[6]->IsNumber()) {
150 sum += args[6]->NumberValue(isolate->GetCurrentContext()).FromJust();
155 args.GetReturnValue().Set(Number::New(isolate, sum));
217 const FunctionCallbackInfo<Value>& args) {
218 Isolate* isolate = args.GetIsolate();
220 FastCApiObject* self = UnwrapObject(args.This());
225 if (args.Length() < 2) {
230 if (args[1]->IsTypedArray()) {
231 AddAllTypedArraySlowCallback(args);
235 if (args[1]->IsUndefined()) {
237 args.GetReturnValue().Set(Number::New(isolate, dummy_result));
240 if (!args[1]->IsArray()) {
245 Local<Array> seq_arg = args[1].As<Array>();
272 args.GetReturnValue().Set(Number::New(isolate, sum));
346 const FunctionCallbackInfo<Value>& args) {
347 Isolate* isolate = args.GetIsolate();
349 FastCApiObject* self = UnwrapObject(args.This());
355 if (args.Length() < 2) {
359 if (!args[1]->IsTypedArray()) {
365 Local<TypedArray> typed_array_arg = args[1].As<TypedArray>();
384 args.GetReturnValue().Set(Number::New(isolate, sum));
395 args.GetReturnValue().Set(Number::New(isolate, sum));
438 static void Add32BitIntSlowCallback(const FunctionCallbackInfo<Value>& args) {
439 Isolate* isolate = args.GetIsolate();
441 FastCApiObject* self = UnwrapObject(args.This());
448 if (args.Length() > 1 && args[1]->IsNumber()) {
449 sum += args[1]->Int32Value(isolate->GetCurrentContext()).FromJust();
451 if (args.Length() > 2 && args[2]->IsNumber()) {
452 sum += args[2]->Uint32Value(isolate->GetCurrentContext()).FromJust();
455 args.GetReturnValue().Set(Number::New(isolate, sum));
543 const FunctionCallbackInfo<Value>& args) {
544 Isolate* isolate = args.GetIsolate();
546 FastCApiObject* self = UnwrapObject(args.This());
554 if (args.Length() > 1 && args[1]->IsNumber()) {
555 sum += args[1]->Int32Value(context).FromJust();
557 if (args.Length() > 2 && args[2]->IsNumber()) {
558 sum += args[2]->Int32Value(context).FromJust();
560 if (args.Length() > 3 && args[3]->IsNumber()) {
561 sum += args[3]->Int32Value(context).FromJust();
563 if (args.Length() > 4 && args[4]->IsNumber()) {
564 sum += args[4]->Uint32Value(context).FromJust();
566 if (args.Length() > 5 && args[5]->IsNumber()) {
567 sum += args[5]->Uint32Value(context).FromJust();
569 if (args.Length() > 6 && args[6]->IsNumber()) {
570 sum += args[6]->Uint32Value(context).FromJust();
572 if (args.Length() > 7 && args[7]->IsNumber() && args[8]->IsNumber()) {
573 sum += args[7]->Uint32Value(context).FromJust();
574 sum += args[8]->Uint32Value(context).FromJust();
577 args.GetReturnValue().Set(Number::New(isolate, sum));
610 const FunctionCallbackInfo<Value>& args) {
611 Isolate* isolate = args.GetIsolate();
613 FastCApiObject* self = UnwrapObject(args.This());
620 if (args.Length() < 2) {
621 args.GetIsolate()->ThrowError(
625 if (args[1]->IsObject()) {
626 Local<Object> object = args[1].As<Object>();
630 result = PerIsolateData::Get(args.GetIsolate())
636 args.GetReturnValue().Set(Boolean::New(isolate, result));
639 static void FastCallCount(const FunctionCallbackInfo<Value>& args) {
640 FastCApiObject* self = UnwrapObject(args.This());
642 args.GetReturnValue().Set(
643 Number::New(args.GetIsolate(), self->fast_call_count()));
645 static void SlowCallCount(const FunctionCallbackInfo<Value>& args) {
646 FastCApiObject* self = UnwrapObject(args.This());
648 args.GetReturnValue().Set(
649 Number::New(args.GetIsolate(), self->slow_call_count()));
651 static void ResetCounts(const FunctionCallbackInfo<Value>& args) {
652 FastCApiObject* self = UnwrapObject(args.This());
655 args.GetReturnValue().Set(Undefined(args.GetIsolate()));
657 static void SupportsFPParams(const FunctionCallbackInfo<Value>& args) {
658 FastCApiObject* self = UnwrapObject(args.This());
660 args.GetReturnValue().Set(self->supports_fp_params_);