Chromium Code Reviews| Index: src/factory.cc |
| diff --git a/src/factory.cc b/src/factory.cc |
| index 844880c209a7fad2afa8278231a1f04b0ff77e17..e88c8c1c5ca5f47956e7a75afbde0dee0e9c123f 100644 |
| --- a/src/factory.cc |
| +++ b/src/factory.cc |
| @@ -2269,6 +2269,17 @@ Handle<SharedFunctionInfo> Factory::NewSharedFunctionInfo( |
| return shared; |
| } |
| +Handle<SharedFunctionInfo> Factory::NewSharedFunctionInfoForLiteral( |
| + FunctionLiteral* literal, Handle<Script> script) { |
| + Handle<Code> code = isolate()->builtins()->CompileLazy(); |
| + Handle<ScopeInfo> scope_info = handle(ScopeInfo::Empty(isolate())); |
|
Toon Verwaest
2016/11/29 14:39:59
Handle<ScopeInfo> scope_info(ScopeInfo::Empty(isol
bradn
2016/11/29 22:09:06
Done.
|
| + Handle<SharedFunctionInfo> result = NewSharedFunctionInfo( |
| + literal->name(), literal->materialized_literal_count(), literal->kind(), |
| + code, scope_info); |
| + SharedFunctionInfo::InitFromFunctionLiteral(result, literal); |
| + SharedFunctionInfo::SetScript(result, script); |
| + return result; |
| +} |
| Handle<JSMessageObject> Factory::NewJSMessageObject( |
| MessageTemplate::Template message, Handle<Object> argument, |