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

Side by Side Diff: src/compiler.cc

Issue 2583113002: Use preexisting SharedFunctionInfos in the asm-wasm builder (Closed)
Patch Set: comment Created 3 years, 12 months 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 unified diff | Download patch
« no previous file with comments | « src/asmjs/asm-wasm-builder.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/compiler.h" 5 #include "src/compiler.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <memory> 8 #include <memory>
9 9
10 #include "src/asmjs/asm-js.h" 10 #include "src/asmjs/asm-js.h"
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 job->RecordUnoptimizedCompilationStats(); 424 job->RecordUnoptimizedCompilationStats();
425 } 425 }
426 return status; 426 return status;
427 } 427 }
428 428
429 bool GenerateUnoptimizedCode(CompilationInfo* info) { 429 bool GenerateUnoptimizedCode(CompilationInfo* info) {
430 if (FLAG_validate_asm && info->scope()->asm_module() && 430 if (FLAG_validate_asm && info->scope()->asm_module() &&
431 !info->shared_info()->is_asm_wasm_broken() && !info->is_debug()) { 431 !info->shared_info()->is_asm_wasm_broken() && !info->is_debug()) {
432 EnsureFeedbackMetadata(info); 432 EnsureFeedbackMetadata(info);
433 MaybeHandle<FixedArray> wasm_data; 433 MaybeHandle<FixedArray> wasm_data;
434 wasm_data = AsmJs::CompileAsmViaWasm(info->parse_info()); 434 wasm_data = AsmJs::CompileAsmViaWasm(info);
435 if (!wasm_data.is_null()) { 435 if (!wasm_data.is_null()) {
436 info->shared_info()->set_asm_wasm_data(*wasm_data.ToHandleChecked()); 436 info->shared_info()->set_asm_wasm_data(*wasm_data.ToHandleChecked());
437 info->SetCode(info->isolate()->builtins()->InstantiateAsmJs()); 437 info->SetCode(info->isolate()->builtins()->InstantiateAsmJs());
438 InstallUnoptimizedCode(info); 438 InstallUnoptimizedCode(info);
439 return true; 439 return true;
440 } 440 }
441 } 441 }
442 442
443 std::unique_ptr<CompilationJob> job( 443 std::unique_ptr<CompilationJob> job(
444 GetUnoptimizedCompilationJob(info, LazyCompilationMode::kIfRequested)); 444 GetUnoptimizedCompilationJob(info, LazyCompilationMode::kIfRequested));
(...skipping 1301 matching lines...) Expand 10 before | Expand all | Expand 10 after
1746 DCHECK(shared->is_compiled()); 1746 DCHECK(shared->is_compiled());
1747 function->set_literals(cached.literals); 1747 function->set_literals(cached.literals);
1748 } else if (shared->is_compiled()) { 1748 } else if (shared->is_compiled()) {
1749 // TODO(mvstanton): pass pretenure flag to EnsureLiterals. 1749 // TODO(mvstanton): pass pretenure flag to EnsureLiterals.
1750 JSFunction::EnsureLiterals(function); 1750 JSFunction::EnsureLiterals(function);
1751 } 1751 }
1752 } 1752 }
1753 1753
1754 } // namespace internal 1754 } // namespace internal
1755 } // namespace v8 1755 } // namespace v8
OLDNEW
« no previous file with comments | « src/asmjs/asm-wasm-builder.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698