| Index: src/bootstrapper.cc
|
| diff --git a/src/bootstrapper.cc b/src/bootstrapper.cc
|
| index 02af9d2fbc1f62cc86717504991ad3c5c08a3811..7ba90200fa6a375930783444bd0138534678713e 100644
|
| --- a/src/bootstrapper.cc
|
| +++ b/src/bootstrapper.cc
|
| @@ -1044,11 +1044,10 @@ void Genesis::InitializeGlobal(Handle<GlobalObject> global_object,
|
|
|
| {
|
| // ECMA-262, section 15.10.7.1.
|
| - FieldDescriptor field(factory->source_string(),
|
| - JSRegExp::kSourceFieldIndex,
|
| - final,
|
| - Representation::Tagged());
|
| - initial_map->AppendDescriptor(&field);
|
| + Handle<AccessorInfo> regexp_source(
|
| + Accessors::RegExpSourceInfo(isolate, final));
|
| + CallbacksDescriptor d(factory->source_string(), regexp_source, final);
|
| + initial_map->AppendDescriptor(&d);
|
| }
|
| {
|
| // ECMA-262, section 15.10.7.2.
|
| @@ -1085,18 +1084,17 @@ void Genesis::InitializeGlobal(Handle<GlobalObject> global_object,
|
| initial_map->AppendDescriptor(&field);
|
| }
|
|
|
| - initial_map->set_inobject_properties(5);
|
| - initial_map->set_pre_allocated_property_fields(5);
|
| + static const int num_fields = JSRegExp::kInObjectFieldCount;
|
| + initial_map->set_inobject_properties(num_fields);
|
| + initial_map->set_pre_allocated_property_fields(num_fields);
|
| initial_map->set_unused_property_fields(0);
|
| - initial_map->set_instance_size(
|
| - initial_map->instance_size() + 5 * kPointerSize);
|
| + initial_map->set_instance_size(initial_map->instance_size() +
|
| + num_fields * kPointerSize);
|
|
|
| // RegExp prototype object is itself a RegExp.
|
| Handle<Map> proto_map = Map::Copy(initial_map, "RegExpPrototype");
|
| proto_map->set_prototype(native_context()->initial_object_prototype());
|
| Handle<JSObject> proto = factory->NewJSObjectFromMap(proto_map);
|
| - proto->InObjectPropertyAtPut(JSRegExp::kSourceFieldIndex,
|
| - heap->query_colon_string());
|
| proto->InObjectPropertyAtPut(JSRegExp::kGlobalFieldIndex,
|
| heap->false_value());
|
| proto->InObjectPropertyAtPut(JSRegExp::kIgnoreCaseFieldIndex,
|
|
|