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 793 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
804 ASSERT(!function->IsOptimized()); | 804 ASSERT(!function->IsOptimized()); |
805 } | 805 } |
806 | 806 |
807 // Set the expected number of properties for instances. | 807 // Set the expected number of properties for instances. |
808 FunctionLiteral* lit = info->function(); | 808 FunctionLiteral* lit = info->function(); |
809 int expected = lit->expected_property_count(); | 809 int expected = lit->expected_property_count(); |
810 SetExpectedNofPropertiesFromEstimate(shared, expected); | 810 SetExpectedNofPropertiesFromEstimate(shared, expected); |
811 | 811 |
812 // Check the function has compiled code. | 812 // Check the function has compiled code. |
813 ASSERT(shared->is_compiled()); | 813 ASSERT(shared->is_compiled()); |
814 shared->set_code_age(0); | |
815 shared->set_dont_optimize(lit->flags()->Contains(kDontOptimize)); | 814 shared->set_dont_optimize(lit->flags()->Contains(kDontOptimize)); |
816 shared->set_dont_inline(lit->flags()->Contains(kDontInline)); | 815 shared->set_dont_inline(lit->flags()->Contains(kDontInline)); |
817 shared->set_ast_node_count(lit->ast_node_count()); | 816 shared->set_ast_node_count(lit->ast_node_count()); |
818 | 817 |
819 if (V8::UseCrankshaft() && | 818 if (V8::UseCrankshaft() && |
820 !function.is_null() && | 819 !function.is_null() && |
821 !shared->optimization_disabled()) { | 820 !shared->optimization_disabled()) { |
822 // If we're asked to always optimize, we compile the optimized | 821 // If we're asked to always optimize, we compile the optimized |
823 // version of the function right away - unless the debugger is | 822 // version of the function right away - unless the debugger is |
824 // active as it makes no sense to compile optimized code then. | 823 // active as it makes no sense to compile optimized code then. |
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1201 } | 1200 } |
1202 } | 1201 } |
1203 | 1202 |
1204 GDBJIT(AddCode(Handle<String>(shared->DebugName()), | 1203 GDBJIT(AddCode(Handle<String>(shared->DebugName()), |
1205 Handle<Script>(info->script()), | 1204 Handle<Script>(info->script()), |
1206 Handle<Code>(info->code()), | 1205 Handle<Code>(info->code()), |
1207 info)); | 1206 info)); |
1208 } | 1207 } |
1209 | 1208 |
1210 } } // namespace v8::internal | 1209 } } // namespace v8::internal |
OLD | NEW |