PTAL

https://codereview.chromium.org/1322773002/diff/60001/src/typing-asm.cc
File src/typing-asm.cc (right):

https://codereview.chromium.org/1322773002/diff/60001/src/typing-asm.cc#newcode343
src/typing-asm.cc:343: RECURSE(VisitWithExpectation(stmt->cond(),
cache_.kInt32,
On 2015/08/31 19:16:11, titzer wrote:
Is this also true? I thought asm allowed naked conditions like if(a <
3) and do
{x } while (a < 4). It certainly allows do .. while(false)

At least not in the text of the spec:

do stmt:Statement while ( expr:Expression ) ;
succeeds if ValidateStatement succeeds for stmt and ValidateExpression
succeeds for expr with a subtype of int.

Same with the others.

do..while(0) would be ok.

https://codereview.chromium.org/1322773002/diff/60001/src/typing-asm.cc#newcode366
src/typing-asm.cc:366: RECURSE(VisitWithExpectation(stmt->cond(),
cache_.kInt32,
On 2015/08/31 19:16:11, titzer wrote:
Same.

See above.

https://codereview.chromium.org/1322773002/diff/60001/src/typing-asm.cc#newcode435
src/typing-asm.cc:435: "conditional then branch expected to be
integer"));
On 2015/08/31 19:16:11, titzer wrote:
You have number in the expectation and then number in the comment.

Shouldn't conditions use the expectation of the outer expression
passed down?

The comment is wrong, fixed.
Also, good point about the expected type, using that and updating the
message.

https://codereview.chromium.org/1322773002/

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