OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 646 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
657 | 657 |
658 // Check the function has compiled code. | 658 // Check the function has compiled code. |
659 ASSERT(shared->is_compiled()); | 659 ASSERT(shared->is_compiled()); |
660 shared->set_code_age(0); | 660 shared->set_code_age(0); |
661 | 661 |
662 if (info->AllowOptimize() && !shared->optimization_disabled()) { | 662 if (info->AllowOptimize() && !shared->optimization_disabled()) { |
663 // If we're asked to always optimize, we compile the optimized | 663 // If we're asked to always optimize, we compile the optimized |
664 // version of the function right away - unless the debugger is | 664 // version of the function right away - unless the debugger is |
665 // active as it makes no sense to compile optimized code then. | 665 // active as it makes no sense to compile optimized code then. |
666 if (FLAG_always_opt && | 666 if (FLAG_always_opt && |
667 !Isolate::Current()->debug()->has_break_points()) { | 667 !Isolate::Current()->DebuggerHasBreakPoints()) { |
668 CompilationInfo optimized(function); | 668 CompilationInfo optimized(function); |
669 optimized.SetOptimizing(AstNode::kNoNumber); | 669 optimized.SetOptimizing(AstNode::kNoNumber); |
670 return CompileLazy(&optimized); | 670 return CompileLazy(&optimized); |
671 } else if (isolate->compilation_cache()->ShouldOptimizeEagerly( | 671 } else if (isolate->compilation_cache()->ShouldOptimizeEagerly( |
672 function)) { | 672 function)) { |
673 isolate->runtime_profiler()->OptimizeSoon(*function); | 673 isolate->runtime_profiler()->OptimizeSoon(*function); |
674 } | 674 } |
675 } | 675 } |
676 } | 676 } |
677 | 677 |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
790 shared->DebugName())); | 790 shared->DebugName())); |
791 } | 791 } |
792 } | 792 } |
793 | 793 |
794 GDBJIT(AddCode(Handle<String>(shared->DebugName()), | 794 GDBJIT(AddCode(Handle<String>(shared->DebugName()), |
795 Handle<Script>(info->script()), | 795 Handle<Script>(info->script()), |
796 Handle<Code>(info->code()))); | 796 Handle<Code>(info->code()))); |
797 } | 797 } |
798 | 798 |
799 } } // namespace v8::internal | 799 } } // namespace v8::internal |
OLD | NEW |