Thank Andreas, that might explain some of the oddnesses I've encountered
applying this!

Since use of properties is carefully constrained in asm.js, doing things in
VisitProperty probably can work. I'll explore more.

Some other type system questions:

* Should Function(R, S, T0, T1...) types be unionable with each other? (I.e. can I use them to express the overloaded nature of Math.abs etc?) Some care will be
required at a VisitCall to disentangle which concrete version is relevant.
UnionType seems to be considered an implementation internal. Would adding a way
to iterate over union members be ok?

* Should a function like fround ( Undefined \/ float32 \/ float64 -> float32)
work as expected?

* Should Arrays of a single Function type work correctly?

* Any recommendations on how to represent an ArrayBuffer? I may be able to avoid
this one, though, as the spec does not seem to permit variables of this type
other than the module parameter, so I could special case it.

* I think ArrayBuffer might not need to be expressed, but in general is there
some way I've missed to express a sentinel type (i.e. something that won't
quietly slip by union/intersect but can be checked for explicitly?)

* I want to double check using the types.h types makes sense for asm
validation/typing?

Before you'd pointed me at your CL I'd been going down the road of a type system local to asm validation, mirroring the typing rules and types (intish etc) in the asm.js spec. I had figured on converting to types.h types as each ast node
is visited, since with asm, at each step concrete types are known, and type
unions less critical.

So far it seems like using types.h allows for a safe superset of asm.js, and
does seem to be a good deal more concise than where adding another type system
was going.


https://codereview.chromium.org/1217803004/

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