Looks even better, I still have two suggestions, but it is up to you.
https://codereview.chromium.org/1244693002/diff/80001/src/hydrogen-instructions.h
File src/hydrogen-instructions.h (right):
https://codereview.chromium.org/1244693002/diff/80001/src/hydrogen-instructions.h#newcode4918
src/hydrogen-instructions.h:4918: }
Hmm, I was imagining you would drive it the other way:
if (external_add_type == AddOfExternalAndTagged) {
DCHECK(left->representation().IsExternal());
DCHECK(right->representation().IsTagged());
SetDependsOnFlag(kNewSpacePromotion);
} else {
...
}
https://codereview.chromium.org/1244693002/diff/80001/src/ia32/lithium-ia32.cc
File src/ia32/lithium-ia32.cc (right):
https://codereview.chromium.org/1244693002/diff/80001/src/ia32/lithium-ia32.cc#newcode1636
src/ia32/lithium-ia32.cc:1636:
instr->right()->representation().IsTagged()));
Maybe you want to factor out the two DCHECK into a separate method, up
to you.
Something like
bool HAdd::IsConsistentExternalRepresentation() {
return left()->representation().IsExternal() &&
((external_add_type() == AddOfExternalAndInt32 &&
right()->representation().IsInteger32()) ||
(external_add_type() == AddOfExternalAndTagged &&
right()->representation().IsTagged()));
}
https://codereview.chromium.org/1244693002/
--
--
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/d/optout.