Chromium Code Reviews| Index: src/bootstrapper.cc |
| diff --git a/src/bootstrapper.cc b/src/bootstrapper.cc |
| index f07e625ec01956ede51834e8616a1e4160e70c84..5719461d95f122b6f67d752634f51e04c4354f57 100644 |
| --- a/src/bootstrapper.cc |
| +++ b/src/bootstrapper.cc |
| @@ -1076,6 +1076,11 @@ void Genesis::InitializeGlobal(Handle<GlobalObject> inner_global, |
| elements->set(0, *array); |
| array = factory->NewFixedArray(0); |
| elements->set(1, *array); |
| + Handle<Map> non_strict_arguments_elements_map = |
| + factory->GetElementsTransitionMap(result, |
| + NON_STRICT_ARGUMENTS_ELEMENTS); |
| + result->set_map(*non_strict_arguments_elements_map); |
| + ASSERT(result->HasNonStrictArgumentsElements()); |
| result->set_elements(*elements); |
| global_context()->set_aliased_arguments_boilerplate(*result); |
| } |
| @@ -1555,6 +1560,14 @@ bool Genesis::InstallNatives() { |
| isolate()->builtins()->builtin(Builtins::kArrayConstructCode)); |
| array_function->shared()->DontAdaptArguments(); |
| + // InternalArrays should not use Smi-Only array optimizations |
|
Sven Panne
2011/09/16 09:19:32
Please explain why...
danno
2011/09/21 14:32:04
Done.
|
| + MaybeObject* maybe_map = |
| + array_function->initial_map()->CopyDropTransitions(); |
| + Map* new_map; |
| + if (!maybe_map->To<Map>(&new_map)) return maybe_map; |
| + new_map->set_elements_kind(FAST_ELEMENTS); |
| + array_function->set_initial_map(new_map); |
| + |
| // Make "length" magic on instances. |
| Handle<DescriptorArray> array_descriptors = |
| factory()->CopyAppendForeignDescriptor( |