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

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 DCHECKS 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
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,

Powered by Google App Engine
This is Rietveld 408576698