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 430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
441 } | 441 } |
442 | 442 |
443 bool ShouldUseIgnition(CompilationInfo* info) { | 443 bool ShouldUseIgnition(CompilationInfo* info) { |
444 if (!FLAG_ignition) return false; | 444 if (!FLAG_ignition) return false; |
445 | 445 |
446 DCHECK(info->has_shared_info()); | 446 DCHECK(info->has_shared_info()); |
447 | 447 |
448 // When requesting debug code as a replacement for existing code, we provide | 448 // When requesting debug code as a replacement for existing code, we provide |
449 // the same kind as the existing code (to prevent implicit tier-change). | 449 // the same kind as the existing code (to prevent implicit tier-change). |
450 if (info->is_debug() && info->shared_info()->is_compiled()) { | 450 if (info->is_debug() && info->shared_info()->is_compiled()) { |
451 return info->shared_info()->HasBytecodeArray(); | 451 return !info->shared_info()->HasBaselineCode(); |
452 } | 452 } |
453 | 453 |
454 // Since we can't OSR from Ignition, skip Ignition for asm.js functions. | 454 // Since we can't OSR from Ignition, skip Ignition for asm.js functions. |
455 if (info->shared_info()->asm_function()) { | 455 if (info->shared_info()->asm_function()) { |
456 return false; | 456 return false; |
457 } | 457 } |
458 | 458 |
459 // Checks whether top level functions should be passed by the filter. | 459 // Checks whether top level functions should be passed by the filter. |
460 if (info->shared_info()->is_toplevel()) { | 460 if (info->shared_info()->is_toplevel()) { |
461 Vector<const char> filter = CStrVector(FLAG_ignition_filter); | 461 Vector<const char> filter = CStrVector(FLAG_ignition_filter); |
(...skipping 1491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1953 DCHECK(shared->is_compiled()); | 1953 DCHECK(shared->is_compiled()); |
1954 function->set_literals(cached.literals); | 1954 function->set_literals(cached.literals); |
1955 } else if (shared->is_compiled()) { | 1955 } else if (shared->is_compiled()) { |
1956 // TODO(mvstanton): pass pretenure flag to EnsureLiterals. | 1956 // TODO(mvstanton): pass pretenure flag to EnsureLiterals. |
1957 JSFunction::EnsureLiterals(function); | 1957 JSFunction::EnsureLiterals(function); |
1958 } | 1958 } |
1959 } | 1959 } |
1960 | 1960 |
1961 } // namespace internal | 1961 } // namespace internal |
1962 } // namespace v8 | 1962 } // namespace v8 |
OLD | NEW |