LGTM with a proposal for an enhancement, but we can leave that for another
cleanup CL (perhaps add a TODO then).
https://codereview.chromium.org/350293003/diff/1/src/arm/code-stubs-arm.cc
File src/arm/code-stubs-arm.cc (right):
https://codereview.chromium.org/350293003/diff/1/src/arm/code-stubs-arm.cc#newcode325
src/arm/code-stubs-arm.cc:325:
descriptor->Initialize(ARRAY_SIZE(registers), registers,
It would be nice if there was a type for the Register/Representation
pair, this would be less redundant, more readable and gives stronger
static guarantees:
RegRep params[] = { RegRep(r1, Representation::Tagged()),
RegRep(cp, Representation::Tagged()),
RegRep(r0, Representation::Integer32()),
RegRep(r2, Representation::Integer32()),
NULL
};
descriptor->Initialize(params);
This is close to what one would write in our hopefully bright C++11
future:
std::vector<RegRep> params { {r1, Representation::Tagged()},
{cp, Representation::Tagged()},
{r0, Representation::Integer32()},
{r2, Representation::Integer32()}
};
descriptor->Initialize(params);
Perhaps one would need a better name than RegRep. :-)
https://codereview.chromium.org/350293003/
--
--
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.