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 1334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1345 script->set_shared_function_infos(*old_function_infos); | 1345 script->set_shared_function_infos(*old_function_infos); |
1346 | 1346 |
1347 return infos; | 1347 return infos; |
1348 } | 1348 } |
1349 | 1349 |
1350 bool Compiler::EnsureBytecode(CompilationInfo* info) { | 1350 bool Compiler::EnsureBytecode(CompilationInfo* info) { |
1351 DCHECK(ShouldUseIgnition(info)); | 1351 DCHECK(ShouldUseIgnition(info)); |
1352 if (!info->shared_info()->HasBytecodeArray()) { | 1352 if (!info->shared_info()->HasBytecodeArray()) { |
1353 Handle<Code> original_code(info->shared_info()->code()); | 1353 Handle<Code> original_code(info->shared_info()->code()); |
1354 if (GetUnoptimizedCode(info).is_null()) return false; | 1354 if (GetUnoptimizedCode(info).is_null()) return false; |
| 1355 if (info->shared_info()->HasAsmWasmData()) return false; |
1355 DCHECK(info->shared_info()->is_compiled()); | 1356 DCHECK(info->shared_info()->is_compiled()); |
1356 if (original_code->kind() == Code::FUNCTION) { | 1357 if (original_code->kind() == Code::FUNCTION) { |
1357 // Generating bytecode will install the {InterpreterEntryTrampoline} as | 1358 // Generating bytecode will install the {InterpreterEntryTrampoline} as |
1358 // shared code on the function. To avoid an implicit tier down we restore | 1359 // shared code on the function. To avoid an implicit tier down we restore |
1359 // original baseline code in case it existed beforehand. | 1360 // original baseline code in case it existed beforehand. |
1360 info->shared_info()->ReplaceCode(*original_code); | 1361 info->shared_info()->ReplaceCode(*original_code); |
1361 } | 1362 } |
1362 } | 1363 } |
1363 DCHECK(info->shared_info()->HasBytecodeArray()); | 1364 DCHECK(info->shared_info()->HasBytecodeArray()); |
1364 return true; | 1365 return true; |
(...skipping 545 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1910 DCHECK(shared->is_compiled()); | 1911 DCHECK(shared->is_compiled()); |
1911 function->set_literals(cached.literals); | 1912 function->set_literals(cached.literals); |
1912 } else if (shared->is_compiled()) { | 1913 } else if (shared->is_compiled()) { |
1913 // TODO(mvstanton): pass pretenure flag to EnsureLiterals. | 1914 // TODO(mvstanton): pass pretenure flag to EnsureLiterals. |
1914 JSFunction::EnsureLiterals(function); | 1915 JSFunction::EnsureLiterals(function); |
1915 } | 1916 } |
1916 } | 1917 } |
1917 | 1918 |
1918 } // namespace internal | 1919 } // namespace internal |
1919 } // namespace v8 | 1920 } // namespace v8 |
OLD | NEW |