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 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
408 CompilationJob::Status status = job->FinalizeJob(); | 408 CompilationJob::Status status = job->FinalizeJob(); |
409 if (status == CompilationJob::SUCCEEDED) { | 409 if (status == CompilationJob::SUCCEEDED) { |
410 InstallUnoptimizedCode(job->info()); | 410 InstallUnoptimizedCode(job->info()); |
411 job->RecordUnoptimizedCompilationStats(); | 411 job->RecordUnoptimizedCompilationStats(); |
412 } | 412 } |
413 return status; | 413 return status; |
414 } | 414 } |
415 | 415 |
416 bool GenerateUnoptimizedCode(CompilationInfo* info) { | 416 bool GenerateUnoptimizedCode(CompilationInfo* info) { |
417 if (FLAG_validate_asm && info->scope()->asm_module() && | 417 if (FLAG_validate_asm && info->scope()->asm_module() && |
418 !info->shared_info()->is_asm_wasm_broken()) { | 418 !info->shared_info()->is_asm_wasm_broken() && !info->is_debug()) { |
419 EnsureFeedbackMetadata(info); | 419 EnsureFeedbackMetadata(info); |
420 MaybeHandle<FixedArray> wasm_data; | 420 MaybeHandle<FixedArray> wasm_data; |
421 wasm_data = AsmJs::ConvertAsmToWasm(info->parse_info()); | 421 wasm_data = AsmJs::ConvertAsmToWasm(info->parse_info()); |
422 if (!wasm_data.is_null()) { | 422 if (!wasm_data.is_null()) { |
423 info->shared_info()->set_asm_wasm_data(*wasm_data.ToHandleChecked()); | 423 info->shared_info()->set_asm_wasm_data(*wasm_data.ToHandleChecked()); |
424 info->SetCode(info->isolate()->builtins()->InstantiateAsmJs()); | 424 info->SetCode(info->isolate()->builtins()->InstantiateAsmJs()); |
425 InstallUnoptimizedCode(info); | 425 InstallUnoptimizedCode(info); |
426 return true; | 426 return true; |
427 } | 427 } |
428 } | 428 } |
(...skipping 1276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1705 DCHECK(shared->is_compiled()); | 1705 DCHECK(shared->is_compiled()); |
1706 function->set_literals(cached.literals); | 1706 function->set_literals(cached.literals); |
1707 } else if (shared->is_compiled()) { | 1707 } else if (shared->is_compiled()) { |
1708 // TODO(mvstanton): pass pretenure flag to EnsureLiterals. | 1708 // TODO(mvstanton): pass pretenure flag to EnsureLiterals. |
1709 JSFunction::EnsureLiterals(function); | 1709 JSFunction::EnsureLiterals(function); |
1710 } | 1710 } |
1711 } | 1711 } |
1712 | 1712 |
1713 } // namespace internal | 1713 } // namespace internal |
1714 } // namespace v8 | 1714 } // namespace v8 |
OLD | NEW |