| Index: src/factory.cc
|
| diff --git a/src/factory.cc b/src/factory.cc
|
| index 72974a317c18646800178b4c10340a85b444afcf..f1fa94dde3117ae4ecfa09345fc5ebc556a39154 100644
|
| --- a/src/factory.cc
|
| +++ b/src/factory.cc
|
| @@ -708,6 +708,18 @@ Handle<Context> Factory::NewGlobalContext(Handle<JSFunction> function,
|
| }
|
|
|
|
|
| +Handle<GlobalContextTable> Factory::NewGlobalContextTable(int length,
|
| + int size) {
|
| + CHECK(length >= 0 && size >= 0 && size < length);
|
| + Handle<FixedArray> array = NewFixedArray(length);
|
| + array->set_map_no_write_barrier(*global_context_table_map());
|
| + array->set(0, Smi::FromInt(size));
|
| + Handle<GlobalContextTable> context_table =
|
| + Handle<GlobalContextTable>::cast(array);
|
| + return context_table;
|
| +}
|
| +
|
| +
|
| Handle<Context> Factory::NewModuleContext(Handle<ScopeInfo> scope_info) {
|
| Handle<FixedArray> array =
|
| NewFixedArray(scope_info->ContextLength(), TENURED);
|
|
|