Thanks Sven!
--Michael

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,
On 2014/06/25 08:15:21, Sven Panne wrote:
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. :-)

Good idea. Let me add the TODO up in code-stubs.h, on the initialize
method, which accepts the two parallel arrays. The RegRep structure will
end up defined there later.

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.

Reply via email to