| Index: src/bootstrapper.cc
|
| diff --git a/src/bootstrapper.cc b/src/bootstrapper.cc
|
| index 9fb79e7679fa3de8f9bd7c5cd334706ba7ec1734..992659edce9bbc46c5de8bfd843607f6f769dcdc 100644
|
| --- a/src/bootstrapper.cc
|
| +++ b/src/bootstrapper.cc
|
| @@ -384,7 +384,7 @@ static Handle<JSFunction> InstallFunction(Handle<JSObject> target,
|
| void Genesis::SetFunctionInstanceDescriptor(
|
| Handle<Map> map, PrototypePropertyMode prototypeMode) {
|
| int size = (prototypeMode == DONT_ADD_PROTOTYPE) ? 4 : 5;
|
| - Handle<DescriptorArray> descriptors(factory()->NewDescriptorArray(0, size));
|
| + Handle<DescriptorArray> descriptors(factory()->NewDescriptorArray(size));
|
| DescriptorArray::WhitenessWitness witness(*descriptors);
|
|
|
| Handle<Foreign> length(factory()->NewForeign(&Accessors::FunctionLength));
|
| @@ -525,7 +525,7 @@ Handle<JSFunction> Genesis::CreateEmptyFunction(Isolate* isolate) {
|
| void Genesis::SetStrictFunctionInstanceDescriptor(
|
| Handle<Map> map, PrototypePropertyMode prototypeMode) {
|
| int size = (prototypeMode == DONT_ADD_PROTOTYPE) ? 4 : 5;
|
| - Handle<DescriptorArray> descriptors(factory()->NewDescriptorArray(0, size));
|
| + Handle<DescriptorArray> descriptors(factory()->NewDescriptorArray(size));
|
| DescriptorArray::WhitenessWitness witness(*descriptors);
|
|
|
| Handle<Foreign> length(factory()->NewForeign(&Accessors::FunctionLength));
|
| @@ -637,7 +637,7 @@ static void SetAccessors(Handle<Map> map,
|
| Handle<String> name,
|
| Handle<JSFunction> func) {
|
| DescriptorArray* descs = map->instance_descriptors();
|
| - int number = descs->SearchWithCache(*name, *map);
|
| + int number = descs->Search(*name);
|
| AccessorPair* accessors = AccessorPair::cast(descs->GetValue(number));
|
| accessors->set_getter(*func);
|
| accessors->set_setter(*func);
|
| @@ -868,8 +868,7 @@ bool Genesis::InitializeGlobal(Handle<GlobalObject> inner_global,
|
| array_function->shared()->set_length(1);
|
|
|
| Handle<Map> initial_map(array_function->initial_map());
|
| - Handle<DescriptorArray> array_descriptors(
|
| - factory->NewDescriptorArray(0, 1));
|
| + Handle<DescriptorArray> array_descriptors(factory->NewDescriptorArray(1));
|
| DescriptorArray::WhitenessWitness witness(*array_descriptors);
|
|
|
| Handle<Foreign> array_length(factory->NewForeign(&Accessors::ArrayLength));
|
| @@ -916,8 +915,7 @@ bool Genesis::InitializeGlobal(Handle<GlobalObject> inner_global,
|
|
|
| Handle<Map> string_map =
|
| Handle<Map>(native_context()->string_function()->initial_map());
|
| - Handle<DescriptorArray> string_descriptors(
|
| - factory->NewDescriptorArray(0, 1));
|
| + Handle<DescriptorArray> string_descriptors(factory->NewDescriptorArray(1));
|
| DescriptorArray::WhitenessWitness witness(*string_descriptors);
|
|
|
| Handle<Foreign> string_length(
|
| @@ -958,7 +956,7 @@ bool Genesis::InitializeGlobal(Handle<GlobalObject> inner_global,
|
|
|
| PropertyAttributes final =
|
| static_cast<PropertyAttributes>(DONT_ENUM | DONT_DELETE | READ_ONLY);
|
| - Handle<DescriptorArray> descriptors = factory->NewDescriptorArray(0, 5);
|
| + Handle<DescriptorArray> descriptors = factory->NewDescriptorArray(5);
|
| DescriptorArray::WhitenessWitness witness(*descriptors);
|
| Map::SetDescriptors(initial_map, descriptors);
|
|
|
| @@ -1142,7 +1140,7 @@ bool Genesis::InitializeGlobal(Handle<GlobalObject> inner_global,
|
| Handle<Map> map = factory->NewMap(JS_OBJECT_TYPE,
|
| Heap::kArgumentsObjectSizeStrict);
|
| // Create the descriptor array for the arguments object.
|
| - Handle<DescriptorArray> descriptors = factory->NewDescriptorArray(0, 3);
|
| + Handle<DescriptorArray> descriptors = factory->NewDescriptorArray(3);
|
| DescriptorArray::WhitenessWitness witness(*descriptors);
|
| Map::SetDescriptors(map, descriptors);
|
|
|
| @@ -1489,7 +1487,7 @@ bool Genesis::InstallNatives() {
|
| Handle<Map> script_map = Handle<Map>(script_fun->initial_map());
|
|
|
| Handle<DescriptorArray> script_descriptors(
|
| - factory()->NewDescriptorArray(0, 13));
|
| + factory()->NewDescriptorArray(13));
|
| DescriptorArray::WhitenessWitness witness(*script_descriptors);
|
|
|
| Handle<Foreign> script_source(
|
| @@ -1667,8 +1665,7 @@ bool Genesis::InstallNatives() {
|
|
|
| // Make "length" magic on instances.
|
| Handle<Map> initial_map(array_function->initial_map());
|
| - Handle<DescriptorArray> array_descriptors(
|
| - factory()->NewDescriptorArray(0, 1));
|
| + Handle<DescriptorArray> array_descriptors(factory()->NewDescriptorArray(1));
|
| DescriptorArray::WhitenessWitness witness(*array_descriptors);
|
|
|
| Handle<Foreign> array_length(factory()->NewForeign(
|
| @@ -1768,7 +1765,7 @@ bool Genesis::InstallNatives() {
|
|
|
| // Update map with length accessor from Array and add "index" and "input".
|
| Handle<DescriptorArray> reresult_descriptors =
|
| - factory()->NewDescriptorArray(0, 3);
|
| + factory()->NewDescriptorArray(3);
|
| DescriptorArray::WhitenessWitness witness(*reresult_descriptors);
|
| Map::SetDescriptors(initial_map, reresult_descriptors);
|
|
|
| @@ -1777,8 +1774,7 @@ bool Genesis::InstallNatives() {
|
| Handle<DescriptorArray> array_descriptors(
|
| array_function->initial_map()->instance_descriptors());
|
| String* length = heap()->length_symbol();
|
| - int old = array_descriptors->SearchWithCache(
|
| - length, array_function->initial_map());
|
| + int old = array_descriptors->SearchWithCache(length);
|
| ASSERT(old != DescriptorArray::kNotFound);
|
| CallbacksDescriptor desc(length,
|
| array_descriptors->GetValue(old),
|
|
|