| Index: src/bootstrapper.cc
|
| diff --git a/src/bootstrapper.cc b/src/bootstrapper.cc
|
| index c72af5ce06b4b564ea8efcd4a0faa7a5ae469d36..631e04fe17a9e2b40c53e00ad6baf1b0fe99c1da 100644
|
| --- a/src/bootstrapper.cc
|
| +++ b/src/bootstrapper.cc
|
| @@ -399,7 +399,8 @@ void Genesis::SetFunctionInstanceDescriptor(
|
| }
|
| PropertyAttributes attribs = static_cast<PropertyAttributes>(
|
| DONT_ENUM | DONT_DELETE | READ_ONLY);
|
| - map->set_instance_descriptors(*descriptors);
|
| +
|
| + factory()->SetDescriptors(map, descriptors);
|
|
|
| { // Add length.
|
| CallbacksDescriptor d(*factory()->length_symbol(), *length, attribs);
|
| @@ -540,7 +541,8 @@ void Genesis::SetStrictFunctionInstanceDescriptor(
|
| }
|
| PropertyAttributes attribs = static_cast<PropertyAttributes>(
|
| DONT_ENUM | DONT_DELETE);
|
| - map->set_instance_descriptors(*descriptors);
|
| +
|
| + factory()->SetDescriptors(map, descriptors);
|
|
|
| { // Add length.
|
| CallbacksDescriptor d(*factory()->length_symbol(), *length, attribs);
|
| @@ -867,13 +869,14 @@ bool Genesis::InitializeGlobal(Handle<GlobalObject> inner_global,
|
| // is 1.
|
| array_function->shared()->set_length(1);
|
|
|
| + Handle<Map> initial_map(array_function->initial_map());
|
| Handle<DescriptorArray> array_descriptors(factory->NewDescriptorArray(1));
|
| DescriptorArray::WhitenessWitness witness(*array_descriptors);
|
|
|
| Handle<Foreign> array_length(factory->NewForeign(&Accessors::ArrayLength));
|
| PropertyAttributes attribs = static_cast<PropertyAttributes>(
|
| DONT_ENUM | DONT_DELETE);
|
| - array_function->initial_map()->set_instance_descriptors(*array_descriptors);
|
| + factory->SetDescriptors(initial_map, array_descriptors);
|
|
|
| { // Add length.
|
| CallbacksDescriptor d(*factory->length_symbol(), *array_length, attribs);
|
| @@ -921,7 +924,7 @@ bool Genesis::InitializeGlobal(Handle<GlobalObject> inner_global,
|
| factory->NewForeign(&Accessors::StringLength));
|
| PropertyAttributes attribs = static_cast<PropertyAttributes>(
|
| DONT_ENUM | DONT_DELETE | READ_ONLY);
|
| - string_map->set_instance_descriptors(*string_descriptors);
|
| + factory->SetDescriptors(string_map, string_descriptors);
|
|
|
| { // Add length.
|
| CallbacksDescriptor d(*factory->length_symbol(), *string_length, attribs);
|
| @@ -957,7 +960,7 @@ bool Genesis::InitializeGlobal(Handle<GlobalObject> inner_global,
|
| static_cast<PropertyAttributes>(DONT_ENUM | DONT_DELETE | READ_ONLY);
|
| Handle<DescriptorArray> descriptors = factory->NewDescriptorArray(5);
|
| DescriptorArray::WhitenessWitness witness(*descriptors);
|
| - initial_map->set_instance_descriptors(*descriptors);
|
| + factory->SetDescriptors(initial_map, descriptors);
|
|
|
| {
|
| // ECMA-262, section 15.10.7.1.
|
| @@ -1141,7 +1144,7 @@ bool Genesis::InitializeGlobal(Handle<GlobalObject> inner_global,
|
| // Create the descriptor array for the arguments object.
|
| Handle<DescriptorArray> descriptors = factory->NewDescriptorArray(3);
|
| DescriptorArray::WhitenessWitness witness(*descriptors);
|
| - map->set_instance_descriptors(*descriptors);
|
| + factory->SetDescriptors(map, descriptors);
|
|
|
| { // length
|
| FieldDescriptor d(*factory->length_symbol(), 0, DONT_ENUM);
|
| @@ -1526,7 +1529,7 @@ bool Genesis::InstallNatives() {
|
| factory()->NewForeign(&Accessors::ScriptEvalFromFunctionName));
|
| PropertyAttributes attribs =
|
| static_cast<PropertyAttributes>(DONT_ENUM | DONT_DELETE | READ_ONLY);
|
| - script_map->set_instance_descriptors(*script_descriptors);
|
| + factory()->SetDescriptors(script_map, script_descriptors);
|
|
|
| {
|
| CallbacksDescriptor d(
|
| @@ -1651,14 +1654,14 @@ bool Genesis::InstallNatives() {
|
| // elements in InternalArrays can be set to non-Smi values without going
|
| // through a common bottleneck that would make the SMI_ONLY -> FAST_ELEMENT
|
| // transition easy to trap. Moreover, they rarely are smi-only.
|
| - MaybeObject* maybe_map =
|
| - array_function->initial_map()->Copy(DescriptorArray::MAY_BE_SHARED);
|
| + MaybeObject* maybe_map = array_function->initial_map()->Copy();
|
| Map* new_map;
|
| if (!maybe_map->To(&new_map)) return false;
|
| new_map->set_elements_kind(FAST_HOLEY_ELEMENTS);
|
| array_function->set_initial_map(new_map);
|
|
|
| // Make "length" magic on instances.
|
| + Handle<Map> initial_map(array_function->initial_map());
|
| Handle<DescriptorArray> array_descriptors(factory()->NewDescriptorArray(1));
|
| DescriptorArray::WhitenessWitness witness(*array_descriptors);
|
|
|
| @@ -1666,7 +1669,7 @@ bool Genesis::InstallNatives() {
|
| &Accessors::ArrayLength));
|
| PropertyAttributes attribs = static_cast<PropertyAttributes>(
|
| DONT_ENUM | DONT_DELETE);
|
| - array_function->initial_map()->set_instance_descriptors(*array_descriptors);
|
| + factory()->SetDescriptors(initial_map, array_descriptors);
|
|
|
| { // Add length.
|
| CallbacksDescriptor d(
|
| @@ -1761,7 +1764,7 @@ bool Genesis::InstallNatives() {
|
| Handle<DescriptorArray> reresult_descriptors =
|
| factory()->NewDescriptorArray(3);
|
| DescriptorArray::WhitenessWitness witness(*reresult_descriptors);
|
| - initial_map->set_instance_descriptors(*reresult_descriptors);
|
| + factory()->SetDescriptors(initial_map, reresult_descriptors);
|
|
|
| {
|
| JSFunction* array_function = global_context()->array_function();
|
|
|