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

Unified Diff: src/compiler.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/ast/scopes.cc ('k') | src/factory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler.cc
diff --git a/src/compiler.cc b/src/compiler.cc
index 1c94c9ed14231048baa0e9f5130101a18804c2a5..a67bfb84d7a35a18a578363092c5e65254fae23d 100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -948,18 +948,6 @@ MaybeHandle<Code> GetLazyCode(Handle<JSFunction> function) {
}
-Handle<SharedFunctionInfo> NewSharedFunctionInfoForLiteral(
- Isolate* isolate, FunctionLiteral* literal, Handle<Script> script) {
- Handle<Code> code = isolate->builtins()->CompileLazy();
- Handle<ScopeInfo> scope_info = handle(ScopeInfo::Empty(isolate));
- Handle<SharedFunctionInfo> result = isolate->factory()->NewSharedFunctionInfo(
- literal->name(), literal->materialized_literal_count(), literal->kind(),
- code, scope_info);
- SharedFunctionInfo::InitFromFunctionLiteral(result, literal);
- SharedFunctionInfo::SetScript(result, script);
- return result;
-}
-
Handle<SharedFunctionInfo> CompileToplevel(CompilationInfo* info) {
Isolate* isolate = info->isolate();
TimerEventScope<TimerEventCompileCode> timer(isolate);
@@ -998,7 +986,7 @@ Handle<SharedFunctionInfo> CompileToplevel(CompilationInfo* info) {
// Allocate a shared function info object.
DCHECK_EQ(kNoSourcePosition, lit->function_token_position());
- result = NewSharedFunctionInfoForLiteral(isolate, lit, script);
+ result = isolate->factory()->NewSharedFunctionInfoForLiteral(lit, script);
result->set_is_toplevel(true);
parse_info->set_shared_info(result);
parse_info->set_function_literal_id(result->function_literal_id());
@@ -1575,7 +1563,8 @@ Handle<SharedFunctionInfo> Compiler::GetSharedFunctionInfo(
// Allocate a shared function info object.
Handle<SharedFunctionInfo> result;
if (!maybe_existing.ToHandle(&result)) {
- result = NewSharedFunctionInfoForLiteral(isolate, literal, script);
+ result =
+ isolate->factory()->NewSharedFunctionInfoForLiteral(literal, script);
result->set_is_toplevel(false);
// If the outer function has been compiled before, we cannot be sure that
« no previous file with comments | « src/ast/scopes.cc ('k') | src/factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698