| Index: src/bootstrapper.cc
|
| diff --git a/src/bootstrapper.cc b/src/bootstrapper.cc
|
| index b58080f745448b2f7accb9201023240971b21c35..560dae5d6b65b9d0d43b1e23756b0f5e7cd2564f 100644
|
| --- a/src/bootstrapper.cc
|
| +++ b/src/bootstrapper.cc
|
| @@ -1693,8 +1693,12 @@ void Genesis::InitializeGlobal(Handle<JSGlobalObject> global_object,
|
| JSObject::AddProperty(prototype, factory->constructor_string(),
|
| regexp_fun, DONT_ENUM);
|
|
|
| - SimpleInstallFunction(prototype, "exec", Builtins::kRegExpPrototypeExec,
|
| - 1, true, DONT_ENUM);
|
| + {
|
| + Handle<JSFunction> fun = SimpleInstallFunction(
|
| + prototype, "exec", Builtins::kRegExpPrototypeExec, 1, true,
|
| + DONT_ENUM);
|
| + native_context()->set_regexp_exec_function(*fun);
|
| + }
|
|
|
| SimpleInstallGetter(prototype, factory->flags_string(),
|
| Builtins::kRegExpPrototypeFlagsGetter, true);
|
| @@ -1717,6 +1721,22 @@ void Genesis::InitializeGlobal(Handle<JSGlobalObject> global_object,
|
| SimpleInstallFunction(prototype, factory->toString_string(),
|
| Builtins::kRegExpPrototypeToString, 0, false,
|
| DONT_ENUM);
|
| + SimpleInstallFunction(prototype, "test", Builtins::kRegExpPrototypeTest,
|
| + 1, false, DONT_ENUM);
|
| +
|
| + {
|
| + Handle<JSFunction> fun = SimpleCreateFunction(
|
| + isolate, factory->InternalizeUtf8String("[Symbol.match]"),
|
| + Builtins::kRegExpPrototypeMatch, 1, false);
|
| + InstallFunction(prototype, fun, factory->match_symbol(), DONT_ENUM);
|
| + }
|
| +
|
| + {
|
| + Handle<JSFunction> fun = SimpleCreateFunction(
|
| + isolate, factory->InternalizeUtf8String("[Symbol.search]"),
|
| + Builtins::kRegExpPrototypeSearch, 1, false);
|
| + InstallFunction(prototype, fun, factory->search_symbol(), DONT_ENUM);
|
| + }
|
| }
|
|
|
| {
|
| @@ -1803,7 +1823,7 @@ void Genesis::InitializeGlobal(Handle<JSGlobalObject> global_object,
|
| // ECMA-262, section 15.10.7.5.
|
| PropertyAttributes writable =
|
| static_cast<PropertyAttributes>(DONT_ENUM | DONT_DELETE);
|
| - DataDescriptor field(factory->last_index_string(),
|
| + DataDescriptor field(factory->lastIndex_string(),
|
| JSRegExp::kLastIndexFieldIndex, writable,
|
| Representation::Tagged());
|
| initial_map->AppendDescriptor(&field);
|
|
|