I'm doing some cleanup in the AST which required modifications to
prettyprinter.cc (in particular, I'm talking about PrettyPrinter, not
AstPrinter or CallPrinter, which are also in that file). My cleanup was in
ForOfStatement, where I'm trying to remove members that aren't actually
used by consumers of the AST. But I'm not sure it's worth much work here to
make this output readable. Here's the current output, in the face of all
our desugaring:
$ d8 -e 'for (x of []);'
[generating full code for user-defined function: ]
--- Source from AST ---
{ = undefined; = 0; try { try { { .result = undefined; for (x of [
literal_index = 0 ]) { ; = 0; } } } catch (.catch) { if (( === 2)) = 1;
.result = %ReThrow
(.catch); } } finally .result = .result; if ((!(( === 0) || (.iterator ===
undefined)))) = (.iterator).return; if (( == null)) ; else if (( === 1)) {
if (((typeof ) === "function")) ; else throw %NewTypeError
(130, ""); try { %_Call
(, .iterator); } catch (.catch) { } } else { = %_Call
(, .iterator); if (%_IsJSReceiver
()) ; else %ThrowIteratorResultNotAnObject
(); } .result = .result; } return .result;
[lots of other generated source]
That's pretty darn unreadable already. Is this something worth fixing? I've
personally never used this flag; does anyone else, or know of a time when
it was useful?
- Adam
--
--
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.