https://codereview.chromium.org/1230793002/diff/160001/src/objects.cc
File src/objects.cc (right):
https://codereview.chromium.org/1230793002/diff/160001/src/objects.cc#newcode997
src/objects.cc:997: if (!it->IsElement()) {
On 2015/10/02 10:01:15, caitp wrote:
On 2015/10/02 08:05:27, Toon Verwaest wrote:
> Rather than if (!it->IsElement()) etc, you can just use
> Handle<Name> name = it->GetName();
> if (name->IsSymbol() && Symbol::cast(*name)->is_well_known_symbol())
{
> return it->factory()->undefined_value();
> }
GetName() converts elements to strings, which isn't needed, but name()
has a
DCHECK(!IsElement()). So, it seemed better to avoid the allocation,
from my pov.
I can change it if people prefer that
That is possibly true. It could already have been cached. Adding
IsElement() only avoids this possible cost (in an exceptional path
that's not performance sensitive), but does introduce extra unnecessary
complexity here.
https://codereview.chromium.org/1230793002/
--
--
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/d/optout.