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

Unified Diff: src/factory.cc

Issue 2398023002: [wasm] asm.js - Parse and convert asm.js to wasm a function at a time. (Closed)
Patch Set: fix Created 4 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
« no previous file with comments | « src/factory.h ('k') | src/parsing/parse-info.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 844880c209a7fad2afa8278231a1f04b0ff77e17..1ae768ba0e50566c6540d1cc7a9a806486192a56 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(ScopeInfo::Empty(isolate()));
+ 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,
« no previous file with comments | « src/factory.h ('k') | src/parsing/parse-info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698