https://chromiumcodereview.appspot.com/11445016/diff/6001/src/hydrogen-instructions.h File src/hydrogen-instructions.h (right):
https://chromiumcodereview.appspot.com/11445016/diff/6001/src/hydrogen-instructions.h#newcode351 src/hydrogen-instructions.h:351: return IsInteger32() ? Integer32() : Tagged(); On 2012/12/07 10:11:11, Massi wrote:
[...] Generally RequiredInputRepresentation implementations do not
assert on anything
about the input, they just state what they require.
Well, in general RequiredInputRepresentation doesn't require this cruel hack. ;-) What actually is tried to be modeled is Integer32 \union Tagged (Smi, to be even more exact), so I'd like to make this hack as explicit as possible. I don't really care if it's done here or at all call sites, but we need an assertion. https://chromiumcodereview.appspot.com/11445016/diff/13001/src/hydrogen-instructions.h File src/hydrogen-instructions.h (right): https://chromiumcodereview.appspot.com/11445016/diff/13001/src/hydrogen-instructions.h#newcode2992 src/hydrogen-instructions.h:2992: default: return Representation::Integer32(); default is evil (a maintenance nightmare), please list the individual cases explicitly if you keep the switch. https://chromiumcodereview.appspot.com/11445016/diff/13001/src/hydrogen-instructions.h#newcode4851 src/hydrogen-instructions.h:4851: default: return Representation::Tagged(); see above https://chromiumcodereview.appspot.com/11445016/ -- v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev
