OLD | NEW |
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 412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
423 job->RecordUnoptimizedCompilationStats(); | 423 job->RecordUnoptimizedCompilationStats(); |
424 } | 424 } |
425 return status; | 425 return status; |
426 } | 426 } |
427 | 427 |
428 bool GenerateUnoptimizedCode(CompilationInfo* info) { | 428 bool GenerateUnoptimizedCode(CompilationInfo* info) { |
429 if (FLAG_validate_asm && info->scope()->asm_module() && | 429 if (FLAG_validate_asm && info->scope()->asm_module() && |
430 !info->shared_info()->is_asm_wasm_broken() && !info->is_debug()) { | 430 !info->shared_info()->is_asm_wasm_broken() && !info->is_debug()) { |
431 EnsureFeedbackMetadata(info); | 431 EnsureFeedbackMetadata(info); |
432 MaybeHandle<FixedArray> wasm_data; | 432 MaybeHandle<FixedArray> wasm_data; |
433 wasm_data = AsmJs::ConvertAsmToWasm(info->parse_info()); | 433 wasm_data = AsmJs::CompileAsmViaWasm(info->parse_info()); |
434 if (!wasm_data.is_null()) { | 434 if (!wasm_data.is_null()) { |
435 info->shared_info()->set_asm_wasm_data(*wasm_data.ToHandleChecked()); | 435 info->shared_info()->set_asm_wasm_data(*wasm_data.ToHandleChecked()); |
436 info->SetCode(info->isolate()->builtins()->InstantiateAsmJs()); | 436 info->SetCode(info->isolate()->builtins()->InstantiateAsmJs()); |
437 InstallUnoptimizedCode(info); | 437 InstallUnoptimizedCode(info); |
438 return true; | 438 return true; |
439 } | 439 } |
440 } | 440 } |
441 | 441 |
442 std::unique_ptr<CompilationJob> job(GetUnoptimizedCompilationJob(info)); | 442 std::unique_ptr<CompilationJob> job(GetUnoptimizedCompilationJob(info)); |
443 if (job->PrepareJob() != CompilationJob::SUCCEEDED) return false; | 443 if (job->PrepareJob() != CompilationJob::SUCCEEDED) return false; |
(...skipping 1281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1725 DCHECK(shared->is_compiled()); | 1725 DCHECK(shared->is_compiled()); |
1726 function->set_literals(cached.literals); | 1726 function->set_literals(cached.literals); |
1727 } else if (shared->is_compiled()) { | 1727 } else if (shared->is_compiled()) { |
1728 // TODO(mvstanton): pass pretenure flag to EnsureLiterals. | 1728 // TODO(mvstanton): pass pretenure flag to EnsureLiterals. |
1729 JSFunction::EnsureLiterals(function); | 1729 JSFunction::EnsureLiterals(function); |
1730 } | 1730 } |
1731 } | 1731 } |
1732 | 1732 |
1733 } // namespace internal | 1733 } // namespace internal |
1734 } // namespace v8 | 1734 } // namespace v8 |
OLD | NEW |