On 2013/06/05 07:22:35, marja wrote:
On 2013/06/05 07:08:49, Sven Panne wrote:
> https://codereview.chromium.org/16206014/diff/1/include/v8.h
> File include/v8.h (right):
>
> https://codereview.chromium.org/16206014/diff/1/include/v8.h#newcode598
> include/v8.h:598: static Persistent<T>& Upcast(Persistent<S>& that)) {
//
NOLINT
> How does this relate to Persistent::Cast? It looks like it's the same,
but
with
> an additional TYPE_CHECK. Do we really need this plethora of casting
mehods
> (Cast/As/Upcast)? This is currently a totally incomprehensible
mess... :-/
Like the description says: "Value::Cast doesn't exist so we cannot use As
or
Cast."
Both As and Cast end up trying to call Value::Cast, whereas Upcast
doesn't.
Instead it checks that the types are fine, and then just
reinterpret_casts.
Why don't we add Value::Cast? (I haven't thought deeply about this.) As it
is, I
don't want to obfuscate Persistent even further, 2 casting functions are not
good, 3 different casting functions are very bad. Please remember that we
are
talking about a public API here, so we should be careful what we do here,
people
might actually start using it...
https://codereview.chromium.org/16206014/
--
--
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].
For more options, visit https://groups.google.com/groups/opt_out.