Hello,

I would like to know if there is any API for getting the type of a
value but without calling IsXXXX() corresponding function. What I
would work very nice for me is to have an API which returns the type
as a numeric value. Example:

Handle<Value> value=....

switch(value->GetType())
{
    case NUMERIC:
        //do something
        break;
    case STRING:
        //do something
        break;
    case FUNCTION:
        //do something
        break;
}

Right now, to achieve the same result I have to do:
if(value->IsArray()) {
} else if(value->IsBoolean()) {
} else if(value->IsDate()) {
} ....

This is a performance overkill.

Bottom line:
Is there any API for actually *getting* the type instead of *guessing*
it?

Thank you

-- 
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users

Reply via email to