On Mon, Jul 29, 2013 at 2:13 PM, ioannis <[email protected]> wrote:
> So if i understand correctly, in order to obtain the underlying value of a > BooleanObject, i need to first cast the Value to BooleanObject and then call > BooleanValue() > > Yes, and this is caused by the fact that polymorphism in C++ is tied to the type of the pointer, not to the type of the object (our handles basically behave like pointers, BTW). We wouldn't even need to think about this if BooleanObject::BooleanValue() had a different name, and that is actually something I'd like to change. > Do we need to perform the same casting from Value to NumberObject and > StringObject to correctly obtain the underlying value ? > > I am not 100% sure if and how they differ, there might be some edge cases where they do, I'll probably have to write similar tests to make this explicit. Again, renaming things apart would make this clearer. > [...] Thank you for the unit tests, that cleared out the but i think for the > primitive_true test it is just a copy of the primitive_false test. [...] > > Ooops, fixed, thanks. -- -- v8-users mailing list [email protected] http://groups.google.com/group/v8-users --- You received this message because you are subscribed to the Google Groups "v8-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
