| 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 432 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 443 | 443 | 
| 444 bool ShouldUseIgnition(CompilationInfo* info) { | 444 bool ShouldUseIgnition(CompilationInfo* info) { | 
| 445   DCHECK(info->has_shared_info()); | 445   DCHECK(info->has_shared_info()); | 
| 446 | 446 | 
| 447   // When requesting debug code as a replacement for existing code, we provide | 447   // When requesting debug code as a replacement for existing code, we provide | 
| 448   // the same kind as the existing code (to prevent implicit tier-change). | 448   // the same kind as the existing code (to prevent implicit tier-change). | 
| 449   if (info->is_debug() && info->shared_info()->is_compiled()) { | 449   if (info->is_debug() && info->shared_info()->is_compiled()) { | 
| 450     return info->shared_info()->HasBytecodeArray(); | 450     return info->shared_info()->HasBytecodeArray(); | 
| 451   } | 451   } | 
| 452 | 452 | 
| 453   // For generator or async functions we might avoid Ignition wholesale. |  | 
| 454   if (info->shared_info()->is_resumable() && !FLAG_ignition_generators) { |  | 
| 455     return false; |  | 
| 456   } |  | 
| 457 |  | 
| 458   // Since we can't OSR from Ignition, skip Ignition for asm.js functions. | 453   // Since we can't OSR from Ignition, skip Ignition for asm.js functions. | 
| 459   if (info->shared_info()->asm_function()) { | 454   if (info->shared_info()->asm_function()) { | 
| 460     return false; | 455     return false; | 
| 461   } | 456   } | 
| 462 | 457 | 
| 463   // Checks whether top level functions should be passed by the filter. | 458   // Checks whether top level functions should be passed by the filter. | 
| 464   if (info->shared_info()->is_toplevel()) { | 459   if (info->shared_info()->is_toplevel()) { | 
| 465     Vector<const char> filter = CStrVector(FLAG_ignition_filter); | 460     Vector<const char> filter = CStrVector(FLAG_ignition_filter); | 
| 466     return (filter.length() == 0) || (filter.length() == 1 && filter[0] == '*'); | 461     return (filter.length() == 0) || (filter.length() == 1 && filter[0] == '*'); | 
| 467   } | 462   } | 
| (...skipping 1448 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1916     DCHECK(shared->is_compiled()); | 1911     DCHECK(shared->is_compiled()); | 
| 1917     function->set_literals(cached.literals); | 1912     function->set_literals(cached.literals); | 
| 1918   } else if (shared->is_compiled()) { | 1913   } else if (shared->is_compiled()) { | 
| 1919     // TODO(mvstanton): pass pretenure flag to EnsureLiterals. | 1914     // TODO(mvstanton): pass pretenure flag to EnsureLiterals. | 
| 1920     JSFunction::EnsureLiterals(function); | 1915     JSFunction::EnsureLiterals(function); | 
| 1921   } | 1916   } | 
| 1922 } | 1917 } | 
| 1923 | 1918 | 
| 1924 }  // namespace internal | 1919 }  // namespace internal | 
| 1925 }  // namespace v8 | 1920 }  // namespace v8 | 
| OLD | NEW | 
|---|