Like it! However, I think there is an issue with lower bounds in some cases.
Also, some tests would be good...
https://codereview.chromium.org/618803003/diff/40001/src/compiler/typer.cc
File src/compiler/typer.cc (right):
https://codereview.chromium.org/618803003/diff/40001/src/compiler/typer.cc#newcode165
src/compiler/typer.cc:165: typedef Type* (*UnaryTyperFun)(Type*, Typer*
t);
Is there a reason why we can't make these Visitor member pointers and
get rid of the explicit Typer argument?
https://codereview.chromium.org/618803003/diff/40001/src/compiler/typer.cc#newcode186
src/compiler/typer.cc:186: static Type* JSEqualTyper(Type*, Type*,
Typer*);
Can we create this list from macros as well?
https://codereview.chromium.org/618803003/diff/40001/src/compiler/typer.cc#newcode333
src/compiler/typer.cc:333: : (upper->IsConstant() || input.lower ==
input.upper)
Check the latter condition first.
https://codereview.chromium.org/618803003/diff/40001/src/compiler/typer.cc#newcode382
src/compiler/typer.cc:382: if (type->Is(Type::Object())) return
t->singleton_true;
Receiver? In fact, you need to distinguish Detectable and Undetectable
here (the latter is some DOM abomination that converts to false).
https://codereview.chromium.org/618803003/diff/40001/src/compiler/typer.cc#newcode384
src/compiler/typer.cc:384: if ((type->IsRange() ||
type->Is(Type::Integral32())) &&
Why doesn't this apply to all numbers?
https://codereview.chromium.org/618803003/diff/40001/src/compiler/typer.cc#newcode569
src/compiler/typer.cc:569: static Type* ESType(Type* type) {
Nit: call this JSType, since JS is what we say everywhere else.
https://codereview.chromium.org/618803003/diff/40001/src/compiler/typer.cc#newcode602
src/compiler/typer.cc:602: Type* Typer::Visitor::JSCompareTyper(Type*
lhs, Type* rhs, Typer* t) {
Add a comment saying that the comparison is <, returning undefined for
unordered.
https://codereview.chromium.org/618803003/diff/40001/src/compiler/typer.cc#newcode649
src/compiler/typer.cc:649: Type* Typer::Visitor::JSBitwiseOrTyper(Type*
lhs, Type* rhs, Typer* t) {
Shouldn't these functions also detect the cases where both inputs are
constants or singleton ranges? (Could be a TODO)
https://codereview.chromium.org/618803003/diff/40001/src/compiler/typer.cc#newcode871
src/compiler/typer.cc:871: return TypeBinaryOp(node,
JSLoadPropertyTyper);
This doesn't seem right. The lower bound would become Any most of the
time.
https://codereview.chromium.org/618803003/diff/40001/src/compiler/typer.cc#newcode1011
src/compiler/typer.cc:1011: return TypeUnaryOp(node,
JSCallFunctionTyper); // We ignore argument types.
Same here.
https://codereview.chromium.org/618803003/
--
--
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.