https://codereview.chromium.org/18587007/diff/1/src/types.cc
File src/types.cc (right):
https://codereview.chromium.org/18587007/diff/1/src/types.cc#newcode501
src/types.cc:501: for (int i = 0; i < unioned->length(); ++i) {
Note that for a union, at most one part is not a constant or class.
Since you do not print any information to distinguish either of those
anyway, it might make sense to just print a summary NumClasses and
NumConstants for a union, plus the bitset part if present.
https://codereview.chromium.org/18587007/diff/1/src/types.h
File src/types.h (right):
https://codereview.chromium.org/18587007/diff/1/src/types.h#newcode117
src/types.h:117: V(Oddball, kBoolean | kNull | kUndefined)
\
Nit: Maybe insert an empty line before this one.
https://codereview.chromium.org/18587007/diff/1/src/types.h#newcode124
src/types.h:124: V(Object, kUndetectable | kArray | kFunction |
kRegExp | kOtherObject) \
Aha, cheating with indentation!
https://codereview.chromium.org/18587007/diff/1/src/types.h#newcode133
src/types.h:133: static Type* None() { return from_bitset(kNone); }
Can't you generate all these functions from the macro now?
https://codereview.chromium.org/18587007/diff/1/src/types.h#newcode231
src/types.h:231: PRIMITIVE_TYPE_LIST(DECLARE_PRIMITIVE_TYPE)
Nit: maybe indent this by 2
https://codereview.chromium.org/18587007/diff/1/src/types.h#newcode233
src/types.h:233: kUnusedEOL = 0
What's that for?
https://codereview.chromium.org/18587007/diff/1/src/types.h#newcode237
src/types.h:237: switch (as_bitset()) {
Yeah, that does not fly. Any combination of primitive types represents a
valid (union) type, so you must be able to print all of them.
https://codereview.chromium.org/18587007/
--
--
v8-dev mailing list
v8-dev@googlegroups.com
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 v8-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.