| Index: src/bootstrapper.cc
|
| diff --git a/src/bootstrapper.cc b/src/bootstrapper.cc
|
| index 31d6e3e00c2cc355bc8b2caaface11a6989d55bd..c60e3023df1854d8c4d9a7645b2f6edb37bd6695 100644
|
| --- a/src/bootstrapper.cc
|
| +++ b/src/bootstrapper.cc
|
| @@ -2267,15 +2267,24 @@ static void InstallBuiltinFunctionId(Handle<JSObject> holder,
|
|
|
| void Genesis::InstallBuiltinFunctionIds() {
|
| HandleScope scope(isolate());
|
| + struct BuiltinFunctionIds {
|
| + const char* holder_expr;
|
| + const char* fun_name;
|
| + BuiltinFunctionId id;
|
| + };
|
| +
|
| #define INSTALL_BUILTIN_ID(holder_expr, fun_name, name) \
|
| - { \
|
| - Handle<JSObject> holder = ResolveBuiltinIdHolder( \
|
| - native_context(), #holder_expr); \
|
| - BuiltinFunctionId id = k##name; \
|
| - InstallBuiltinFunctionId(holder, #fun_name, id); \
|
| - }
|
| - FUNCTIONS_WITH_ID_LIST(INSTALL_BUILTIN_ID)
|
| + { #holder_expr, #fun_name, k##name } \
|
| + ,
|
| + const BuiltinFunctionIds builtins[] = {
|
| + FUNCTIONS_WITH_ID_LIST(INSTALL_BUILTIN_ID)};
|
| #undef INSTALL_BUILTIN_ID
|
| +
|
| + for (const BuiltinFunctionIds& builtin : builtins) {
|
| + Handle<JSObject> holder =
|
| + ResolveBuiltinIdHolder(native_context(), builtin.holder_expr);
|
| + InstallBuiltinFunctionId(holder, builtin.fun_name, builtin.id);
|
| + }
|
| }
|
|
|
|
|
|
|