Currently it is not possible to have 2 different CFunction overloads with 
same number of arguments that have different types, but in certain 
scenarios, such as for strings, it's beneficial to have multiple overloads, 
due to performance.

If we encounter this, it fails due to the following assertion:

v8/src/api/api.cc:1181; message = Check failed: 
c_function_overloads.data()[i].ArgumentCount() != 
c_function_overloads.data()[j].ArgumentCount() (1 vs. 1).

For example having 2 CFunction overloads for a method that receives a 
string parameter, is beneficial for having a faster access for 
v8::FastOneByteString, without regressing on one of those cases.

method(v8::Local<v8::Object> receiver, v8::Local<v8::Value> myString);
method(v8::Local<v8::Object> receiver, const v8::FastOneByteString& 
myString);

-- 
-- 
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- 
You received this message because you are subscribed to the Google Groups 
"v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/v8-dev/5cb28ca1-859b-4b52-97bf-2fdd6a42aed4n%40googlegroups.com.

Reply via email to