| Index: src/heap.cc
|
| diff --git a/src/heap.cc b/src/heap.cc
|
| index 5bb1ee49d3f27873ee40741d1f32979607e1f4f2..801fcde79cfce1445757fdc426b83f4f9f8297f9 100644
|
| --- a/src/heap.cc
|
| +++ b/src/heap.cc
|
| @@ -4333,6 +4333,22 @@ MaybeObject* Heap::AllocateJSObjectWithAllocationSite(JSFunction* constructor,
|
| }
|
|
|
|
|
| +MaybeObject* Heap::AllocateJSGeneratorIterator(JSFunction *function) {
|
| + ASSERT(function->shared()->is_generator());
|
| + Map *map = function->initial_map();
|
| + ASSERT(map->IsMap());
|
| + ASSERT(map->instance_type() == JS_GENERATOR_ITERATOR_TYPE);
|
| + JSGeneratorIterator *generator;
|
| + MaybeObject* maybe_generator = AllocateJSObjectFromMap(map, NOT_TENURED);
|
| + if (!maybe_generator->To(&generator)) return maybe_generator;
|
| + generator->set_function(function);
|
| + generator->set_context(Smi::FromInt(0));
|
| + generator->set_continuation(0);
|
| + generator->set_operand_stack(Smi::FromInt(0));
|
| + return generator;
|
| +}
|
| +
|
| +
|
| MaybeObject* Heap::AllocateJSModule(Context* context, ScopeInfo* scope_info) {
|
| // Allocate a fresh map. Modules do not have a prototype.
|
| Map* map;
|
|
|