Index: src/bootstrapper.cc |
diff --git a/src/bootstrapper.cc b/src/bootstrapper.cc |
index 6c36cad03ee87fa571001d627d782acdb2abef24..2ca379f006775f767a78c5edc1936956e1c0f30b 100644 |
--- a/src/bootstrapper.cc |
+++ b/src/bootstrapper.cc |
@@ -1055,6 +1055,24 @@ void Genesis::InitializeGlobal(Handle<GlobalObject> inner_global, |
#endif |
} |
+ { // --- aliased_arguments_boilerplate_ |
+ Handle<Map> old_map(global_context()->arguments_boilerplate()->map()); |
+ Handle<Map> new_map = factory->CopyMapDropTransitions(old_map); |
+ new_map->set_pre_allocated_property_fields(2); |
+ Handle<JSObject> result = factory->NewJSObjectFromMap(new_map); |
+ new_map->set_elements_kind(JSObject::NON_STRICT_ARGUMENTS_ELEMENTS); |
+ // Set up a well-formed parameter map to make assertions happy. |
+ Handle<FixedArray> elements = factory->NewFixedArray(2); |
+ elements->set_map(heap->non_strict_arguments_elements_map()); |
+ Handle<FixedArray> array; |
+ array = factory->NewFixedArray(0); |
+ elements->set(0, *array); |
+ array = factory->NewFixedArray(0); |
+ elements->set(1, *array); |
+ result->set_elements(*elements); |
+ global_context()->set_aliased_arguments_boilerplate(*result); |
+ } |
+ |
{ // --- strict mode arguments boilerplate |
const PropertyAttributes attributes = |
static_cast<PropertyAttributes>(DONT_ENUM | DONT_DELETE | READ_ONLY); |