| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 681 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 692 lit->has_only_simple_this_property_assignments(), | 692 lit->has_only_simple_this_property_assignments(), |
| 693 *lit->this_property_assignments()); | 693 *lit->this_property_assignments()); |
| 694 | 694 |
| 695 // Check the function has compiled code. | 695 // Check the function has compiled code. |
| 696 ASSERT(shared->is_compiled()); | 696 ASSERT(shared->is_compiled()); |
| 697 shared->set_code_age(0); | 697 shared->set_code_age(0); |
| 698 shared->set_dont_optimize(lit->flags()->Contains(kDontOptimize)); | 698 shared->set_dont_optimize(lit->flags()->Contains(kDontOptimize)); |
| 699 shared->set_dont_inline(lit->flags()->Contains(kDontInline)); | 699 shared->set_dont_inline(lit->flags()->Contains(kDontInline)); |
| 700 shared->set_ast_node_count(lit->ast_node_count()); | 700 shared->set_ast_node_count(lit->ast_node_count()); |
| 701 | 701 |
| 702 if (V8::UseCrankshaft()&& | 702 if (V8::UseCrankshaft() && |
| 703 !function.is_null() && | 703 !function.is_null() && |
| 704 !shared->optimization_disabled()) { | 704 !shared->optimization_disabled()) { |
| 705 // If we're asked to always optimize, we compile the optimized | 705 // If we're asked to always optimize, we compile the optimized |
| 706 // version of the function right away - unless the debugger is | 706 // version of the function right away - unless the debugger is |
| 707 // active as it makes no sense to compile optimized code then. | 707 // active as it makes no sense to compile optimized code then. |
| 708 if (FLAG_always_opt && | 708 if (FLAG_always_opt && |
| 709 !Isolate::Current()->DebuggerHasBreakPoints()) { | 709 !Isolate::Current()->DebuggerHasBreakPoints()) { |
| 710 CompilationInfoWithZone optimized(function); | 710 CompilationInfoWithZone optimized(function); |
| 711 optimized.SetOptimizing(AstNode::kNoNumber); | 711 optimized.SetOptimizing(AstNode::kNoNumber); |
| 712 return Compiler::CompileLazy(&optimized); | 712 return Compiler::CompileLazy(&optimized); |
| (...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1027 } | 1027 } |
| 1028 } | 1028 } |
| 1029 | 1029 |
| 1030 GDBJIT(AddCode(Handle<String>(shared->DebugName()), | 1030 GDBJIT(AddCode(Handle<String>(shared->DebugName()), |
| 1031 Handle<Script>(info->script()), | 1031 Handle<Script>(info->script()), |
| 1032 Handle<Code>(info->code()), | 1032 Handle<Code>(info->code()), |
| 1033 info)); | 1033 info)); |
| 1034 } | 1034 } |
| 1035 | 1035 |
| 1036 } } // namespace v8::internal | 1036 } } // namespace v8::internal |
| OLD | NEW |