Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(143)

Unified Diff: src/factory.cc

Issue 705663004: harmony_scoping: Implement lexical bindings at top level (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: CR feedback Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« src/factory.h ('K') | « src/factory.h ('k') | src/heap/heap.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/factory.cc
diff --git a/src/factory.cc b/src/factory.cc
index 72974a317c18646800178b4c10340a85b444afcf..7ecc039937fca0da8a167d4f40a39612dd5d0732 100644
--- a/src/factory.cc
+++ b/src/factory.cc
@@ -708,6 +708,16 @@ Handle<Context> Factory::NewGlobalContext(Handle<JSFunction> function,
}
+Handle<GlobalContextTable> Factory::NewEmptyGlobalContextTable() {
+ Handle<FixedArray> array = NewFixedArray(1);
+ array->set_map_no_write_barrier(*global_context_table_map());
+ array->set(0, Smi::FromInt(0));
+ 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);
« src/factory.h ('K') | « src/factory.h ('k') | src/heap/heap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698