The + in the CL description was meant to refer to binary +,
instead of unary +. I've clarified. It turns out unary +,-
are gotten for free via parser re-writes, so I've added tests
for them. cctests from the last CL should already be testing
the strong versions of these ops, I was lazy last time
updating a few unittests, I fixed them so they now test
their strong mode versions.
https://codereview.chromium.org/1102923002/diff/60001/src/compiler/js-typed-lowering.cc
File src/compiler/js-typed-lowering.cc (right):
https://codereview.chromium.org/1102923002/diff/60001/src/compiler/js-typed-lowering.cc#newcode362
src/compiler/js-typed-lowering.cc:362: if
(r.BothInputsAre(Type::Number())) {
On 2015/04/24 15:39:42, arv wrote:
Let me make sure I understand this. If the operands are not numbers we
keep the
nodes which will cause the runtime call which will throw?
Yes. Without this case the Binop call could be lowered while inputs are
not guaranteed to be numbers (since convertInputsToNumber is used),
which
would effectively replace the strong mode version with the sloppy mode
version. I made a mistake in the shift version of this, which I've fixed
in the next patchset.
https://codereview.chromium.org/1102923002/diff/60001/test/mjsunit/strong/implicit-conversions.js
File test/mjsunit/strong/implicit-conversions.js (right):
https://codereview.chromium.org/1102923002/diff/60001/test/mjsunit/strong/implicit-conversions.js#newcode10
test/mjsunit/strong/implicit-conversions.js:10: let strong_binops = [
On 2015/04/24 15:39:42, arv wrote:
FYI. Our js style does not allow underscores in variable names. I know
the V8
team has historically been opposed to follow the google style guide
though...
Hah! I should at least try and be consistent, since I changed this
elsewhere.
https://codereview.chromium.org/1102923002/diff/60001/test/mjsunit/strong/implicit-conversions.js#newcode108
test/mjsunit/strong/implicit-conversions.js:108: function not_strong(x,
y) {
On 2015/04/24 15:39:42, arv wrote:
Not clear why you need this function. You are testing the unary ops
later.
Yeah, it was a mistake to put this here.
https://codereview.chromium.org/1102923002/
--
--
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.