https://codereview.chromium.org/636283009/diff/100001/src/compiler/typer.cc
File src/compiler/typer.cc (right):

https://codereview.chromium.org/636283009/diff/100001/src/compiler/typer.cc#newcode124
src/compiler/typer.cc:124: double limit = 1;
Wouldn't it make sense to go a bit faster at first? There doesn't seem
much reason to single-step through the first 30 bits, you can probably
fast forward to 2^30 directly.

https://codereview.chromium.org/636283009/diff/100001/src/compiler/typer.cc#newcode292
src/compiler/typer.cc:292: Type* MaybeWeaken(Type* current, Type*
previous) {
Move this to Typer::Visitor as protected, to avoid duplicating it.

https://codereview.chromium.org/636283009/diff/100001/src/compiler/typer.cc#newcode430
src/compiler/typer.cc:430: if (type->IsRange()) return type;        //
Shortcut.
Nit: put this first.

https://codereview.chromium.org/636283009/diff/100001/src/compiler/typer.cc#newcode822
src/compiler/typer.cc:822: double x = a[0];
What if this is already a NaN? As discussed offline, as a fix you could
initialise with -inf and start the loop from 0.

https://codereview.chromium.org/636283009/diff/100001/src/compiler/typer.cc#newcode824
src/compiler/typer.cc:824: x = std::min(std::isnan(a[i]) ? +V8_INFINITY
: a[i], x);
Simplify to

  if (!std::isnan(a[i])) x = std::min(x, a[i]);

https://codereview.chromium.org/636283009/diff/100001/src/compiler/typer.cc#newcode834
src/compiler/typer.cc:834: static double array_max(double a[], size_t n)
{
Same here.

https://codereview.chromium.org/636283009/diff/100001/src/compiler/typer.cc#newcode889
src/compiler/typer.cc:889: // TODO(neis): Deal with numeric bitsets here
and elsewhere.
This seems to be subsumed by Rangify.

https://codereview.chromium.org/636283009/diff/100001/src/compiler/typer.cc#newcode982
src/compiler/typer.cc:982: rhs->Maybe(t->singleton_zero) ||
I think this needs to check for -0 as well.

Also, instead of doing all the rhs->Maybe's separately, do one on a
(predefined) union type.

https://codereview.chromium.org/636283009/diff/100001/src/compiler/typer.cc#newcode997
src/compiler/typer.cc:997: rhs->Maybe(t->singleton_zero) ||
Same here.

https://codereview.chromium.org/636283009/

--
--
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.

Reply via email to