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 | 8 |
9 #include "src/ast-numbering.h" | 9 #include "src/ast-numbering.h" |
10 #include "src/bootstrapper.h" | 10 #include "src/bootstrapper.h" |
(...skipping 1466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1477 if (shared->disable_optimization_reason() == kEval) { | 1477 if (shared->disable_optimization_reason() == kEval) { |
1478 return MaybeHandle<Code>(); | 1478 return MaybeHandle<Code>(); |
1479 } | 1479 } |
1480 | 1480 |
1481 // TODO(mstarzinger): We cannot properly deserialize a scope chain for the | 1481 // TODO(mstarzinger): We cannot properly deserialize a scope chain for the |
1482 // builtin context, hence Genesis::InstallExperimentalNatives would fail. | 1482 // builtin context, hence Genesis::InstallExperimentalNatives would fail. |
1483 if (shared->is_toplevel() && isolate->bootstrapper()->IsActive()) { | 1483 if (shared->is_toplevel() && isolate->bootstrapper()->IsActive()) { |
1484 return MaybeHandle<Code>(); | 1484 return MaybeHandle<Code>(); |
1485 } | 1485 } |
1486 | 1486 |
1487 // TODO(titzer): Some top-level code times out because of missing interrupt | |
1488 // checks at back-branches, these are currently marked with --no-turbo-osr. | |
1489 if (shared->is_toplevel() && !FLAG_turbo_osr) { | |
1490 return MaybeHandle<Code>(); | |
1491 } | |
1492 | |
1493 info->SetOptimizing(osr_ast_id, current_code); | 1487 info->SetOptimizing(osr_ast_id, current_code); |
1494 | 1488 |
1495 if (mode == CONCURRENT) { | 1489 if (mode == CONCURRENT) { |
1496 if (GetOptimizedCodeLater(info.get())) { | 1490 if (GetOptimizedCodeLater(info.get())) { |
1497 info.Detach(); // The background recompile job owns this now. | 1491 info.Detach(); // The background recompile job owns this now. |
1498 return isolate->builtins()->InOptimizationQueue(); | 1492 return isolate->builtins()->InOptimizationQueue(); |
1499 } | 1493 } |
1500 } else { | 1494 } else { |
1501 if (GetOptimizedCodeNow(info.get())) return info->code(); | 1495 if (GetOptimizedCodeNow(info.get())) return info->code(); |
1502 } | 1496 } |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1596 } | 1590 } |
1597 | 1591 |
1598 | 1592 |
1599 #if DEBUG | 1593 #if DEBUG |
1600 void CompilationInfo::PrintAstForTesting() { | 1594 void CompilationInfo::PrintAstForTesting() { |
1601 PrintF("--- Source from AST ---\n%s\n", | 1595 PrintF("--- Source from AST ---\n%s\n", |
1602 PrettyPrinter(isolate(), zone()).PrintProgram(function())); | 1596 PrettyPrinter(isolate(), zone()).PrintProgram(function())); |
1603 } | 1597 } |
1604 #endif | 1598 #endif |
1605 } } // namespace v8::internal | 1599 } } // namespace v8::internal |
OLD | NEW |