Index: src/factory.cc |
diff --git a/src/factory.cc b/src/factory.cc |
index 05dd5c96619ea25d61feb38d8f54a9834b61f7e7..ee5c37bf081a406cc803df1a9c50a5f556fa3d6c 100644 |
--- a/src/factory.cc |
+++ b/src/factory.cc |
@@ -34,6 +34,7 @@ |
#include "macro-assembler.h" |
#include "objects.h" |
#include "objects-visiting.h" |
+#include "scopeinfo.h" |
namespace v8 { |
namespace internal { |
@@ -291,6 +292,19 @@ Handle<Context> Factory::NewWithContext(Handle<JSFunction> function, |
} |
+Handle<Context> Factory::NewBlockContext( |
+ Handle<JSFunction> function, |
+ Handle<Context> previous, |
+ Handle<SerializedScopeInfo> scope_info) { |
+ CALL_HEAP_FUNCTION( |
+ isolate(), |
+ isolate()->heap()->AllocateBlockContext(*function, |
+ *previous, |
+ *scope_info), |
+ Context); |
+} |
+ |
+ |
Handle<Struct> Factory::NewStruct(InstanceType type) { |
CALL_HEAP_FUNCTION( |
isolate(), |
@@ -734,6 +748,14 @@ Handle<JSFunction> Factory::NewFunctionWithoutPrototype(Handle<String> name, |
} |
+Handle<SerializedScopeInfo> Factory::NewSerializedScopeInfo(int length) { |
+ CALL_HEAP_FUNCTION( |
+ isolate(), |
+ isolate()->heap()->AllocateSerializedScopeInfo(length), |
+ SerializedScopeInfo); |
+} |
+ |
+ |
Handle<Code> Factory::NewCode(const CodeDesc& desc, |
Code::Flags flags, |
Handle<Object> self_ref, |