On 2013/06/24 09:25:07, Jakob wrote:
For the record, as discussed offline, this change does not LGTM in its
current
form, as it breaks the existing logic. Maybe what we need instead is
separate
to-boolean type feedback for expr->right?
(I also have a few drive-by nits.)
https://codereview.chromium.org/17444011/diff/1/src/ast.cc
File src/ast.cc (right):
https://codereview.chromium.org/17444011/diff/1/src/ast.cc#newcode436
src/ast.cc:436: TypeFeedbackId origin) {
nit: align arguments with each other
https://codereview.chromium.org/17444011/diff/1/src/ast.h
File src/ast.h (right):
https://codereview.chromium.org/17444011/diff/1/src/ast.h#newcode388
src/ast.h:388: TypeFeedbackOracle* oracle, TypeFeedbackId origin);
nit: one line per argument
https://codereview.chromium.org/17444011/diff/1/src/typing.cc
File src/typing.cc (right):
https://codereview.chromium.org/17444011/diff/1/src/typing.cc#newcode444
src/typing.cc:444: expr->RecordToBooleanTypeFeedback(oracle(),
expr->left()->test_id());
I don't think this change is correct, seeing that in hydrogen.cc:9584 the
type
feedback is read specifically from expr->left:
ToBooleanStub::Types expected(expr->left()->to_boolean_types());
Thanks for pointing this out. Indeed the type info in
VisitLogicalExpression is
collected from the left hand operand. But of course the TypeInfo in
TestContext::Return comes from the testContext and not the right hand
operand.
This version is therefore a bit more precise, so PTAL
https://codereview.chromium.org/17444011/
--
--
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/groups/opt_out.