Use ARRAY_SIZE instead of DIY code.

This improves r22769.

R=bmeurer@chromium.org

Review URL: https://codereview.chromium.org/437153002

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22804 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent ab1cb70c
......@@ -15575,8 +15575,7 @@ const Runtime::Function* Runtime::FunctionForName(Handle<String> name) {
const Runtime::Function* Runtime::FunctionForEntry(Address entry) {
size_t length = sizeof(kIntrinsicFunctions) / sizeof(*kIntrinsicFunctions);
for (size_t i = 0; i < length; ++i) {
for (size_t i = 0; i < ARRAY_SIZE(kIntrinsicFunctions); ++i) {
if (entry == kIntrinsicFunctions[i].entry) {
return &(kIntrinsicFunctions[i]);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment